You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Joseph K. Bradley (JIRA)" <ji...@apache.org> on 2016/04/16 20:24:25 UTC

[jira] [Resolved] (SPARK-14605) Python spark.ml classes should use unicode uid

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

Joseph K. Bradley resolved SPARK-14605.
---------------------------------------
       Resolution: Fixed
    Fix Version/s: 2.0.0

Issue resolved by pull request 12368
[https://github.com/apache/spark/pull/12368]

> Python spark.ml classes should use unicode uid
> ----------------------------------------------
>
>                 Key: SPARK-14605
>                 URL: https://issues.apache.org/jira/browse/SPARK-14605
>             Project: Spark
>          Issue Type: Improvement
>          Components: ML, PySpark
>            Reporter: Joseph K. Bradley
>            Assignee: Joseph K. Bradley
>            Priority: Minor
>             Fix For: 2.0.0
>
>
> Python spark.ml Identifiable classes use UIDs of type {{str}}, but they should use {{unicode}} (in Python 2.x) to match Java.  This could be a problem if someone created a class in Java with odd unicode characters, saved it, and loaded it in Python.
> This is also odd since the following code in Python produces a class {{lr}} with {{str}} uid and {{lr2}} with {{unicode}} uid:
> {code}
> from pyspark.ml.regression import LinearRegression
> lr = LinearRegression(maxIter=1)
> lr_path = "lr-TEMP"
> lr.write.overwrite().save(lr_path)
> lr2 = LinearRegression.load(lr_path)
> {code}
> Proposal: Use unicode everywhere in Python.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org