huggingface / huggingface_hub

The official Python client for the Huggingface Hub.
https://huggingface.co/docs/huggingface_hub
Apache License 2.0
2.12k stars 556 forks source link

Fix: do not erase existing values on `update_inference_endpoint` #2476

Closed Wauplin closed 3 months ago

Wauplin commented 3 months ago

Fix https://github.com/huggingface/huggingface_hub/issues/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 commented 3 months ago

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.

Wauplin commented 3 months ago

Thanks for the review!