Skip to content
  • Bryan Cutler's avatar
    39f328ba
    [SPARK-15018][PYSPARK][ML] Improve handling of PySpark Pipeline when used without stages · 39f328ba
    Bryan Cutler authored
    ## What changes were proposed in this pull request?
    
    When fitting a PySpark Pipeline without the `stages` param set, a confusing NoneType error is raised as attempts to iterate over the pipeline stages.  A pipeline with no stages should act as an identity transform, however the `stages` param still needs to be set to an empty list.  This change improves the error output when the `stages` param is not set and adds a better description of what the API expects as input.  Also minor cleanup of related code.
    
    ## How was this patch tested?
    Added new unit tests to verify an empty Pipeline acts as an identity transformer
    
    Author: Bryan Cutler <cutlerb@gmail.com>
    
    Closes #12790 from BryanCutler/pipeline-identity-SPARK-15018.
    39f328ba
    [SPARK-15018][PYSPARK][ML] Improve handling of PySpark Pipeline when used without stages
    Bryan Cutler authored
    ## What changes were proposed in this pull request?
    
    When fitting a PySpark Pipeline without the `stages` param set, a confusing NoneType error is raised as attempts to iterate over the pipeline stages.  A pipeline with no stages should act as an identity transform, however the `stages` param still needs to be set to an empty list.  This change improves the error output when the `stages` param is not set and adds a better description of what the API expects as input.  Also minor cleanup of related code.
    
    ## How was this patch tested?
    Added new unit tests to verify an empty Pipeline acts as an identity transformer
    
    Author: Bryan Cutler <cutlerb@gmail.com>
    
    Closes #12790 from BryanCutler/pipeline-identity-SPARK-15018.
Loading