Github user BryanCutler commented on a diff in the pull request:
https://github.com/apache/spark/pull/17849#discussion_r114847413
--- Diff: python/pyspark/ml/wrapper.py ---
@@ -263,7 +282,14 @@ def _fit_java(self, dataset):
def _fit(self, dataset):
java_model = self._fit_java(dataset)
- return self._create_model(java_model)
+ model = self._create_model(java_model)
+
+ # SPARK-10931: This is a temporary fix to allow models to own
params
+ # from estimators. Eventually, these params should be in models
through
+ # using common base classes between estimators and models.
+ model._create_params_from_java()
--- End diff --
This might be better to move to `JavaModel.__init()` for the case of
creating a model without fitting - e.g. `CountVectorizerModel` from vocabulary.
---
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]