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

Don't use bumps vfs to load models from zip files #154

Open
pkienzle opened this issue Sep 30, 2022 · 0 comments
Open

Don't use bumps vfs to load models from zip files #154

pkienzle opened this issue Sep 30, 2022 · 0 comments

Comments

@pkienzle
Copy link
Member

When loading models from zip files use the safe and boring process of expanding the zip file into a temporary directory and loading the model from there.

The challenge is in cleanup. For arbitrary python model files we do not know when we are "done" with the directory. It may be that the model needs a special function in some rare condition that is lazy-loaded from the model directory so technically we would need to keep it around while the problem is in memory. (Maybe attach the cleanup to the problem delete hook?) In practice, however, the directory will not be needed after the model is loaded and can be deleted immediately. So long as we document the behaviour the user can adjust the model file to load everything they will need when they define the problem.

Another possibility is that we can expand the zip file into the store directory. This works from the CLI where we require a store directory before starting the fit but not from the GUI.

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

1 participant