GitHub user BryanCutler opened a pull request:

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

    [SPARK-15018][PYSPARK][ML] Fixed bug causing error if PySpark Pipeline used 
without stages

    ## What changes were proposed in this pull request?
    
    When fitting a PySpark Pipeline with no stages, it should work as an 
identity transformer. Instead a NoneType error is thrown because the `stage` 
param does not get set to a default empty list.  This change fixes this error 
by setting and getting the param as a default and properly changing the kwargs 
to an empty list if `None` is passed in. 
    
    
    ## How was this patch tested?
    Added new unit tests to verify an empty Pipeline acts as an identity 
transformer
    
    


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

    $ git pull https://github.com/BryanCutler/spark 
pipeline-identity-SPARK-15018

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

    https://github.com/apache/spark/pull/12790.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 #12790
    
----
commit e26de7eaf699951dd645922156b0db6c044086cf
Author: Bryan Cutler <[email protected]>
Date:   2016-04-29T22:15:19Z

    Fixed bug causing error if PySpark Pipeline used without stages

----


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to