Support JAX multitask training and finetuning - #234
Open
Romarin87 wants to merge 27 commits into
Open
Conversation
…5297) ## Summary - switch the `package_c` Docker build image from TensorFlow 2.18 to 2.20 - pin the installed TensorFlow wheel to `==2.20.*` via the existing `TENSORFLOW_VERSION` env ## Why The failing `Build C library` job appears to be in `package_c.yml`, not in the `cibuildwheel` workflow changed by dependabot. This change makes the Docker image and installed TensorFlow version move together, so we can test whether the failure was caused by a TensorFlow / GLIBC mismatch from pulling a newer wheel into an older build image. Authored by OpenClaw (model: gpt-5.4) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Updated C library build configuration to target TensorFlow 2.20, aligning the build matrix with the newer TensorFlow runtime. <!-- end of auto-generated comment: release notes by coderabbit.ai --> (cherry picked from commit 084edd6)
See tensorflow/tensorflow@23f7b26 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Updated TensorFlow versions and added protobuf constraints for improved stability across CPU and GPU configurations. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: Jinzhe Zeng <jinzhe.zeng@ustc.edu.cn> (cherry picked from commit 21d2b1a)
Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) from 3.3 to 3.4. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/pypa/cibuildwheel/releases">pypa/cibuildwheel's releases</a>.</em></p> <blockquote> <h2>v3.4.0</h2> <ul> <li>🌟 You can now build wheels using <code>uv</code> as a build frontend. This should improve performance, especially if your project has lots of build dependencies. To use, set <a href="https://cibuildwheel.pypa.io/en/stable/options/#build-frontend"><code>build-frontend</code></a> to <code>uv</code>. (<a href="https://redirect.github.com/pypa/cibuildwheel/issues/2322">#2322</a>)</li> <li>⚠️ We no longer support running on Travis CI. It may continue working but we don't run tests there anymore so we can't be sure. (<a href="https://redirect.github.com/pypa/cibuildwheel/issues/2682">#2682</a>)</li> <li>✨ Improvements to building rust wheels on Android (<a href="https://redirect.github.com/pypa/cibuildwheel/issues/2650">#2650</a>)</li> <li>🐛 Fix bug with the GitHub Action on Windows, where PATH was getting unnecessarily changed, causing issues with meson builds. (<a href="https://redirect.github.com/pypa/cibuildwheel/issues/2723">#2723</a>)</li> <li>✨ Add support for quiet setting on <code>build</code> and <code>uv</code> from the cibuildwheel <code>build-verbosity</code> setting. (<a href="https://redirect.github.com/pypa/cibuildwheel/issues/2737">#2737</a>)</li> <li>📚 Docs updates, including guidance on using Meson on Windows (<a href="https://redirect.github.com/pypa/cibuildwheel/issues/2718">#2718</a>)</li> </ul> <h2>v3.3.1</h2> <ul> <li>🛠 Update dependencies and container pins, including updating to CPython 3.14.2. (<a href="https://redirect.github.com/pypa/cibuildwheel/issues/2708">#2708</a>)</li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/pypa/cibuildwheel/blob/main/docs/changelog.md">pypa/cibuildwheel's changelog</a>.</em></p> <blockquote> <hr /> <h2>title: Changelog</h2> <h1>Changelog</h1> <h3>v3.4.0</h3> <p><em>5 March 2026</em></p> <ul> <li>🌟 You can now build wheels using <code>uv</code> as a build frontend. This should improve performance, especially if your project has lots of build dependencies. To use, set <a href="https://cibuildwheel.pypa.io/en/stable/options/#build-frontend"><code>build-frontend</code></a> to <code>uv</code>. (<a href="https://redirect.github.com/pypa/cibuildwheel/issues/2322">#2322</a>)</li> <li>⚠️ We no longer support running on Travis CI. It may continue working but we don't run tests there anymore so we can't be sure. (<a href="https://redirect.github.com/pypa/cibuildwheel/issues/2682">#2682</a>)</li> <li>✨ Improvements to building rust wheels on Android (<a href="https://redirect.github.com/pypa/cibuildwheel/issues/2650">#2650</a>)</li> <li>🐛 Fix bug with the GitHub Action on Windows, where PATH was getting unnecessarily changed, causing issues with meson builds. (<a href="https://redirect.github.com/pypa/cibuildwheel/issues/2723">#2723</a>)</li> <li>✨ Add support for quiet setting on <code>build</code> and <code>uv</code> from the cibuildwheel <code>build-verbosity</code> setting. (<a href="https://redirect.github.com/pypa/cibuildwheel/issues/2737">#2737</a>)</li> <li>📚 Docs updates, including guidance on using Meson on Windows (<a href="https://redirect.github.com/pypa/cibuildwheel/issues/2718">#2718</a>)</li> </ul> <h3>v3.3.1</h3> <p><em>5 January 2026</em></p> <ul> <li>🛠 Update dependencies and container pins, including updating to CPython 3.14.2. (<a href="https://redirect.github.com/pypa/cibuildwheel/issues/2708">#2708</a>)</li> </ul> <h3>v3.3.0</h3> <p><em>12 November 2025</em></p> <ul> <li>🐛 Fix an incompatibility with Docker v29 (<a href="https://redirect.github.com/pypa/cibuildwheel/issues/2660">#2660</a>)</li> <li>✨ Adds <code>test-runtime</code> option, to customise how tests on simulated/emulated environments are run (<a href="https://redirect.github.com/pypa/cibuildwheel/issues/2636">#2636</a>)</li> <li>✨ Adds support for new <code>manylinux_2_35</code> images on 32-bit ARM <code>armv7l</code>, offering better C++20 compatibility (<a href="https://redirect.github.com/pypa/cibuildwheel/issues/2656">#2656</a>)</li> <li>✨ <code>build[uv]</code> is now supported on Android (<a href="https://redirect.github.com/pypa/cibuildwheel/issues/2587">#2587</a>)</li> <li>✨ You can now install extras (such as <code>uv</code>) with a simple option on the GitHub Action (<a href="https://redirect.github.com/pypa/cibuildwheel/issues/2630">#2630</a>)</li> <li>✨ <code>{project}</code> and <code>{package}</code> placeholders are now supported in <code>repair-wheel-command</code> (<a href="https://redirect.github.com/pypa/cibuildwheel/issues/2589">#2589</a>)</li> <li>🛠 The versions set with <code>dependency-versions</code> no longer constrain packages specified by your <code>build-system.requires</code>. Previously, on platforms other than Linux, the constraints in this option would remain in the environment during the build. This has been tidied up make behaviour more consistent between platforms, and to prevent version conflicts. (<a href="https://redirect.github.com/pypa/cibuildwheel/issues/2583">#2583</a>)</li> <li>🛠 Improve the handling of <code>test-command</code> on Android, enabling more options to be passed (<a href="https://redirect.github.com/pypa/cibuildwheel/issues/2590">#2590</a>)</li> <li>📚 Docs improvements (<a href="https://redirect.github.com/pypa/cibuildwheel/issues/2618">#2618</a>)</li> </ul> <h3>v3.2.1</h3> <p><em>12 October 2025</em></p> <ul> <li>🛠 Update to CPython 3.14.0 final (<a href="https://redirect.github.com/pypa/cibuildwheel/issues/2614">#2614</a>)</li> <li>🐛 Fix the default MACOSX_DEPLOYMENT_TARGET on Python 3.14 (<a href="https://redirect.github.com/pypa/cibuildwheel/issues/2613">#2613</a>)</li> <li>📚 Docs improvements (<a href="https://redirect.github.com/pypa/cibuildwheel/issues/2617">#2617</a>)</li> </ul> <h3>v3.2.0</h3> <p><em>22 September 2025</em></p> <ul> <li>✨ Adds GraalPy v25 (Python 3.12) support (<a href="https://redirect.github.com/pypa/cibuildwheel/issues/2597">#2597</a>)</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/pypa/cibuildwheel/commit/ee02a1537ce3071a004a6b08c41e72f0fdc42d9a"><code>ee02a15</code></a> Bump version: v3.4.0</li> <li><a href="https://github.com/pypa/cibuildwheel/commit/f08ce70d7891b3a6b3d41f7909a69816eeea643b"><code>f08ce70</code></a> chore: match copyright to BSD-2-clause template (<a href="https://redirect.github.com/pypa/cibuildwheel/issues/2758">#2758</a>)</li> <li><a href="https://github.com/pypa/cibuildwheel/commit/95b4b79b96bae59effea03a5f297b0cb5aa31b6b"><code>95b4b79</code></a> Fix incorrect document regarding pyodide auditwheel (<a href="https://redirect.github.com/pypa/cibuildwheel/issues/2752">#2752</a>)</li> <li><a href="https://github.com/pypa/cibuildwheel/commit/f046d0a94dc550b5dccb93ae748704599fa1f9ae"><code>f046d0a</code></a> Bump to Pyodide v0.29.3 (<a href="https://redirect.github.com/pypa/cibuildwheel/issues/2743">#2743</a>)</li> <li><a href="https://github.com/pypa/cibuildwheel/commit/f5a31ee79d1dfd39a9a0a87d7cd412a29afb8fe1"><code>f5a31ee</code></a> chore(deps): bump the actions group across 1 directory with 4 updates (<a href="https://redirect.github.com/pypa/cibuildwheel/issues/2755">#2755</a>)</li> <li><a href="https://github.com/pypa/cibuildwheel/commit/35ec4565f5ca3474c283a0852fdf512d5817850f"><code>35ec456</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://redirect.github.com/pypa/cibuildwheel/issues/2756">#2756</a>)</li> <li><a href="https://github.com/pypa/cibuildwheel/commit/51fed90270069c1f2ae3c075bcd6b0dad1d739c2"><code>51fed90</code></a> [Bot] Update dependencies (<a href="https://redirect.github.com/pypa/cibuildwheel/issues/2734">#2734</a>)</li> <li><a href="https://github.com/pypa/cibuildwheel/commit/b70562f37a2c65580ef235073974d067233fa82a"><code>b70562f</code></a> Debug GraalPy/uv test failures on Windows (<a href="https://redirect.github.com/pypa/cibuildwheel/issues/2741">#2741</a>)</li> <li><a href="https://github.com/pypa/cibuildwheel/commit/0a85e29549d1fd12d1ee07727cb55c39e16173a5"><code>0a85e29</code></a> Work around CDN rate limiting on Python.org in bin/update_pythons.py (<a href="https://redirect.github.com/pypa/cibuildwheel/issues/2753">#2753</a>)</li> <li><a href="https://github.com/pypa/cibuildwheel/commit/2d33864bafd35e54234e57c036c38cd59288543c"><code>2d33864</code></a> Pin the actions/setup-python for the externally used action.yml (<a href="https://redirect.github.com/pypa/cibuildwheel/issues/2749">#2749</a>)</li> <li>Additional commits viewable in <a href="https://github.com/pypa/cibuildwheel/compare/v3.3...v3.4">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> (cherry picked from commit 24e54bf)
Backports CI baseline fixes from devel into parallel: - align package_c TensorFlow build image and wheel to 2.20 - pin protobuf<7.34 for TensorFlow CI compatibility - bump pypa/cibuildwheel from 3.3 to 3.4
feat(jax): align finetune and multitask PT parity
Problem - flake8 is redundant with ruff in pre-commit and adds extra dependency/latency. Change - Remove the flake8 repo hook from .pre-commit-config.yaml. Authored by OpenClaw (model: gpt-5.2) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Removed Flake8 linting tool from the development pre-commit pipeline. This change reduces external dependencies and maintenance overhead for developers. The pre-commit pipeline continues to function normally with other configured quality checks remaining active. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
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.
Summary
This PR extends the JAX backend on the
parallelbranch with multitask training, finetuning, init/frozen-model loading fixes, mixed-system stat handling, and related serialization/freeze support.The main goal is to bring the JAX training path closer to the PyTorch multitask/finetune behavior while preserving existing single-task training.
Base:
njzjz/deepmd-kit:parallelHead:
Romarin87/deepmd-kit:parallelMain Changes
JAX multitask training
ModelWrappersupport formodel_dictmultitask models.shared_dict.type_map, descriptor, fitting net, and hybrid descriptor subcomponents.JAX finetuning
.jax/.hlomodels.model_branch/finetune_headbehavior.trainableflags while optionally loading compatible pretrained model parameters.init-frz-model.natomsare expanded per frame.real_natoms_vecduring finetune bias statistics when mixed/padded data provides true atom counts.Serialization and freeze
freezeto export a selected multitask branch viahead/model_branch.JAX compatibility fixes
PartitionSpecdevice_put issues on older JAX.record_scalar.Mixed-system statistics and padding
real_natoms_vecfor mixed-type fitting statistics.(3 * Nmax)^2, not ordinaryNmax * ndofatomic-label width.CI/dependency fixes
cibuildwheeltov3.4.Tests Added
source/tests/jax/test_finetune.pysource/tests/jax/test_multitask.pysource/tests/common/test_model_stat.pyThese cover:
Validation
pre-commit.ci - pr: passing