8000 inconsistent named shape representations · Issue #8182 · jax-ml/jax · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

inconsistent named shape representations #8182

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

Closed
froystig opened this issue Oct 12, 2021 · 3 comments
Closed

inconsistent named shape representations #8182

froystig opened this issue Oct 12, 2021 · 3 comments
Assignees
Labels
cleanup Code cleanups and improvements

Comments

@froystig
Copy link
Member

We inconsistently use both core.NamedShape and dict for named shapes. We should unify and use core.NamedShape everywhere.

It is possible that NamedShape needs some work too. Let's track that separately. This issue is only about using a consistent type, which we can upgrade as needed.

A particular issue in the current situation: dicts are not hashable, whereas NamedShape is. Shape information is assumed to be hashable. For example, api.ShapeDtypeStruct hashes its named_shape attribute with the assumption that doing so is valid. But this simply errs and we haven't been testing it (TypeError: unhashable type: 'dict').

cc @apaszke @jekbradbury

@froystig froystig added the bug Something isn't working label Oct 12, 2021
@froystig froystig added the cleanup Code cleanups and improvements label Oct 12, 2021
@froystig
Copy link
Member Author

#8183 fixes hashing issues for now.

@froystig froystig removed the bug Something isn't working label Oct 13, 2021
@yashk2810
Copy link
Collaborator

Closing this since NamedShape don't exist anymore. I found this issue in a TODO in SDS hash method.

@jakevdp jakevdp closed this as completed May 9, 2025
@yashk2810
Copy link
Collaborator

Haha, thanks Jake! I pressed the wrong button lol.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Code cleanups and improvements
Projects
None yet
Development

No branches or pull requests

5 participants
0