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

Endpoint cannot be created if model repo name is >60 characters #2481

Open
bdzyubak opened this issue Aug 22, 2024 · 1 comment
Open

Endpoint cannot be created if model repo name is >60 characters #2481

bdzyubak opened this issue Aug 22, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@bdzyubak
Copy link

Describe the bug

We fine tune models and store them on HuggingFace hub. The model names are built from datasetid__experiment name such as:
Company/client1_fielddata_[date]__favoritemodel_finetuned_300epochs

We have noticed random-appearing crashes when trying to create the endpoint, and narrowed it down to the model name being too long. The issue is twofold:

  1. The error message is unclear and does not lead you to recreate a model under a different name.
  2. The name restriction of 70 (60?) characters together with namespace is restricting. Having long descriptive model names is helpful during the experimentation phase.

Reproduction

endpoint = create_inference_endpoint(
name='client1_fielddata_favoritemodel_finetuned',
repository='Company/client1_fielddata_[date]__favoritemodel_finetuned_300epochs,
framework="pytorch",
task="custom",
accelerator="gpu",
vendor=vendor,
region=region,
type="protected",
instance_size="x1",
instance_type="nvidia-l4",
custom_image={
"health_route": "/health",
"env": env_vars,
"url": VLLM_HF_IMAGE_URL,
},
token=os.getenv("HF_TOKEN"),
namespace="Company"
)

Logs

Traceback (most recent call last):
  File "/Applications/PyCharm.app/Contents/plugins/python/helpers-pro/pydevd_asyncio/pydevd_asyncio_utils.py", line 117, in _exec_async_code
    result = func()
             ^^^^^^
  File "<input>", line 1, in <module>
  File "/Users/bdzyubak/Library/Caches/pypoetry/virtualenvs/vlm-finetuning-X38kV7cE-py3.11/lib/python3.11/site-packages/huggingface_hub/hf_api.py", line 7264, in create_inference_endpoint
    hf_raise_for_status(response)
  File "/Users/bdzyubak/Library/Caches/pypoetry/virtualenvs/vlm-finetuning-X38kV7cE-py3.11/lib/python3.11/site-packages/huggingface_hub/utils/_errors.py", line 358, in hf_raise_for_status
    raise BadRequestError(message, response=response) from e
huggingface_hub.utils._errors.BadRequestError:  (Request ID: m4c7P7)
Bad request:
Bad Request: Invalid name

System info

- huggingface_hub version: 0.24.6
- Platform: macOS-14.6.1-arm64-arm-64bit
- Python version: 3.12.4
- Running in iPython ?: No
- Running in notebook ?: No
- Running in Google Colab ?: No
- Token path ?: /Users/bdzyubak/.cache/huggingface/token
- Has saved token ?: True
- Who am I ?: bdzyubak
- Configured git credential helpers: osxkeychain
- FastAI: N/A
- Tensorflow: N/A
- Torch: 2.4.0
- Jinja2: 3.1.4
- Graphviz: N/A
- keras: N/A
- Pydot: N/A
- Pillow: 10.4.0
- hf_transfer: N/A
- gradio: 4.41.0
- tensorboard: N/A
- numpy: 1.26.4
- pydantic: 2.8.2
- aiohttp: 3.10.5
- ENDPOINT: https://huggingface.co
- HF_HUB_CACHE: /Users/bdzyubak/.cache/huggingface/hub
- HF_ASSETS_CACHE: /Users/bdzyubak/.cache/huggingface/assets
- HF_TOKEN_PATH: /Users/bdzyubak/.cache/huggingface/token
- HF_HUB_OFFLINE: False
- HF_HUB_DISABLE_TELEMETRY: False
- HF_HUB_DISABLE_PROGRESS_BARS: None
- HF_HUB_DISABLE_SYMLINKS_WARNING: False
- HF_HUB_DISABLE_EXPERIMENTAL_WARNING: False
- HF_HUB_DISABLE_IMPLICIT_TOKEN: False
- HF_HUB_ENABLE_HF_TRANSFER: False
- HF_HUB_ETAG_TIMEOUT: 10
- HF_HUB_DOWNLOAD_TIMEOUT: 10
@bdzyubak bdzyubak added the bug Something isn't working label Aug 22, 2024
@Wauplin
Copy link
Contributor

Wauplin commented Aug 23, 2024

Hi @bdzyubak, thanks raising the question. I'll forward your issue internally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants