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

Conversation

jesse-c
Copy link
Member

@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
@jesse-c jesse-c force-pushed the 1329-merge-huggingface-settings branch from 1063980 to 2ac7484 Compare August 16, 2023 09:13
@adriangonz adriangonz requested a review from agrski August 16, 2023 09:24
@jesse-c jesse-c force-pushed the 1329-merge-huggingface-settings branch 5 times, most recently from 9d6d80b to cb68b16 Compare August 16, 2023 13:32
@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-c jesse-c force-pushed the 1329-merge-huggingface-settings branch 4 times, most recently from 2180208 to 80bbc4f Compare August 17, 2023 09:42
If settings for the model are provided in both the
`model-settings.json` *and* environment variables, merge them.

Precedence is given to environment variables.
@jesse-c jesse-c force-pushed the 1329-merge-huggingface-settings branch from 80bbc4f to a7835a4 Compare August 17, 2023 09:45
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
Member 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
27 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