Github user wangmiao1981 commented on a diff in the pull request:
https://github.com/apache/spark/pull/11945#discussion_r57636219
--- Diff: python/pyspark/ml/tests.py ---
@@ -655,6 +656,20 @@ def test_nested_pipeline_persistence(self):
except OSError:
pass
+ def test_write_property(self):
+ lr = LinearRegression(maxIter=1)
+ path = tempfile.mkdtemp()
+ lr_path = path + "/lr"
+ lr.write.save(lr_path)
--- End diff --
I think self.assertTrue(isinstance(lr.write, MLWriter)) should be good
enough as lr is the inheriting class of MLWriter, which is different from my
original test (in that case I directly create an MLWriter instance, which is
insufficient test). I change the test case to the simpler one. Thanks!
---
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]