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

(misc) Deprecate some hf-inference specific features (wait-for-model header, can't override model's task, get_model_status, list_deployed_models) #2851

Merged
merged 9 commits into from
Feb 13, 2025

Conversation

Wauplin
Copy link
Contributor

@Wauplin Wauplin commented Feb 12, 2025

In this PR:

  • deprecate sentence-similarity (use feature-extraction instead) => not deprecated after all (see comment)
  • kill ability to override model's default task ([inference] Kill the ability to override a model's task huggingface.js#1199). This means a model will be either sentence-similarity, either feature-extraction but not both
  • deprecate get_model_status (will be replaced by HfApi.model_info
  • deprecate list_deployed_models (will be replaced by HfApi.list_models)
  • do not use X-wait-for-model anymore
  • raise on HTTP 503 => previously we were waiting for 1s and then retrying. Now that all models will be warm-only, if shouldn't get a 503 (and if we do so, we should raise and let the user define what they want to do)
  • remove Make sure '{request_parameters.task}' task is supported by the model. msg in error => since now task is necessarily supported otherwise it would have failed before

=> the http 503 thingy is a breaking change but mostly due to the fact that forbidding cold starts in Inference API is a breaking change => so not a problem

Related:

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

@Wauplin Wauplin changed the title (draft) deprecate some hf-inference specific features (misc) Deprecate some hf-inference specific features (wait-for-model header, sentence-similarity, get_model_status, list_deployed_models) Feb 12, 2025
@Wauplin Wauplin marked this pull request as ready for review February 12, 2025 17:21
Copy link
Contributor

@hanouticelina hanouticelina left a comment

Choose a reason for hiding this comment

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

thank you for taking care of this! @Wauplin

Copy link
Member

@julien-c julien-c left a comment

Choose a reason for hiding this comment

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

I'm not sure about

deprecate sentence-similarity (use feature-extraction instead)

given it'll still be a task on hf.co/tasks for the foreseeable future.

Personally i wouldn't remove it 🤷

Everything else LGTM

@Wauplin Wauplin changed the title (misc) Deprecate some hf-inference specific features (wait-for-model header, sentence-similarity, get_model_status, list_deployed_models) (misc) Deprecate some hf-inference specific features (wait-for-model header, can't override model's task, get_model_status, list_deployed_models) Feb 13, 2025
@Wauplin
Copy link
Contributor Author

Wauplin commented Feb 13, 2025

given it'll still be a task on hf.co/tasks for the foreseeable future.
Personally i wouldn't remove it 🤷

Ok I added it back in 4218f8d but removed the ability to call f"{self.base_url}/pipeline/{self.task}/{mapped_model}". This means a model can be used either with feature-extraction or sentence-similarity but not both

@julien-c
Copy link
Member

yes, perfect imo

…:huggingface/huggingface_hub into deprecate-hf-inference-specific-features
@Wauplin Wauplin merged commit b19ab11 into main Feb 13, 2025
17 checks passed
@Wauplin Wauplin deleted the deprecate-hf-inference-specific-features branch February 13, 2025 13:11
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.

4 participants