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

[Task] Enable pickle serialzation of Models with Merlin Schema Saved alongside #928

Closed
oliverholworthy opened this issue Dec 19, 2022 · 0 comments · Fixed by #930
Closed
Assignees
Labels
bug Something isn't working
Milestone

Comments

@oliverholworthy
Copy link
Member

Description

Enable pickle serialzation of Models with Merlin Schema Saved alongside.

Part of #669

Additional context

Noticed on this PR NVIDIA-Merlin/Merlin#770

We currently get a FileNotFoundError when tryting to pickle a model.

This is because keras uses the tf.io in-memory filesystem which I think is a tensorflow io feature (I've not seen ram:// used outside of this context at least) when trying to pickle a model. And to use this RAM filesystem, you can't use regular python file io functionality it seems. We'll need to use tf.io functions to write things into this in-memory filesystem.

This looks like it's been replaced in TF 2.11 by a regular regular temporary directory on disk. However, since we currently aim to support versions back to TF 2.8, will need to handle both cases now.

@oliverholworthy oliverholworthy added the bug Something isn't working label Dec 19, 2022
@oliverholworthy oliverholworthy added this to the Merlin 22.12 milestone Dec 19, 2022
@oliverholworthy oliverholworthy self-assigned this Dec 19, 2022
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
None yet
Development

Successfully merging a pull request may close this issue.

1 participant