Open
Add input validation for Friedman-Popescu H statistic calculation#16760
Conversation
Improve custom metric doc Co-authored-by: Hannah Tillman <hannah.tillman@h2o.ai>
Co-authored-by: maurever <11465784+maurever@users.noreply.github.com>
…ity (#16803) Co-authored-by: maurever <11465784+maurever@users.noreply.github.com>
Co-authored-by: maurever <11465784+maurever@users.noreply.github.com>
Co-authored-by: maurever <11465784+maurever@users.noreply.github.com>
…6811) Co-authored-by: maurever <11465784+maurever@users.noreply.github.com>
Co-authored-by: maurever <11465784+maurever@users.noreply.github.com>
Co-authored-by: maurever <11465784+maurever@users.noreply.github.com>
Co-authored-by: maurever <11465784+maurever@users.noreply.github.com>
Co-authored-by: maurever <11465784+maurever@users.noreply.github.com>
Co-authored-by: maurever <11465784+maurever@users.noreply.github.com>
…pe) (#16835) * GH-16566 - Add per-test timeout rule to TestUtil Adds a JUnit Timeout rule that fails individual tests with TestTimedOutException instead of hanging the JVM. Default 10 minutes, configurable via -Dtest.timeout.seconds. Prevents a single deadlocked test from causing Jenkins to SIGTERM the entire stage. * GH-16566 - Ignore flaky AdaBoost DeepLearning weak-learner test testBasicTrainAndScoreDeepLearning hangs intermittently on Java 8/11 due to a model-lock race in DeepLearningDriver.onExceptionalCompletion: the main thread blocks on a model whose FJ worker already threw. * GH-16566 - Fix unmatched Scope.exit() in ParseTestOrc.testParseAllOrcs The test called Scope.exit() in finally without a matching Scope.enter() at the top, popping a scope it never pushed. It usually got rescued by sibling tests leaking enters in the shared JVM; under newer JDK 17 test ordering the donor scope is gone and the assertion fires. Co-authored-by: maurever <11465784+maurever@users.noreply.github.com>
Co-authored-by: maurever <11465784+maurever@users.noreply.github.com>
Co-authored-by: maurever <11465784+maurever@users.noreply.github.com>
…t grid-search hyperparameters Co-authored-by: maurever <11465784+maurever@users.noreply.github.com>
…ctor' and 'model structure' Co-authored-by: maurever <11465784+maurever@users.noreply.github.com>
Co-authored-by: Veronika Maurerová <maurever@users.noreply.github.com> Co-authored-by: maurever <11465784+maurever@users.noreply.github.com>
Co-authored-by: maurever <11465784+maurever@users.noreply.github.com>
Co-authored-by: maurever <11465784+maurever@users.noreply.github.com>
Co-authored-by: maurever <11465784+maurever@users.noreply.github.com>
…80 (#16846) Co-authored-by: maurever <11465784+maurever@users.noreply.github.com>
Co-authored-by: maurever <11465784+maurever@users.noreply.github.com>
…ode test [nocheck] (#16813) * WIP * Fix non-determinism * add assert Co-authored-by: maurever <11465784+maurever@users.noreply.github.com>
…026-42779 (#16853) Co-authored-by: maurever <11465784+maurever@users.noreply.github.com>
Co-authored-by: maurever <11465784+maurever@users.noreply.github.com>
Co-authored-by: maurever <11465784+maurever@users.noreply.github.com>
Co-authored-by: maurever <11465784+maurever@users.noreply.github.com>
Co-authored-by: maurever <11465784+maurever@users.noreply.github.com>
|
| int inputColNum = cs.length; | ||
| int inputRowNum = cs[0]._len; | ||
| assert queryColNum == inputColNum: "Query data frame and input data frame should have the same columns number."; | ||
| for (int i = 0; i < queryRowNum; i++) { // go over all query data rows |
| * @return filled array of vecs with calculated data | ||
| */ | ||
| public Vec[] fillVecs(Vec[] vecs){ | ||
| for (int i = 0; i < vecs[0].length(); i++) { |
| public static Vec createIdVec(final long len, byte type) { | ||
| assert type == Vec.T_UUID || type == Vec.T_STR || type == Vec.T_NUM: "Unsupported type for id vec creation: "+type; | ||
| final Vec vec = Vec.makeZero(len, type); | ||
| for (int i = 0; i < vec.length(); i++) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Plan to Fix H Statistic Input Validation
getFriedmanPopescusH()methods (XGBoostModel and GBMModel)Final Summary:
Root Cause
The NPE occurred when users specified column names in the
varsparameter that:removeSpecialNNonNumericColumns()The error happened in
FriedmanPopescusH.filterFrame()when callingframe.vecs(cols)with invalid column names, which returns null Vec references.Solution Implemented
FriedmanPopescusHCollectorinterface as a default methodTest Coverage
testFriedmanPopescusHInputValidation()in GBMTestpyunit_h_input_validation.py(tests both GBM and XGBoost)runit_GBM_h_statistic_input_validation.Randrunit_XGBoost_h_statistic_input_validation.RQuality Checks
✅ Code compiles successfully
✅ Code review passed with no issues
✅ CodeQL security check passed
✅ No code duplication - shared validation method
✅ Base branch changed to rel-3.46.0 for inclusion in next release
Example Error Messages
Before Fix:
After Fix:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.