Skip to content
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

tree_util error handling throws error #25659

Open
Sohl-Dickstein opened this issue Dec 22, 2024 · 1 comment
Open

tree_util error handling throws error #25659

Sohl-Dickstein opened this issue Dec 22, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@Sohl-Dickstein
Copy link
Contributor

Description

I believe this and this line, should instead be:

        f"    {' '.join(str(k) for k in prefix_tree_keys)}\n"
...
        f"    {' '.join(str(k) for k in full_tree_keys)}\n"

I believe this, because I recently experienced the following error thrown inside this error handling:

...
  File "/root/.pyenv/versions/3.11.6/lib/python3.11/site-packages/jax/_src/pjit.py", line 1346, in _check_and_canonicalize_out_shardings
    out_shardings_flat = flatten_axis_resources(
                         ^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.pyenv/versions/3.11.6/lib/python3.11/site-packages/jax/_src/pjit.py", line 1121, in flatten_axis_resources
    raise e(what)
          ^^^^^^^
  File "/root/.pyenv/versions/3.11.6/lib/python3.11/site-packages/jax/_src/tree_util.py", line 1260, in <lambda>
    f"    {\' \'.join(str(k.key) for k in prefix_tree_keys)}\
"
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.pyenv/versions/3.11.6/lib/python3.11/site-packages/jax/_src/tree_util.py", line 1260, in <genexpr>
    f"    {\' \'.join(str(k.key) for k in prefix_tree_keys)}\
"
                        ^^^^^
AttributeError: \'GetAttrKey\' object has no attribute \'key\'

System info (python version, jaxlib version, accelerator, etc.)

not relevant

@Sohl-Dickstein Sohl-Dickstein added the bug Something isn't working label Dec 22, 2024
@mattjj
Copy link
Collaborator

mattjj commented Dec 23, 2024

@Sohl-Dickstein 😄 thanks for the fix! I’ll try to apply it tonight when I can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants