-
Notifications
You must be signed in to change notification settings - Fork 21
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
101 in memory model loading #102
101 in memory model loading #102
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great feature !
Could you add some test and potentially something in the tutorial to showcase the feature ?
Also ruff is complaining. |
yes definitely! |
I made this commit to fix the ruff issue |
I will wait for the tutorial to merge. |
…ary/molfeat into 101-in-memory-model-loading
I added a short tutorial section for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @kkovary
closes #101
Changelogs
This PR adds support for loading models directly into memory without saving them to a local cache. This is particularly useful for environments with limited local storage, such as serverless deployments.
Current implementation:
InMemoryModelStore
is created, inheriting fromModelStore
.download
method is overridden to load model data directly into memory.load
method is modified to work with the in-memory data.An alternative approach could be to add a flag to
ModelStore
with something likein_memory
that when set toTrue
, use in-memory loading logic; otherwise, use current caching behavior.Checklist:
feature
,fix
ortest
(or ask a maintainer to do it for you).discussion related to that PR