-
Notifications
You must be signed in to change notification settings - Fork 569
feat(tf): implement change-bias command #4927
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: njzjz <[email protected]>
dp change-bias
for TF modelsCo-authored-by: njzjz <[email protected]>
…stent style Co-authored-by: njzjz <[email protected]>
…nOptions parameters, fix test signatures, add --pt flag to example Co-authored-by: njzjz <[email protected]>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## devel #4927 +/- ##
==========================================
+ Coverage 84.29% 84.45% +0.16%
==========================================
Files 703 705 +2
Lines 68728 69829 +1101
Branches 3573 3574 +1
==========================================
+ Hits 57935 58975 +1040
- Misses 9653 9716 +63
+ Partials 1140 1138 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-authored-by: njzjz <[email protected]>
…d polluting original Co-authored-by: njzjz <[email protected]>
Co-authored-by: njzjz <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot The documentation change-bias.md
should be revised. The current documentation only writes the PyTorch backend but not TensorFlow.
Co-authored-by: njzjz <[email protected]>
Updated the change-bias documentation to include comprehensive TensorFlow backend support. The documentation now covers both TensorFlow and PyTorch backends with:
The documentation follows the established multi-backend pattern used throughout the project. (2096f7a) |
Removed redundant sections and updated command examples for changing bias in TensorFlow backend. Signed-off-by: Jinzhe Zeng <[email protected]>
Implements TensorFlow support for the
dp change-bias
command with proper checkpoint handling and variable restoration. This brings the TensorFlow backend to feature parity with the PyTorch implementation.Key Features
.ckpt
,.meta
,.data
,.index
) and frozen models (.pb
)-b/--bias-value
option with proper validation against model type_mapchange_energy_bias_lower
functionality for automatic bias computationBefore vs After
Variable restoration:
Change energy bias of ['O', 'H'] from [0. 0.] to [calculated values]
(variables never restored)Change energy bias of ['O', 'H'] from [-93.57 -187.15] to [-93.60 -187.19]
(proper restoration)Output: Creates both updated checkpoint files AND frozen model for continued training
Documentation: Comprehensive documentation covering both TensorFlow and PyTorch backends with examples and backend-specific details
The implementation includes comprehensive test coverage with real model training to validate functionality without mocks.
Fixes #4018.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.