Skip to content

GH-16717: Fix DeepLearning params modification issue - #16794

Open
tomasfryda wants to merge 4 commits into
rel-3.46.0from
tomf_GH-16717_deep_learning_distribution_param
Open

GH-16717: Fix DeepLearning params modification issue#16794
tomasfryda wants to merge 4 commits into
rel-3.46.0from
tomf_GH-16717_deep_learning_distribution_param

Conversation

@tomasfryda

Copy link
Copy Markdown
Contributor

@tomasfryda tomasfryda added this to the 3.46.0.11 milestone Mar 30, 2026
@tomasfryda tomasfryda self-assigned this Mar 30, 2026
@tomasfryda
tomasfryda requested review from Copilot and maurever March 30, 2026 09:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes intermittent DeepLearning checkpoint-resume failures caused by training-time resolution of AUTO parameters (notably _distribution) leaking back into the caller’s Parameters instance and later triggering checkpoint “parameter changed” validation.

Changes:

  • Clone Model.Parameters into both _input_parms and _parms inside ModelBuilder constructors to prevent mutation of the caller-provided parameters object during training.
  • Add a DeepLearning regression test covering checkpoint resumption when distribution=AUTO is involved.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
h2o-core/src/main/java/hex/ModelBuilder.java Clones incoming parameters to avoid mutating the caller’s parms object during model training.
h2o-algos/src/test/java/hex/deeplearning/DeepLearningTest.java Adds a regression test to ensure checkpoint resume works when AUTO distribution gets resolved during training.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread h2o-algos/src/test/java/hex/deeplearning/DeepLearningTest.java Outdated
Comment thread h2o-algos/src/test/java/hex/deeplearning/DeepLearningTest.java Outdated
@tomasfryda
tomasfryda requested a review from valenad1 April 14, 2026 07:29
valenad1
valenad1 previously approved these changes Apr 14, 2026
valenad1
valenad1 previously approved these changes Apr 15, 2026

@valenad1 valenad1 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

maurever
maurever previously approved these changes Apr 15, 2026

@maurever maurever left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @tomasfryda.

@valenad1
valenad1 self-requested a review April 15, 2026 13:03
@valenad1

Copy link
Copy Markdown
Collaborator

It seems like Java 8 Smoke is a legit fail..

@tomasfryda

Copy link
Copy Markdown
Contributor Author

@valenad1 yes, I'm looking at it now. The issue seems to be now in the GLM. The root cause is that we expect side effects from init() in parms in some tests.

For example:

parms = new ModelParms();
parms.family = AUTO;

Model m = new Model();
m.init(parms);

assert parms.family != AUTO;

// and more importantly
assert parms != m._input_parms;

Which I think is a wrong behavior since we introduced the _input_parms.

@tomasfryda
tomasfryda dismissed stale reviews from maurever and valenad1 via c8fcb19 April 16, 2026 14:31
@tomasfryda
tomasfryda force-pushed the tomf_GH-16717_deep_learning_distribution_param branch from c8fcb19 to 79b6ae3 Compare April 22, 2026 15:40
@sonarqubecloud

Copy link
Copy Markdown

@valenad1 valenad1 removed this from the 3.46.0.11 milestone May 22, 2026
The exception type delivered by Job.get() depended on a race: if the job
failed before get() attached to the barrier, the original exception arrived
wrapped in a generic RuntimeException, otherwise it was rethrown as-is.
This made tests expecting H2OIllegalArgumentException from checkpoint
restarts fail intermittently.
@sonarqubecloud

sonarqubecloud Bot commented Jul 2, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants