Skip to content

Conversation

ReNothingg
Copy link

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
Author

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

Copy link
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
Contributor

apghml commented Jul 30, 2025

Also please resolve any merge conflicts.

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.

5 participants