Github user yinxusen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11683#discussion_r56222556
  
    --- Diff: python/pyspark/ml/pipeline.py ---
    @@ -15,116 +15,87 @@
     # limitations under the License.
     #
     
    -from abc import ABCMeta, abstractmethod
    +import sys
     
    +if sys.version > '3':
    +    basestring = str
    +
    +from pyspark import SparkContext
     from pyspark import since
    +from pyspark.ml import Estimator, Model, Transformer
     from pyspark.ml.param import Param, Params
    -from pyspark.ml.util import keyword_only
    +from pyspark.ml.util import keyword_only, JavaMLWriter, JavaMLReader
    +from pyspark.ml.wrapper import JavaWrapper
     from pyspark.mllib.common import inherit_doc
     
     
    -@inherit_doc
    -class Estimator(Params):
    +def _stages_java2py(java_stages):
         """
    -    Abstract class for estimators that fit models to data.
    -
    -    .. versionadded:: 1.3.0
    +    Transforms the parameter Python stages from a list of Java stages.
    +    :param java_stages: An array of Java stages.
    +    :return: An array of Python stages.
         """
     
    -    __metaclass__ = ABCMeta
    +    for stage in java_stages:
    +        assert(stage.getClass().getName() != "org.apache.spark.Pipeline" or
    --- End diff --
    
    I can see that TrainValidationSplit and its model are also not extending 
from JavaWrapper. So I'll add them all.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to