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

Add load class which loads model from local path #145

Closed
3 tasks done
MarleneKress79789 opened this issue Oct 20, 2023 · 0 comments · Fixed by #179
Closed
3 tasks done

Add load class which loads model from local path #145

MarleneKress79789 opened this issue Oct 20, 2023 · 0 comments · Fixed by #179
Assignees
Labels
feature New feature or request

Comments

@MarleneKress79789
Copy link
Collaborator

MarleneKress79789 commented Oct 20, 2023

Background:

  • Currently, we use from_pretrained with the cache_dir option to load the model and upload the cache directory to the BucketFS
  • The current approach in general works, but seems to check each time online if the model exists, or we have access and if we have the newest version
  • This is not possible in some deployments
  • To solve this issue, we could follow the following example using save_pretrained which stores the model into a directory which we then could upload
  • We can then load the model with from_pretrained from a local path
  • After we extracted the load class in Extract base_model_udf.load_models into separate class #144 , we can then create a new load function which loads the model from a local path during inference

Acceptance Criteria

Preview Give feedback
@MarleneKress79789 MarleneKress79789 added the feature New feature or request label Oct 20, 2023
@tkilias tkilias changed the title Add load function which loads model from local path Add load class which loads model from local path Oct 20, 2023
@MarleneKress79789 MarleneKress79789 self-assigned this Dec 13, 2023
MarleneKress79789 added a commit that referenced this issue Jan 30, 2024
* Added class for loading locally saved model
* made pipeline_factory private
*  switched to use Mock for mock pipeline
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants