uros-b commented on code in PR #57590:
URL: https://github.com/apache/spark/pull/57590#discussion_r3667481586
##########
mllib/src/test/scala/org/apache/spark/ml/fpm/FPGrowthSuite.scala:
##########
@@ -154,6 +154,14 @@ class FPGrowthSuite extends SparkFunSuite with
MLlibTestSparkContext with Defaul
ParamsSuite.checkParams(model)
}
+ test("FPGrowthModel estimated size") {
Review Comment:
The new test asserts only estimatedSize < 16 KiB (an upper bound). Because
the training dataset is tiny (4 rows, 3 frequent items), this upper bound holds
with or without the 6-line metadata addition; the test would pass if
estimateMatadataSize were removed, so it does not guard the behavior it
introduces. The same-day ALS sibling (SPARK-58367) used the stronger
two-assertion pattern: first model.estimatedSize === estimatedDFSize +
model.estimateMatadataSize to pin the metadata contribution, then the < 16 KiB
bound. Recommend adding an equality assertion that binds estimateMatadataSize
so the test is an actual regression guard. Note: the clustering siblings
(SPARK-58361) used upper-bound-only and were merged without objection, so the
author may consider this precedent sufficient, but the ALS test in the same
series is the stronger template.
--
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]