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

Cannot pickle KeyedRef object #699

Open
patrick-toulme opened this issue Jan 24, 2025 · 3 comments
Open

Cannot pickle KeyedRef object #699

patrick-toulme opened this issue Jan 24, 2025 · 3 comments

Comments

@patrick-toulme
Copy link

I am trying to dill dump a PyTorch FX Graph object. I am hitting this error. I am using recurse=True. Is this a known error?

TypeError: cannot pickle 'KeyedRef' object
@mmckerns
Copy link
Member

It'd be good to see the entire traceback, and even better if you post the traceback with dill.detect.trace(True). That would also let me know whether it's something that the pytorch developers should handle or not.

@patrick-toulme
Copy link
Author

I wrote my own pickler for KeyedRef. I also ran into problems pickling a WeakRef. Currently I am running into stack overflow. I enabled the trace and it looks to be going very deep into nested dictionaries.

@mmckerns
Copy link
Member

Ok, that sounds interesting. If you want to post your pickling traceback or a self-contained example that generates what you are seeing, that would help other folks to try to reproduce what you are seeing.

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

No branches or pull requests

2 participants