Uroš Bojanić created SPARK-58842:
------------------------------------
Summary: Add descriptive messages to bare require checks in ALS
Key: SPARK-58842
URL: https://issues.apache.org/jira/browse/SPARK-58842
Project: Spark
Issue Type: Improvement
Components: ML
Affects Versions: 4.3.0
Reporter: Uroš Bojanić
ALS has 14 bare require(...) checks with no message, so when one trips it
produces only 'requirement failed', giving no indication of which invariant
broke in a long-running factorization job. Examples: require(c >= 0.0),
require(a.length == k), require(blockId < numBlocks).
This adds a short message to each, naming the values involved, e.g. require(c
>= 0.0, s"Observation weight must be non-negative but found $c."). The file
already establishes the pattern with require(numBlocks > 0, s"numBlocks must be
positive but found $numBlocks.").
Conditions and exception types are unchanged; only message text is added. This
mirrors SPARK-58621, which did the same for SummarizerBuffer.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]