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

Type erasure in GenericStorage #74

Open
XzzX opened this issue Nov 29, 2024 · 5 comments
Open

Type erasure in GenericStorage #74

XzzX opened this issue Nov 29, 2024 · 5 comments

Comments

@XzzX
Copy link
Contributor

XzzX commented Nov 29, 2024

Depending on the storage backend type information and more might get lost. How to deal with this when loading?

@pyiron/storage

@XzzX
Copy link
Contributor Author

XzzX commented Nov 29, 2024

We can extend every type to be a group/dict. This way we can store additional attributes like type, strides, ... However, this will have some overhead for plain types that might have been correct. What do you think?

@ligerzero-ai
Copy link
Contributor

ligerzero-ai commented Nov 29, 2024

every basic type you mean? or do you mean really every single possible conceivable datatype then undergoes a transformation that we do to it?

@XzzX
Copy link
Contributor Author

XzzX commented Nov 29, 2024

Everything that might get lost when stored in for example json format.

@XzzX
Copy link
Contributor Author

XzzX commented Nov 29, 2024

Another way would be to provide an additional parameter cls: type to the load API providing the type we want to get back.

@XzzX
Copy link
Contributor Author

XzzX commented Dec 2, 2024

@pyiron/storage Please think about it.

Currently, I am in favour of cls: type.

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