You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by davies <gi...@git.apache.org> on 2015/01/13 19:33:46 UTC

[GitHub] spark pull request: [SPARK-5223] [MLlib] [PySpark] fix MapConverte...

GitHub user davies opened a pull request:

    https://github.com/apache/spark/pull/4023

    [SPARK-5223] [MLlib] [PySpark] fix MapConverter and ListConverter in MLlib

    It will introduce problems if the object in dict/list/tuple can not support by py4j, such as Vector.
    Also, pickle may have better performance for larger object (less RPC).
    
    In some cases that the object in dict/list can not be pickled (such as JavaObject), we should still use MapConvert/ListConvert.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/davies/spark listconvert

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/4023.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #4023
    
----
commit 55d4ab27199fcfbae2a0c33afb83dfa4cf062fbd
Author: Davies Liu <da...@databricks.com>
Date:   2015-01-13T18:31:55Z

    fix MapConverter and ListConverter in MLlib

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-5223] [MLlib] [PySpark] fix MapConverte...

Posted by mengxr <gi...@git.apache.org>.
Github user mengxr commented on the pull request:

    https://github.com/apache/spark/pull/4023#issuecomment-69813804
  
    @davies Could you provide an example to produce the bug and turn it into a unit test?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-5223] [MLlib] [PySpark] fix MapConverte...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/4023#issuecomment-69794861
  
      [Test build #25478 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/25478/consoleFull) for   PR 4023 at commit [`55d4ab2`](https://github.com/apache/spark/commit/55d4ab27199fcfbae2a0c33afb83dfa4cf062fbd).
     * This patch merges cleanly.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-5223] [MLlib] [PySpark] fix MapConverte...

Posted by mengxr <gi...@git.apache.org>.
Github user mengxr commented on the pull request:

    https://github.com/apache/spark/pull/4023#issuecomment-69817385
  
    LGTM. Merged into master and branch-1.2. Thanks for explaining the problem!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-5223] [MLlib] [PySpark] fix MapConverte...

Posted by FlytxtRnD <gi...@git.apache.org>.
Github user FlytxtRnD commented on the pull request:

    https://github.com/apache/spark/pull/4023#issuecomment-70040193
  
    Ok. Thanks for the explanation.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-5223] [MLlib] [PySpark] fix MapConverte...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/4023#issuecomment-69807194
  
      [Test build #25478 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/25478/consoleFull) for   PR 4023 at commit [`55d4ab2`](https://github.com/apache/spark/commit/55d4ab27199fcfbae2a0c33afb83dfa4cf062fbd).
     * This patch **passes all tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-5223] [MLlib] [PySpark] fix MapConverte...

Posted by davies <gi...@git.apache.org>.
Github user davies commented on the pull request:

    https://github.com/apache/spark/pull/4023#issuecomment-69816419
  
    It did not have problems right now, some one hit this while working on other algorithms/API, see http://apache-spark-developers-list.1001551.n3.nabble.com/Python-to-Java-object-conversion-of-numpy-array-td10065.html 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-5223] [MLlib] [PySpark] fix MapConverte...

Posted by FlytxtRnD <gi...@git.apache.org>.
Github user FlytxtRnD commented on the pull request:

    https://github.com/apache/spark/pull/4023#issuecomment-70038625
  
    @davies Could you please explain why the second clause of this condition is added?
           
            ```elif isinstance(obj, list) and (obj or isinstance(obj[0], JavaObject)):
                   obj = ListConverter().convert(obj, sc._gateway._gateway_client)```
    
    obj or isinstance(obj[0], JavaObject)) returns false only in 2 cases if obj is boolean False or obj is an empty list. Is there any other significance?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-5223] [MLlib] [PySpark] fix MapConverte...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/4023#issuecomment-69807204
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/25478/
    Test PASSed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-5223] [MLlib] [PySpark] fix MapConverte...

Posted by davies <gi...@git.apache.org>.
Github user davies commented on the pull request:

    https://github.com/apache/spark/pull/4023#issuecomment-70039829
  
    If obj is [], ListConverter() will work. If obj is a list of JavaObject, then obj can not be serialized, because JavaObject can not be serialized. ListConverter() can help in the later case.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-5223] [MLlib] [PySpark] fix MapConverte...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/spark/pull/4023


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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