Running Inference results in HFValidationError #1

Open
opened 2026-02-15 23:16:02 -05:00 by yindo · 0 comments
Owner

Originally created by @anandp504 on GitHub (Aug 22, 2023).

Running the inference using the command modal run src.inference_sql_llamaindex::main --query "Which city has the highest population?" --sqlite-file-path "nbs/cities.db" results in the following error. The repo_id has been passed as /model and hence the error. Any suggestions on how to resolve this error?

modal_finetune_sql/venv/lib/python3.11/site-packages/transformers/tokenization_utils_base.py:1800 in from_pretrained
│                                                                                                  │
│   1799 │   │   │   else:                                                                         │
│ ❱ 1800 │   │   │   │   resolved_vocab_files[file_id] = cached_file(                              │
│   1801 │   │   │   │   │   pretrained_model_name_or_path,                                        │
│                                                                                                  │
modal_finetune_sql/venv/lib/python3.11/site-packages/transformers/utils/hub.py:417 in cached_file                                                   │
│                                                                                                  │
│    416 │   │   # Load from URL or cache if already cached                                        │
│ ❱  417 │   │   resolved_file = hf_hub_download(                                                  │
│    418 │   │   │   path_or_repo_id,                                                              │
│                                                                                                  │
modal_finetune_sql/venv/lib/python3.11/site-packages/huggingface_hub/utils/_validators.py:111 in _inner_fn                                          │
│                                                                                                  │
│   110 │   │   │   │   print("Repo ID = " + arg_value)                                            │
│ ❱ 111 │   │   │   │   validate_repo_id(arg_value)                                                │
│   112                                                                                            │
│                                                                                                  │
modal_finetune_sql/venv/lib/python3.11/site-packages/huggingface_hub/utils/_validators.py:165 in validate_repo_id                                   │
│                                                                                                  │
│   164 │   if not REPO_ID_REGEX.match(repo_id):                                                   │
│ ❱ 165 │   │   raise HFValidationError(                                                           │
│   166 │   │   │   "Repo id must use alphanumeric chars or '-', '_', '.', '--' and '..' are"
Originally created by @anandp504 on GitHub (Aug 22, 2023). Running the inference using the command `modal run src.inference_sql_llamaindex::main --query "Which city has the highest population?" --sqlite-file-path "nbs/cities.db"` results in the following error. The repo_id has been passed as `/model` and hence the error. Any suggestions on how to resolve this error? ``` modal_finetune_sql/venv/lib/python3.11/site-packages/transformers/tokenization_utils_base.py:1800 in from_pretrained │ │ │ 1799 │ │ │ else: │ │ ❱ 1800 │ │ │ │ resolved_vocab_files[file_id] = cached_file( │ │ 1801 │ │ │ │ │ pretrained_model_name_or_path, │ │ │ modal_finetune_sql/venv/lib/python3.11/site-packages/transformers/utils/hub.py:417 in cached_file │ │ │ │ 416 │ │ # Load from URL or cache if already cached │ │ ❱ 417 │ │ resolved_file = hf_hub_download( │ │ 418 │ │ │ path_or_repo_id, │ │ │ modal_finetune_sql/venv/lib/python3.11/site-packages/huggingface_hub/utils/_validators.py:111 in _inner_fn │ │ │ │ 110 │ │ │ │ print("Repo ID = " + arg_value) │ │ ❱ 111 │ │ │ │ validate_repo_id(arg_value) │ │ 112 │ │ │ modal_finetune_sql/venv/lib/python3.11/site-packages/huggingface_hub/utils/_validators.py:165 in validate_repo_id │ │ │ │ 164 │ if not REPO_ID_REGEX.match(repo_id): │ │ ❱ 165 │ │ raise HFValidationError( │ │ 166 │ │ │ "Repo id must use alphanumeric chars or '-', '_', '.', '--' and '..' are" ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: run-llama/modal_finetune_sql#1