Skip to content

Better hashing of generic objects #776

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

Open
tclose opened this issue Apr 1, 2025 · 2 comments
Open

Better hashing of generic objects #776

tclose opened this issue Apr 1, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@tclose
Copy link
Contributor

tclose commented Apr 1, 2025

Currently the hashing of generic objects is a bit brittle, for example torch.Tensor objects don't have an empty __dict__ so they all get hashed to the same value. An option is to iterate through all the attributes in __dir__ and find all the non-method/property attributes to make a hash out of, this could be quite difficult to do generically though...

@tclose tclose converted this from a draft issue Apr 1, 2025
@tclose tclose added the bug Something isn't working label Apr 1, 2025
@tclose tclose moved this from Proposed to temp in Pydra Roadmap Apr 29, 2025
@tclose tclose moved this from temp to To do (v1.0) in Pydra Roadmap Apr 29, 2025
@tclose
Copy link
Contributor Author

tclose commented Apr 29, 2025

Also see PR #762, that attempts to address "numpylike" objects

@tclose
Copy link
Contributor Author

tclose commented May 8, 2025

Related to #767

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
Status: v1.0
Development

No branches or pull requests

1 participant