Skip to content

feat(huggingface): Merge model settings#1337

Merged
jesse-c merged 2 commits into
SeldonIO:masterfrom
jesse-c:1329-merge-huggingface-settings
Aug 18, 2023
Merged

feat(huggingface): Merge model settings#1337
jesse-c merged 2 commits into
SeldonIO:masterfrom
jesse-c:1329-merge-huggingface-settings

Conversation

@jesse-c

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

Copy link
Copy Markdown
Contributor

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 requested a review from adriangonz August 16, 2023 09:15
@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

@adriangonz adriangonz left a comment

Copy link
Copy Markdown
Contributor

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 👍

Comment thread runtimes/huggingface/tests/test_settings.py
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

jesse-c commented Aug 17, 2023

Copy link
Copy Markdown
Contributor Author

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

@vtaskow vtaskow left a comment

Copy link
Copy Markdown
Contributor

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
@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