-
Notifications
You must be signed in to change notification settings - Fork 840
[CLI] Add Inference Endpoints Commands #3428
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
Conversation
* first httpx integration * more migration * some fixes * download workflow should work * Fix repocard and error utils tests * fix hf-file-system * gix http utils tests * more fixes * fix some inference tests * fix test_file_download tests * async inference client * async code should be good * Define RemoteEntryFileNotFound explicitly (+some fixes) * fix async code quality * torch ok * fix hf_file_system * fix errors tests * mock * fix test_cli mock * fix commit scheduler * add fileno test * no more requests anywhere * fix test_file_download * tmp requests * Update src/huggingface_hub/utils/_http.py Co-authored-by: célina <[email protected]> * Update src/huggingface_hub/utils/_http.py Co-authored-by: célina <[email protected]> * Update src/huggingface_hub/hf_file_system.py Co-authored-by: célina <[email protected]> * not async * fix tests --------- Co-authored-by: célina <[email protected]>
* Bump minimal version to Python3.9 * use built-in generics * code quality * new batch * yet another btach * fix dataclass_with_extra * fix * keep Type for strict dataclasses * fix test
* remove constants.-hf_cache_home * remove smoothly_deprecate_use_auth_token * remove get_token_permission * remove update_repo_visibility * remove is_write_action arg * remove write_permission arg from login methods * new parameter skip_if_logged_in in login methods * Remove resume_download / force_filename parameters * Remove deprecated local_dir_use_symlinks parameter * Remove deprecated language, library, task, tags from list_models * Return commit URL in upload_file/upload_folder (previously url to file/folder on the Hub) * fix upload_file/upload_folder tests * smoothly_deprecate_legacy_arguments everywhere * code quality * fix tests * fix xet tests
* Remove Repository class + adapt docs * remove fr git_vs_http
* Remove imports kept only for backward compatibility * fix tests
* Remove keras2 utilities * remove keras from init
* Remove anything tensorflow-related + deps * init * fix tests * fix conflicts in tests
* HTTP configuration docs * http configuration docs * refactored git_vs_http * fix import * fix docs? * Update docs/source/en/package_reference/utilities.md Co-authored-by: célina <[email protected]> --------- Co-authored-by: célina <[email protected]>
* Refactor CLI implementation using Typer (#3365) * migrate CLI to typer * (#3364) disable rich in all cases * update tests * make typer-slim a required dep * use Annotated * fix linting issues * fix tests * refactoring * update docs * use built in types * fix mypy * call whoami directly * lint * Apply suggestions from code review Co-authored-by: Lucain <[email protected]> * import Annotated from typing * Use Enums * set verbosity globally * refactor scan cache and update version docstring * centralize where Typer is defined * no need for ... * rename enum * no need for extra param name * docstring * revert * centralize arguments and options definition * add library version when initializing HfApi * add auto-completion * sort commands alphabetically * suggestions * centralize jobs params and HfApi initialization * fix --------- Co-authored-by: Lucain <[email protected]> * update docs --------- Co-authored-by: Lucain <[email protected]>
* [1.0] Httpx migration (#3328) * first httpx integration * more migration * some fixes * download workflow should work * Fix repocard and error utils tests * fix hf-file-system * gix http utils tests * more fixes * fix some inference tests * fix test_file_download tests * async inference client * async code should be good * Define RemoteEntryFileNotFound explicitly (+some fixes) * fix async code quality * torch ok * fix hf_file_system * fix errors tests * mock * fix test_cli mock * fix commit scheduler * add fileno test * no more requests anywhere * fix test_file_download * tmp requests * Update src/huggingface_hub/utils/_http.py Co-authored-by: célina <[email protected]> * Update src/huggingface_hub/utils/_http.py Co-authored-by: célina <[email protected]> * Update src/huggingface_hub/hf_file_system.py Co-authored-by: célina <[email protected]> * not async * fix tests --------- Co-authored-by: célina <[email protected]> * Bump minimal version to Python3.9 (#3343) * Bump minimal version to Python3.9 * use built-in generics * code quality * new batch * yet another btach * fix dataclass_with_extra * fix * keep Type for strict dataclasses * fix test * Remove `HfFolder` and `InferenceAPI` classes (#3344) * Remove HfFolder * Remove InferenceAPI * more recent gradio * bump pytest * fix python 3.9? * install gradio only on python 3.10+ * fix tests * fix tests * fix * [v1.0] Remove more deprecated stuff (#3345) * remove constants.-hf_cache_home * remove smoothly_deprecate_use_auth_token * remove get_token_permission * remove update_repo_visibility * remove is_write_action arg * remove write_permission arg from login methods * new parameter skip_if_logged_in in login methods * Remove resume_download / force_filename parameters * Remove deprecated local_dir_use_symlinks parameter * Remove deprecated language, library, task, tags from list_models * Return commit URL in upload_file/upload_folder (previously url to file/folder on the Hub) * fix upload_file/upload_folder tests * smoothly_deprecate_legacy_arguments everywhere * code quality * fix tests * fix xet tests * [v1.0] Remove `Repository` class (#3346) * Remove Repository class + adapt docs * remove fr git_vs_http * bump to 1.0.0.dev0 * Remove _deprecate_positional_args on login methods (#3349) * [v1.0] Remove imports kept only for backward compatibility (#3350) * Remove imports kept only for backward compatibility * fix tests * [v1.0] Remove keras2 utilities (#3352) * Remove keras2 utilities * remove keras from init * [v1.0] Remove anything tensorflow-related + deps (#3354) * Remove anything tensorflow-related + deps * init * fix tests * fix conflicts in tests * Release: v1.0.0.rc0 * [v1.0] Update "HTTP backend" docs + `git_vs_http` guide (#3357) * HTTP configuration docs * http configuration docs * refactored git_vs_http * fix import * fix docs? * Update docs/source/en/package_reference/utilities.md Co-authored-by: célina <[email protected]> --------- Co-authored-by: célina <[email protected]> * Refactor CLI implementation using Typer (#3372) * Refactor CLI implementation using Typer (#3365) * migrate CLI to typer * (#3364) disable rich in all cases * update tests * make typer-slim a required dep * use Annotated * fix linting issues * fix tests * refactoring * update docs * use built in types * fix mypy * call whoami directly * lint * Apply suggestions from code review Co-authored-by: Lucain <[email protected]> * import Annotated from typing * Use Enums * set verbosity globally * refactor scan cache and update version docstring * centralize where Typer is defined * no need for ... * rename enum * no need for extra param name * docstring * revert * centralize arguments and options definition * add library version when initializing HfApi * add auto-completion * sort commands alphabetically * suggestions * centralize jobs params and HfApi initialization * fix --------- Co-authored-by: Lucain <[email protected]> * update docs --------- Co-authored-by: Lucain <[email protected]> * add hf repo delete command * add repo settings, repo move, repo branch commands * fix test * Apply suggestions from code review Co-authored-by: Lucain <[email protected]> --------- Co-authored-by: Lucain <[email protected]> Co-authored-by: Lucain Pouget <[email protected]>
* add docs for new hf commands * typo * add cli examples in repository
* [1.0] Httpx migration (#3328) * first httpx integration * more migration * some fixes * download workflow should work * Fix repocard and error utils tests * fix hf-file-system * gix http utils tests * more fixes * fix some inference tests * fix test_file_download tests * async inference client * async code should be good * Define RemoteEntryFileNotFound explicitly (+some fixes) * fix async code quality * torch ok * fix hf_file_system * fix errors tests * mock * fix test_cli mock * fix commit scheduler * add fileno test * no more requests anywhere * fix test_file_download * tmp requests * Update src/huggingface_hub/utils/_http.py Co-authored-by: célina <[email protected]> * Update src/huggingface_hub/utils/_http.py Co-authored-by: célina <[email protected]> * Update src/huggingface_hub/hf_file_system.py Co-authored-by: célina <[email protected]> * not async * fix tests --------- Co-authored-by: célina <[email protected]> * Bump minimal version to Python3.9 (#3343) * Bump minimal version to Python3.9 * use built-in generics * code quality * new batch * yet another btach * fix dataclass_with_extra * fix * keep Type for strict dataclasses * fix test * Remove `HfFolder` and `InferenceAPI` classes (#3344) * Remove HfFolder * Remove InferenceAPI * more recent gradio * bump pytest * fix python 3.9? * install gradio only on python 3.10+ * fix tests * fix tests * fix * [v1.0] Remove more deprecated stuff (#3345) * remove constants.-hf_cache_home * remove smoothly_deprecate_use_auth_token * remove get_token_permission * remove update_repo_visibility * remove is_write_action arg * remove write_permission arg from login methods * new parameter skip_if_logged_in in login methods * Remove resume_download / force_filename parameters * Remove deprecated local_dir_use_symlinks parameter * Remove deprecated language, library, task, tags from list_models * Return commit URL in upload_file/upload_folder (previously url to file/folder on the Hub) * fix upload_file/upload_folder tests * smoothly_deprecate_legacy_arguments everywhere * code quality * fix tests * fix xet tests * [v1.0] Remove `Repository` class (#3346) * Remove Repository class + adapt docs * remove fr git_vs_http * bump to 1.0.0.dev0 * Remove _deprecate_positional_args on login methods (#3349) * [v1.0] Remove imports kept only for backward compatibility (#3350) * Remove imports kept only for backward compatibility * fix tests * [v1.0] Remove keras2 utilities (#3352) * Remove keras2 utilities * remove keras from init * [v1.0] Remove anything tensorflow-related + deps (#3354) * Remove anything tensorflow-related + deps * init * fix tests * fix conflicts in tests * Release: v1.0.0.rc0 * [v1.0] Update "HTTP backend" docs + `git_vs_http` guide (#3357) * HTTP configuration docs * http configuration docs * refactored git_vs_http * fix import * fix docs? * Update docs/source/en/package_reference/utilities.md Co-authored-by: célina <[email protected]> --------- Co-authored-by: célina <[email protected]> * Refactor CLI implementation using Typer (#3372) * Refactor CLI implementation using Typer (#3365) * migrate CLI to typer * (#3364) disable rich in all cases * update tests * make typer-slim a required dep * use Annotated * fix linting issues * fix tests * refactoring * update docs * use built in types * fix mypy * call whoami directly * lint * Apply suggestions from code review Co-authored-by: Lucain <[email protected]> * import Annotated from typing * Use Enums * set verbosity globally * refactor scan cache and update version docstring * centralize where Typer is defined * no need for ... * rename enum * no need for extra param name * docstring * revert * centralize arguments and options definition * add library version when initializing HfApi * add auto-completion * sort commands alphabetically * suggestions * centralize jobs params and HfApi initialization * fix --------- Co-authored-by: Lucain <[email protected]> * update docs --------- Co-authored-by: Lucain <[email protected]> * add installers * fix windows * fix log * fix workflow? * fix workflow again * add debugging steps * fix * remove bin dir and install dir params * update workflow * remove version param * document usage * [1.0] Httpx migration (#3328) * first httpx integration * more migration * some fixes * download workflow should work * Fix repocard and error utils tests * fix hf-file-system * gix http utils tests * more fixes * fix some inference tests * fix test_file_download tests * async inference client * async code should be good * Define RemoteEntryFileNotFound explicitly (+some fixes) * fix async code quality * torch ok * fix hf_file_system * fix errors tests * mock * fix test_cli mock * fix commit scheduler * add fileno test * no more requests anywhere * fix test_file_download * tmp requests * Update src/huggingface_hub/utils/_http.py Co-authored-by: célina <[email protected]> * Update src/huggingface_hub/utils/_http.py Co-authored-by: célina <[email protected]> * Update src/huggingface_hub/hf_file_system.py Co-authored-by: célina <[email protected]> * not async * fix tests --------- Co-authored-by: célina <[email protected]> * Bump minimal version to Python3.9 (#3343) * Bump minimal version to Python3.9 * use built-in generics * code quality * new batch * yet another btach * fix dataclass_with_extra * fix * keep Type for strict dataclasses * fix test * Remove `HfFolder` and `InferenceAPI` classes (#3344) * Remove HfFolder * Remove InferenceAPI * more recent gradio * bump pytest * fix python 3.9? * install gradio only on python 3.10+ * fix tests * fix tests * fix * [v1.0] Remove more deprecated stuff (#3345) * remove constants.-hf_cache_home * remove smoothly_deprecate_use_auth_token * remove get_token_permission * remove update_repo_visibility * remove is_write_action arg * remove write_permission arg from login methods * new parameter skip_if_logged_in in login methods * Remove resume_download / force_filename parameters * Remove deprecated local_dir_use_symlinks parameter * Remove deprecated language, library, task, tags from list_models * Return commit URL in upload_file/upload_folder (previously url to file/folder on the Hub) * fix upload_file/upload_folder tests * smoothly_deprecate_legacy_arguments everywhere * code quality * fix tests * fix xet tests * [v1.0] Remove `Repository` class (#3346) * Remove Repository class + adapt docs * remove fr git_vs_http * bump to 1.0.0.dev0 * Remove _deprecate_positional_args on login methods (#3349) * [v1.0] Remove imports kept only for backward compatibility (#3350) * Remove imports kept only for backward compatibility * fix tests * [v1.0] Remove keras2 utilities (#3352) * Remove keras2 utilities * remove keras from init * [v1.0] Remove anything tensorflow-related + deps (#3354) * Remove anything tensorflow-related + deps * init * fix tests * fix conflicts in tests * Release: v1.0.0.rc0 * [v1.0] Update "HTTP backend" docs + `git_vs_http` guide (#3357) * HTTP configuration docs * http configuration docs * refactored git_vs_http * fix import * fix docs? * Update docs/source/en/package_reference/utilities.md Co-authored-by: célina <[email protected]> --------- Co-authored-by: célina <[email protected]> * Refactor CLI implementation using Typer (#3372) * Refactor CLI implementation using Typer (#3365) * migrate CLI to typer * (#3364) disable rich in all cases * update tests * make typer-slim a required dep * use Annotated * fix linting issues * fix tests * refactoring * update docs * use built in types * fix mypy * call whoami directly * lint * Apply suggestions from code review Co-authored-by: Lucain <[email protected]> * import Annotated from typing * Use Enums * set verbosity globally * refactor scan cache and update version docstring * centralize where Typer is defined * no need for ... * rename enum * no need for extra param name * docstring * revert * centralize arguments and options definition * add library version when initializing HfApi * add auto-completion * sort commands alphabetically * suggestions * centralize jobs params and HfApi initialization * fix --------- Co-authored-by: Lucain <[email protected]> * update docs --------- Co-authored-by: Lucain <[email protected]> * Make HfHubHTTPError inherit from OSError (#3387) * Release: v1.0.0.rc1 * print relevant message based on the linux distro * better warning message * log info instead of warning * copilot suggestions * Update utils/installers/install.sh Co-authored-by: Copilot <[email protected]> * update docs --------- Co-authored-by: Lucain <[email protected]> Co-authored-by: Lucain Pouget <[email protected]> Co-authored-by: Copilot <[email protected]>
* [1.0] Httpx migration (#3328) * first httpx integration * more migration * some fixes * download workflow should work * Fix repocard and error utils tests * fix hf-file-system * gix http utils tests * more fixes * fix some inference tests * fix test_file_download tests * async inference client * async code should be good * Define RemoteEntryFileNotFound explicitly (+some fixes) * fix async code quality * torch ok * fix hf_file_system * fix errors tests * mock * fix test_cli mock * fix commit scheduler * add fileno test * no more requests anywhere * fix test_file_download * tmp requests * Update src/huggingface_hub/utils/_http.py Co-authored-by: célina <[email protected]> * Update src/huggingface_hub/utils/_http.py Co-authored-by: célina <[email protected]> * Update src/huggingface_hub/hf_file_system.py Co-authored-by: célina <[email protected]> * not async * fix tests --------- Co-authored-by: célina <[email protected]> * Bump minimal version to Python3.9 (#3343) * Bump minimal version to Python3.9 * use built-in generics * code quality * new batch * yet another btach * fix dataclass_with_extra * fix * keep Type for strict dataclasses * fix test * Remove `HfFolder` and `InferenceAPI` classes (#3344) * Remove HfFolder * Remove InferenceAPI * more recent gradio * bump pytest * fix python 3.9? * install gradio only on python 3.10+ * fix tests * fix tests * fix * [v1.0] Remove more deprecated stuff (#3345) * remove constants.-hf_cache_home * remove smoothly_deprecate_use_auth_token * remove get_token_permission * remove update_repo_visibility * remove is_write_action arg * remove write_permission arg from login methods * new parameter skip_if_logged_in in login methods * Remove resume_download / force_filename parameters * Remove deprecated local_dir_use_symlinks parameter * Remove deprecated language, library, task, tags from list_models * Return commit URL in upload_file/upload_folder (previously url to file/folder on the Hub) * fix upload_file/upload_folder tests * smoothly_deprecate_legacy_arguments everywhere * code quality * fix tests * fix xet tests * [v1.0] Remove `Repository` class (#3346) * Remove Repository class + adapt docs * remove fr git_vs_http * bump to 1.0.0.dev0 * Remove _deprecate_positional_args on login methods (#3349) * [v1.0] Remove imports kept only for backward compatibility (#3350) * Remove imports kept only for backward compatibility * fix tests * [v1.0] Remove keras2 utilities (#3352) * Remove keras2 utilities * remove keras from init * [v1.0] Remove anything tensorflow-related + deps (#3354) * Remove anything tensorflow-related + deps * init * fix tests * fix conflicts in tests * HTTP configuration docs * http configuration docs * refactored git_vs_http * feat: add migration guide for v1.0 This commit adds a comprehensive migration guide for the v1.0 release of the `huggingface_hub` library. The guide is located at `docs/source/en/concepts/migration.md` and provides a detailed list of main changes and breaking changes, along with instructions on how to adapt to them. The migration guide covers the following topics: - HTTPX migration - Python 3.9+ requirement - Removal of deprecated features - Removal of the `Repository`, `HfFolder`, and `InferenceApi` classes - Removal of TensorFlow and Keras 2 integrations This guide is intended to help users migrate their existing code to the new version of the library smoothly. Fixes #3358 [Auto-generated by https://jules.google.com/] * rewrite migration guide * fix import * fix docs? * add why httpx section * Update docs/source/en/concepts/migration.md --------- Co-authored-by: Lucain <[email protected]> Co-authored-by: célina <[email protected]> Co-authored-by: Lucain Pouget <[email protected]> Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
* Strict typed dict validator * better type hint * work with Required / NotREquired * Make it work with Python 3.11 * correctly handle total=False * fix python 3.9+ * fix python 3.9
* Implement dry run mode * docs * more docs * quality * quality * fix cli test * Apply suggestions from code review Co-authored-by: célina <[email protected]> * fix test on widnwso --------- Co-authored-by: célina <[email protected]>
* Remove huggingface-cli entirely in favor of hf * dup
* Use EventHooks instead of custom Transport * add test * Update tests/test_utils_http.py Co-authored-by: célina <[email protected]> --------- Co-authored-by: célina <[email protected]>
|
|
||
|
|
||
| @deploy_app.command(name="hub", help="Deploy an Inference Endpoint from a Hub repository.") | ||
| def deploy_from_hub( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
splitted the deploy into two subcommands instead of using a flag to deploy from the Model Catalog because Typer doesn't easily allow conditional requirements (i.e., "these parameters are required unless that flag (e.g. --from-catalog) is set"), which makes validation and type hints messy so using subcommands lets Typer enforce required options cleanly for each case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what do you think of having
# deploy from Hub
hf endpoints deploy
# list catalog
hf endpoints catalog ls
# deploy from catalog
hf endpoints catalog deploy?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
otherwise if keeping the same I'd be more inclined for
hf endpoints deploy from-repo
hf endpoints deploy from-catalog(since both are deployed from Hub + the from- makes it more explicit)
(but still slight preference for the one above)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for late response but I'll propose a 3rd option 😄
for example simply:
hf endpoints deploy Qwen/Qwen3-Next-80B-A3B-Instructif it's in the catalog --> uses catalog configuration just deploys as such
if not --> then the user is prompted to configure the deployment themselves
It's a bit more logic but might be more clean 🤔 wdyt?
Honestly in the web UI as well, we're looking to make this a bit more streamlined to be just "deploy model" but have the catalog configurations as the top recommendations and highlighted. But not per se as completely separate deployment flows. If that makes sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue with "deploy" + prompt user for additional configuration is that it cannot be added to an automated script (or much more difficult). Same for documentation where it's harder to say "copy-paste and execute this command" to deploy the model.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we make it more clear by not prompting but returning to std err? 🤔
Treat it in the same way as passing a configuration which is missing some fields for example:
hf endpoints deploy Qwen/Qwen3-Next-80B-A3B-Instruct- if in catalog: succeeds with the catalog config
- fails if not in catalog, since there's no config
hf endpoints deploy Qwen/Qwen3-Next-80B-A3B-Instruct --hardware=H200- if in catalog: overrides the hardware recommendation
- if not: fails also since it's not a complete config
But take my suggestion with a grain of salt. I don't know the ins and outs as well as you both do. I also think your earlier suggestion is a good improvement:
# deploy from Hub
hf endpoints deploy
# list catalog
hf endpoints catalog ls
# deploy from catalog
hf endpoints catalog deploy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Wauplin @ErikKaum
getting back to this as it would be cool to ship this for the next release! i went with the first suggestion because it feels the cleanest and the simplest to implement, with a clear behavior and no hidden logic. Since this CLI is still more of an exploration at this stage, i think it's better to ship like this (unless you have a strong opinion against 😄) but i guess we can always reassess later based on how people use it, wdyt?
> hf endpoints --help
Usage: hf endpoints [OPTIONS] COMMAND [ARGS]...
Manage Hugging Face Inference Endpoints.
Options:
--help Show this message and exit.
Commands:
catalog Interact with the Inference Endpoints catalog.
delete Delete an Inference Endpoint permanently.
deploy Deploy an Inference Endpoint from a Hub repository.
describe Get information about an existing endpoint.
ls Lists all Inference Endpoints for the given namespace.
pause Pause an Inference Endpoint.
resume Resume an Inference Endpoint.
scale-to-zero Scale an Inference Endpoint to zero.
update Update an existing endpoint.
> hf endpoints catalog --help
Usage: hf endpoints catalog [OPTIONS] COMMAND [ARGS]...
Interact with the Inference Endpoints catalog.
Options:
--help Show this message and exit.
Commands:
deploy Deploy an Inference Endpoint from the Model Catalog.
ls List available Catalog models.|
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this! Left some high level feedback mostly geared towards the CLI syntax. Let me know what you think :)
|
|
||
|
|
||
| @deploy_app.command(name="hub", help="Deploy an Inference Endpoint from a Hub repository.") | ||
| def deploy_from_hub( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what do you think of having
# deploy from Hub
hf endpoints deploy
# list catalog
hf endpoints catalog ls
# deploy from catalog
hf endpoints catalog deploy?
|
|
||
|
|
||
| @deploy_app.command(name="hub", help="Deploy an Inference Endpoint from a Hub repository.") | ||
| def deploy_from_hub( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
otherwise if keeping the same I'd be more inclined for
hf endpoints deploy from-repo
hf endpoints deploy from-catalog(since both are deployed from Hub + the from- makes it more explicit)
(but still slight preference for the one above)
Co-authored-by: Lucain <[email protected]>
f06410e to
292628d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a comment about the try/except parts, apart from that looks good to me :) Thanks for getting back to this PR!
Co-authored-by: Lucain <[email protected]>
This PR implements a CLI to manage Inference Endpoints, this provides "one liners" to deploy/delete/update/etc. endpoints, which could be handy in many cases. The DX intentionally mirrors a bit the UI instead of the API, to quote @ErikKaum :
I explored a few layouts (e.g. a single deploy command with
--catalog), but the cleanest UX ended up being two explicit paths:hf endpoints deploy ...– minimal set of hardware/task configs for Hub models.hf endpoints catalog deploy ...– one liner using optimized configs from the model catalog.happy to more iterate if there are more suggestions to make the DX better (and simpler?)