zhengruifeng commented on code in PR #49651:
URL: https://github.com/apache/spark/pull/49651#discussion_r1929496562
##########
python/pyspark/ml/tests/test_feature.py:
##########
@@ -842,21 +845,43 @@ def test_bucketizer(self):
def test_idf(self):
dataset = self.spark.createDataFrame(
- [(DenseVector([1.0, 2.0]),), (DenseVector([0.0, 1.0]),),
(DenseVector([3.0, 0.2]),)],
+ [
+ (DenseVector([1.0, 2.0]),),
+ (DenseVector([0.0, 1.0]),),
+ (DenseVector([3.0, 0.2]),),
+ ],
["tf"],
)
- idf0 = IDF(inputCol="tf")
- self.assertListEqual(idf0.params, [idf0.inputCol, idf0.minDocFreq,
idf0.outputCol])
- idf0m = idf0.fit(dataset, {idf0.outputCol: "idf"})
- self.assertEqual(
- idf0m.uid, idf0.uid, "Model should inherit the UID from its parent
estimator."
+ idf = IDF(inputCol="tf")
+ self.assertListEqual(idf.params, [idf.inputCol, idf.minDocFreq,
idf.outputCol])
+
+ model = idf.fit(dataset, {idf.outputCol: "idf"})
+ # self.assertEqual(
+ # model.uid, idf.uid, "Model should inherit the UID from its
parent estimator."
Review Comment:
created [SPARK-50988](https://issues.apache.org/jira/browse/SPARK-50988) to
track this issue
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]