You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/04/06 02:52:22 UTC
[GitHub] [spark] HyukjinKwon commented on a change in pull request #28110:
[SPARK-31339][WIP] L245: Changed PipelineModel(...) to self.cls(...)
HyukjinKwon commented on a change in pull request #28110: [SPARK-31339][WIP] L245: Changed PipelineModel(...) to self.cls(...)
URL: https://github.com/apache/spark/pull/28110#discussion_r403804689
##########
File path: python/pyspark/ml/pipeline.py
##########
@@ -242,7 +242,7 @@ def load(self, path):
return JavaMLReader(self.cls).load(path)
else:
uid, stages = PipelineSharedReadWrite.load(metadata, self.sc, path)
- return PipelineModel(stages=stages)._resetUid(uid)
+ return self.cls(stages=stages)._resetUid(uid)
Review comment:
I don't know a lot of ML stuff but I can tell the current PR is inconsistent with Scala side:
https://github.com/apache/spark/blob/3ce1dff7ba4799295a2bf89e6df35e900afc587b/mllib/src/main/scala/org/apache/spark/ml/Pipeline.scala#L362
Is `PipelineModel` supposed to be inherited? If that's the case seems we should also inherit `PipelineModelReader` and `PipelineModelWriter` accordingly consistently with Scala and Java side.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org