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

feat(huggingface): Merge model settings #1337

Merged
merged 2 commits into from
Aug 18, 2023
Merged

feat(huggingface): Merge model settings #1337

merged 2 commits into from
Aug 18, 2023

Conversation

jesse-c
Copy link
Contributor

@jesse-c jesse-c commented Aug 16, 2023

If settings for the model are provided in both the model-settings.json and environment variables, merge them.

Precedence is given to environment variables.

FIXES #1329

@jesse-c jesse-c self-assigned this Aug 16, 2023
@adriangonz adriangonz requested a review from agrski August 16, 2023 09:24
@jesse-c jesse-c marked this pull request as ready for review August 16, 2023 13:47
Copy link
Contributor

@adriangonz adriangonz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one! From my side, changes look great 👍

runtimes/huggingface/tests/test_settings.py Show resolved Hide resolved
Jesse Claven added 2 commits August 17, 2023 10:45
If settings for the model are provided in both the
`model-settings.json` *and* environment variables, merge them.

Precedence is given to environment variables.
The possible types are constrained in what's allowed. Specify this new
type that follows those constraints.
@jesse-c jesse-c requested a review from vtaskow August 17, 2023 14:24
@jesse-c
Copy link
Contributor Author

jesse-c commented Aug 17, 2023

Tested manually in clusters locally and in GKE with SCv1 and an image built by myself and pushed to Docker Hub (docker.io/jsldn/mlserver:1.4.0.dev3-huggingface).

I used a model-settings.json with a task: text-generation and had 2 deployments, 1 with no overwrite and 1 with overwrote with an env var for a task: question-answering. I used Seldon Deploy to run predictions against them both and received the expected results.

cc: @agrski, @adriangonz

Copy link
Contributor

@vtaskow vtaskow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! Nothing more to say

@jesse-c jesse-c merged commit 10aa233 into SeldonIO:master Aug 18, 2023
26 checks passed
@jesse-c jesse-c deleted the 1329-merge-huggingface-settings branch August 18, 2023 13:23
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

Successfully merging this pull request may close these issues.

[huggingface] Merge predictive unit parameters from env with model settings
3 participants