You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Uroš Bojanić (Jira)" <ji...@apache.org> on 2026/08/18 09:47:00 UTC
[jira] [Created] (SPARK-58842) Add descriptive messages to bare require checks in ALS
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: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org