Skip to content

add training_reuse_decay_steps - #1055

Open
tuoping wants to merge 2 commits into
deepmodeling:masterfrom
tuoping:reuse_decay_steps
Open

add training_reuse_decay_steps#1055
tuoping wants to merge 2 commits into
deepmodeling:masterfrom
tuoping:reuse_decay_steps

Conversation

@tuoping

@tuoping tuoping commented Nov 29, 2022

Copy link
Copy Markdown
Collaborator

When starting with init-model, add a "training_reuse_decay_steps" parameter.

@njzjz
njzjz changed the base branch from master to devel November 29, 2022 23:28
Comment thread dpgen/generator/run.py
if jinput['loss'].get('start_pref_f') is not None:
jinput['loss']['start_pref_f'] = training_reuse_start_pref_f
jinput['learning_rate']['start_lr'] = training_reuse_start_lr
jinput['learning_rate']['decay_steps'] = training_reuse_decay_steps

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is a breaking change

@codecov-commenter

codecov-commenter commented Dec 22, 2022

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 39.55%. Comparing base (02d7d7d) to head (47e5733).
⚠️ Report is 309 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1055   +/-   ##
=======================================
  Coverage   39.54%   39.55%           
=======================================
  Files          99       99           
  Lines       17980    17982    +2     
=======================================
+ Hits         7111     7113    +2     
  Misses      10869    10869           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@njzjz-bot njzjz-bot 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.

Verdict: Changes requested. The new parameter defaults to None, but the code unconditionally overwrites an existing valid decay_steps value, so every reuse-training configuration that omits the parameter gets decay_steps: null. The PR also lacks schema/docs updates and tests for the default behavior.

Note: The Codex quota is about to reset, so I am using the remaining tokens to review all open PRs in this repository.

Coding agent: Codex
Codex version: codex-cli 0.144.6
Model: gpt-5.6-sol
Reasoning effort: xhigh

Comment thread dpgen/generator/run.py
if jinput['loss'].get('start_pref_f') is not None:
jinput['loss']['start_pref_f'] = training_reuse_start_pref_f
jinput['learning_rate']['start_lr'] = training_reuse_start_lr
jinput['learning_rate']['decay_steps'] = training_reuse_decay_steps

@njzjz-bot njzjz-bot Aug 10, 2026

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.

[Blocking] training_reuse_decay_steps defaults to None, so this unconditional assignment overwrites an existing integer in the training template and produces decay_steps: null, which DeePMD cannot consume. Override the value only when the user explicitly provides it:

Suggested change
jinput['learning_rate']['decay_steps'] = training_reuse_decay_steps
if training_reuse_decay_steps is not None:
jinput['learning_rate']['decay_steps'] = training_reuse_decay_steps

Also add arginfo/documentation and tests proving that omission preserves the original value while an explicit value overrides it.

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