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

Fix: do not erase existing values on update_inference_endpoint #2476

Merged
merged 1 commit into from
Aug 21, 2024

Conversation

Wauplin
Copy link
Contributor

@Wauplin Wauplin commented Aug 21, 2024

Fix #2472 @MoritzLaurer

Previously on update_inference_endpoint, all fields in the payload were populated by default with None values. This lead to a weird side effect which overwrites some existing values with empty ones. In particular, updating any settings of an inference endpoint deletes its environment variables. This PR fixes this by sending only not-none values.

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Contributor

@MoritzLaurer MoritzLaurer left a comment

Choose a reason for hiding this comment

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

LGTM! (didn't rerun the branch)

@Wauplin
Copy link
Contributor Author

Wauplin commented Aug 21, 2024

Thanks for the review!

@Wauplin Wauplin merged commit 7d98441 into main Aug 21, 2024
15 of 17 checks passed
@Wauplin Wauplin deleted the 2472-fix-inference-endpoint-update branch August 21, 2024 12:56
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.

endpoint.update() removes environment variables of endpoint
3 participants