You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@livy.apache.org by "Gyorgy Gal (Jira)" <ji...@apache.org> on 2025/11/10 17:13:03 UTC

[jira] [Updated] (LIVY-569) BinaryClassificationMetrics give AttributeError

     [ https://issues.apache.org/jira/browse/LIVY-569?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gyorgy Gal updated LIVY-569:
----------------------------
    Fix Version/s: 0.10.0
                       (was: 0.9.0)

This issue has been moved to the 0.10.0 release as part of a bulk update. If you feel this is moved out inappropriately, feel free to provide justification and reset the Fix Version to 0.9.0.

> BinaryClassificationMetrics give AttributeError
> -----------------------------------------------
>
>                 Key: LIVY-569
>                 URL: https://issues.apache.org/jira/browse/LIVY-569
>             Project: Livy
>          Issue Type: Bug
>            Reporter: Fred de Gier
>            Priority: Major
>             Fix For: 0.10.0
>
>
> When using the BinaryClassificationMetrics there is an error, possible related to conversion of data types. This only occurs when using Sparkmagic and Livy.
> *Input:*
> {code:java}
> from pyspark import SparkContext 
>  from pyspark.sql import SparkSession 
>  import pyspark
>  from pyspark.mllib.evaluation import BinaryClassificationMetrics
> a = sc.parallelize([
>  (0.0, 1.0), (0.0, 1.0), (0.0, 1.0), (0.0, 1.0), (0.0, 1.0), 
>  (0.0, 1.0), (0.0, 1.0), (0.0, 1.0), (0.0, 1.0), (0.0, 1.0), 
>  (0.0, 1.0), (0.0, 1.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), 
>  (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), 
>  (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0), (0.0, 0.0)
>  ])
> metrics = BinaryClassificationMetrics(a)
> {code}
>  
> *Output:*
> {code:java}
> 'StructField' object has no attribute '_get_object_id' {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)