Skip to content

Update JAX API usage to latest version#1317

Closed
ReNothingg wants to merge 9 commits intoapple:mainfrom
ReNothingg:main
Closed

Update JAX API usage to latest version#1317
ReNothingg wants to merge 9 commits intoapple:mainfrom
ReNothingg:main

Conversation

@ReNothingg
Copy link
Copy Markdown

We need to update the JAX API usage across the codebase to use the latest stable versions.

Changes Required

  1. Replace jax.tree_util with jax.tree:
  • Update all imports
  • Replace all usages of tree_util functions
  1. Update pytree registration:
  • Use register_pytree_with_keys instead of register_pytree_node
  • Update flattening/unflattening functions to use new key types
  • Update registration calls
  1. Update tree traversal operations:
  • Replace tree_map with new API version
  • Update tree manipulation functions
  • Modernize tree-related utilities

Files to Modify

Key files that need updates:

  • axlearn/common/struct.py
  • axlearn/common/utils.py
  • axlearn/common/metrics.py
  • axlearn/common/learner.py
  • Other files using JAX tree operations

Implementation Details

  1. For each file:
  • Scan for JAX tree API usage
  • Update imports
  • Replace deprecated functions
  • Update function signatures
  • Add type hints where missing
  1. Testing:
  • Run all tests with latest JAX
  • Verify no regressions
  • Check backward compatibility
  • Add new tests if needed

Success Criteria

  • All tests pass with latest JAX version
  • No functionality changes
  • Clean deprecation warnings
  • Improved type safety
  • Backward compatible changes

changlan and others added 5 commits July 23, 2025 23:26
Make sure sink's contribution is added once. Also added tests.

GitOrigin-RevId: 8de870c
GitOrigin-RevId: 56cf7e8
* pin nccl version

* empty commit

* add actual pacakge

* trigger new build to address flaky test

* Update pyproject.toml

GitOrigin-RevId: b8653ad
@ReNothingg ReNothingg requested a review from a team as a code owner July 25, 2025 18:40
@ReNothingg
Copy link
Copy Markdown
Author

Hi, the workflows need approval to run (GitHub Actions are pending). Can someone with write access approve and run them? @ruomingp pls

Comment thread axlearn/common/metrics.py Outdated
Comment thread axlearn/common/struct.py
Comment thread axlearn/common/utils.py Outdated
Comment thread axlearn/common/utils.py Outdated
Copy link
Copy Markdown
Contributor

@apghml apghml left a comment

Choose a reason for hiding this comment

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

Some of these changes have the potential to break things and don't seem to be necessary, as @changlan mentioned. Could you explain for every change, why it is necessary? Also, please do not mark comments as resolved yourself. To streamline reviewing, we only have PR reviewers mark comments as resolved.

@apghml
Copy link
Copy Markdown
Contributor

apghml commented Jul 30, 2025

Also please resolve any merge conflicts.

@github-actions
Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has been inactive for 60 days. It will be closed in 7 days if no further activity occurs. If you would like to continue working on this, please remove the stale label or leave a comment.

@github-actions github-actions Bot added the stale label Oct 19, 2025
@github-actions github-actions Bot removed the stale label Oct 29, 2025
@github-actions
Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has been inactive for 60 days. It will be closed in 7 days if no further activity occurs. If you would like to continue working on this, please remove the stale label or leave a comment.

@github-actions github-actions Bot added the stale label Dec 28, 2025
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jan 5, 2026

This pull request was closed because it has been inactive for more than 7 days since being marked as stale. Please feel free to reopen it if you would like to continue.

@github-actions github-actions Bot closed this Jan 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants