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

Flatten unflatten easydict #49

Open
adonnini opened this issue May 4, 2024 · 2 comments
Open

Flatten unflatten easydict #49

adonnini opened this issue May 4, 2024 · 2 comments

Comments

@adonnini
Copy link

adonnini commented May 4, 2024

Hi,
I am using easydict in my location prediction application.
I need to register the EasyDict as a pytree node with register_pytree_node
In order to do this I need to supply flatten and unflatten functions for easyDct.
Do you have code for flattening/unflattening easyDict. Could you give me an example?
Thanks,
AlexDonnini

@WaterLoran
Copy link

I don't know if you want to convert this easydict back to a regular dictionary. If so, please refer to my issue, I have already resolved it

#48

@adonnini
Copy link
Author

adonnini commented May 8, 2024

Thanks. No, I don't want to convert easydict to a regular dictionary, I just want functions to flatten and unflatten it as I need them for an app where I need to apply https://github.com/pytorch/pytorch/blob/394ec2da300e8933d8184ba862daed3a115d7fd9/torch/utils/_pytree.py#L163 to easyDict.

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