Skip to content

Launch Error #51

@JamesJang26

Description

@JamesJang26

Hello,

Thanks for the great project!

I'm facing some issue when running the app, which looks like this.

  • It doesn't work even trying export LLM_TYPE="huggingface-inference-api"
(data) dj475@lambda1:~/yalenlp$ export HF_TOKEN=""
(data) dj475@lambda1:~/yalenlp$ python data_aug_test_250901.py
/home/dj475/miniconda3/envs/data/lib/python3.12/site-packages/synthetic_dataset_generator/constants.py:132: UserWarning: ARGILLA_API_URL or ARGILLA_API_KEY is not set or is empty
  warnings.warn("ARGILLA_API_URL or ARGILLA_API_KEY is not set or is empty")
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /home/dj475/miniconda3/envs/data/lib/python3.12/site-packages/huggingface_hub/utils/_http.py:406 │
│ in hf_raise_for_status                                                                           │
│                                                                                                  │
│   403 │   </Tip>                                                                                 │
│   404 │   """                                                                                    │
│   405 │   try:                                                                                   │
│ ❱ 406 │   │   response.raise_for_status()                                                        │
│   407 │   except HTTPError as e:                                                                 │
│   408 │   │   error_code = response.headers.get("X-Error-Code")                                  │
│   409 │   │   error_message = response.headers.get("X-Error-Message")                            │
│                                                                                                  │
│ ╭───────────── locals ─────────────╮                                                             │
│ │ endpoint_name = None             │                                                             │
│ │    error_code = None             │                                                             │
│ │ error_message = None             │                                                             │
│ │      response = <Response [404]> │                                                             │
│ ╰──────────────────────────────────╯                                                             │
│                                                                                                  │
│ /home/dj475/miniconda3/envs/data/lib/python3.12/site-packages/requests/models.py:1026 in         │
│ raise_for_status                                                                                 │
│                                                                                                  │
│   1023 │   │   │   )                                                                             │
│   1024 │   │                                                                                     │
│   1025 │   │   if http_error_msg:                                                                │
│ ❱ 1026 │   │   │   raise HTTPError(http_error_msg, response=self)                                │
│   1027 │                                                                                         │
│   1028 │   def close(self):                                                                      │
│   1029 │   │   """Releases the connection back to the pool. Once this method has been            │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │ http_error_msg = '404 Client Error: Not Found for url:                                       │ │
│ │                  https://api-inference.huggingface.co/status'+38                             │ │
│ │         reason = 'Not Found'                                                                 │ │
│ │           self = <Response [404]>                                                            │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
HTTPError: 404 Client Error: Not Found for url: https://api-inference.huggingface.co/status/meta-llama/Meta-Llama-3.1-8B-Instruct

The above exception was the direct cause of the following exception:

╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /home/dj475/miniconda3/envs/data/lib/python3.12/site-packages/synthetic_dataset_generator/pipeli │
│ nes/base.py:177 in <module>                                                                      │
│                                                                                                  │
│   174                                                                                            │
│   175 try:                                                                                       │
│   176 │   llm = _get_llm()                                                                       │
│ ❱ 177 │   llm.load()                                                                             │
│   178 │   llm.generate([[{"content": "Hello, world!", "role": "user"}]])                         │
│   179 except Exception as e:                                                                     │
│   180 │   raise Exception(f"Error loading {llm.__class__.__name__}: {e}")                        │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │                        API_KEYS = ['']                  │ │
│ │              DEFAULT_BATCH_SIZE = 5                                                          │ │
│ │            HUGGINGFACE_BASE_URL = None                                                       │ │
│ │ HUGGINGFACE_BASE_URL_COMPLETION = None                                                       │ │
│ │                             llm = InferenceEndpointsLLM(                                     │ │
│ │                                   │   use_magpie_template=False,                             │ │
│ │                                   │   magpie_pre_query_template=None,                        │ │
│ │                                   │   generation_kwargs={},                                  │ │
│ │                                   │   use_offline_batch_generation=False,                    │ │
│ │                                   │   offline_batch_generation_block_until_done=None,        │ │
│ │                                   │   jobs_ids=None,                                         │ │
│ │                                   │   model_id='meta-llama/Meta-Llama-3.1-8B-Instruct',      │ │
│ │                                   │   endpoint_name=None,                                    │ │
│ │                                   │   endpoint_namespace=None,                               │ │
│ │                                   │   base_url=None,                                         │ │
│ │                                   │   api_key=SecretStr('**********'),                       │ │
│ │                                   │   tokenizer_id='meta-llama/Meta-Llama-3.1-8B-Instruct',  │ │
│ │                                   │   model_display_name=None,                               │ │
│ │                                   │   structured_output=None                                 │ │
│ │                                   )                                                          │ │
│ │                            math = <module 'math' from                                        │ │
│ │                                   '/home/dj475/miniconda3/envs/data/lib/python3.12/lib-dynl… │ │
│ │                           MODEL = 'meta-llama/Meta-Llama-3.1-8B-Instruct'                    │ │
│ │                MODEL_COMPLETION = 'meta-llama/Meta-Llama-3.1-8B-Instruct'                    │ │
│ │                 OLLAMA_BASE_URL = None                                                       │ │
│ │      OLLAMA_BASE_URL_COMPLETION = None                                                       │ │
│ │                 OPENAI_BASE_URL = None                                                       │ │
│ │      OPENAI_BASE_URL_COMPLETION = None                                                       │ │
│ │                          random = <module 'random' from                                      │ │
│ │                                   '/home/dj475/miniconda3/envs/data/lib/python3.12/random.p… │ │
│ │                     TOKEN_INDEX = 1                                                          │ │
│ │                    TOKENIZER_ID = None                                                       │ │
│ │         TOKENIZER_ID_COMPLETION = None                                                       │ │
│ │                   VLLM_BASE_URL = None                                                       │ │
│ │        VLLM_BASE_URL_COMPLETION = None                                                       │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                  │
│ /home/dj475/miniconda3/envs/data/lib/python3.12/site-packages/distilabel/models/llms/huggingface │
│ /inference_endpoints.py:164 in load                                                              │
│                                                                                                  │
│   161 │   │   # Sets the logger and calls the load method of the BaseClient                      │
│   162 │   │   self._num_generations_param_supported = False                                      │
│   163 │   │   AsyncLLM.load(self)                                                                │
│ ❱ 164 │   │   InferenceEndpointsBaseClient.load(self)                                            │
│   165 │                                                                                          │
│   166 │   @model_validator(mode="after")  # type: ignore                                         │
│   167 │   def only_one_of_model_id_endpoint_name_or_base_url_provided(                           │
│                                                                                                  │
│ ╭───────────────────────────── locals ─────────────────────────────╮                             │
│ │ self = InferenceEndpointsLLM(                                    │                             │
│ │        │   use_magpie_template=False,                            │                             │
│ │        │   magpie_pre_query_template=None,                       │                             │
│ │        │   generation_kwargs={},                                 │                             │
│ │        │   use_offline_batch_generation=False,                   │                             │
│ │        │   offline_batch_generation_block_until_done=None,       │                             │
│ │        │   jobs_ids=None,                                        │                             │
│ │        │   model_id='meta-llama/Meta-Llama-3.1-8B-Instruct',     │                             │
│ │        │   endpoint_name=None,                                   │                             │
│ │        │   endpoint_namespace=None,                              │                             │
│ │        │   base_url=None,                                        │                             │
│ │        │   api_key=SecretStr('**********'),                      │                             │
│ │        │   tokenizer_id='meta-llama/Meta-Llama-3.1-8B-Instruct', │                             │
│ │        │   model_display_name=None,                              │                             │
│ │        │   structured_output=None                                │                             │
│ │        )                                                         │                             │
│ ╰──────────────────────────────────────────────────────────────────╯                             │
│                                                                                                  │
│ /home/dj475/miniconda3/envs/data/lib/python3.12/site-packages/distilabel/models/base_clients/inf │
│ erence_endpoints.py:101 in load                                                                  │
│                                                                                                  │
│    98 │   │   │   client = InferenceClient(                                                      │
│    99 │   │   │   │   model=self.model_id, token=self.api_key.get_secret_value()                 │
│   100 │   │   │   )                                                                              │
│ ❱ 101 │   │   │   status = client.get_model_status()                                             │
│   102 │   │   │                                                                                  │
│   103 │   │   │   if (                                                                           │
│   104 │   │   │   │   status.state not in {"Loadable", "Loaded"}                                 │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │                 client = <InferenceClient(model='meta-llama/Meta-Llama-3.1-8B-Instruct',     │ │
│ │                          timeout=None)>                                                      │ │
│ │ get_inference_endpoint = <bound method HfApi.get_inference_endpoint of                       │ │
│ │                          <huggingface_hub.hf_api.HfApi object at 0x7fab8a709d90>>            │ │
│ │                   self = InferenceEndpointsLLM(                                              │ │
│ │                          │   use_magpie_template=False,                                      │ │
│ │                          │   magpie_pre_query_template=None,                                 │ │
│ │                          │   generation_kwargs={},                                           │ │
│ │                          │   use_offline_batch_generation=False,                             │ │
│ │                          │   offline_batch_generation_block_until_done=None,                 │ │
│ │                          │   jobs_ids=None,                                                  │ │
│ │                          │   model_id='meta-llama/Meta-Llama-3.1-8B-Instruct',               │ │
│ │                          │   endpoint_name=None,                                             │ │
│ │                          │   endpoint_namespace=None,                                        │ │
│ │                          │   base_url=None,                                                  │ │
│ │                          │   api_key=SecretStr('**********'),                                │ │
│ │                          │   tokenizer_id='meta-llama/Meta-Llama-3.1-8B-Instruct',           │ │
│ │                          │   model_display_name=None,                                        │ │
│ │                          │   structured_output=None                                          │ │
│ │                          )                                                                   │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                  │
│ /home/dj475/miniconda3/envs/data/lib/python3.12/site-packages/huggingface_hub/inference/_client. │
│ py:3155 in get_model_status                                                                      │
│                                                                                                  │
│   3152 │   │   url = f"{INFERENCE_ENDPOINT}/status/{model}"                                      │
│   3153 │   │                                                                                     │
│   3154 │   │   response = get_session().get(url, headers=self.headers)                           │
│ ❱ 3155 │   │   hf_raise_for_status(response)                                                     │
│   3156 │   │   response_data = response.json()                                                   │
│   3157 │   │                                                                                     │
│   3158 │   │   if "error" in response_data:                                                      │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │    model = 'meta-llama/Meta-Llama-3.1-8B-Instruct'                                           │ │
│ │ response = <Response [404]>                                                                  │ │
│ │     self = <InferenceClient(model='meta-llama/Meta-Llama-3.1-8B-Instruct', timeout=None)>    │ │
│ │      url = 'https://api-inference.huggingface.co/status/meta-llama/Meta-Llama-3.1-8B-Instru… │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                  │
│ /home/dj475/miniconda3/envs/data/lib/python3.12/site-packages/huggingface_hub/utils/_http.py:477 │
│ in hf_raise_for_status                                                                           │
│                                                                                                  │
│   474 │   │                                                                                      │
│   475 │   │   # Convert `HTTPError` into a `HfHubHTTPError` to display request information       │
│   476 │   │   # as well (request id and/or server error message)                                 │
│ ❱ 477 │   │   raise _format(HfHubHTTPError, str(e), response) from e                             │
│   478                                                                                            │
│   479                                                                                            │
│   480 def _format(error_type: Type[HfHubHTTPError], custom_message: str, response: Response) -   │
│                                                                                                  │
│ ╭───────────── locals ─────────────╮                                                             │
│ │ endpoint_name = None             │                                                             │
│ │    error_code = None             │                                                             │
│ │ error_message = None             │                                                             │
│ │      response = <Response [404]> │                                                             │
│ ╰──────────────────────────────────╯                                                             │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
HfHubHTTPError: 404 Client Error: Not Found for url: https://api-inference.huggingface.co/status/meta-llama/Meta-Llama-3.1-8B-Instruct
(Request ID: Root=1-68b55e8e-30b43de1548a697b564e3515;fc6d6db8-cacd-4f0f-9aa8-dfbfb0270682)

During handling of the above exception, another exception occurred:

╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /storage/home/dj475/yalenlp/data_aug_test_250901.py:3 in <module>                                │
│                                                                                                  │
│   1 from synthetic_dataset_generator import launch                                               │
│   2                                                                                              │
│ ❱ 3 launch()                                                                                     │
│   4                                                                                              │
│                                                                                                  │
│ /home/dj475/miniconda3/envs/data/lib/python3.12/site-packages/synthetic_dataset_generator/__init │
│ __.py:14 in launch                                                                               │
│                                                                                                  │
│   11 │   Based on the `TabbedInterface` from Gradio.                                             │
│   12 │   Parameters: https://www.gradio.app/docs/gradio/tabbedinterface                          │
│   13 │   """                                                                                     │
│ ❱ 14 │   from synthetic_dataset_generator.app import demo                                        │
│   15 │   return demo.launch(*args, server_name="0.0.0.0", **kwargs)                              │
│   16                                                                                             │
│   17                                                                                             │
│                                                                                                  │
│ ╭── locals ───╮                                                                                  │
│ │   args = () │                                                                                  │
│ │ kwargs = {} │                                                                                  │
│ ╰─────────────╯                                                                                  │
│                                                                                                  │
│ /home/dj475/miniconda3/envs/data/lib/python3.12/site-packages/synthetic_dataset_generator/app.py │
│ :4 in <module>                                                                                   │
│                                                                                                  │
│    1 from synthetic_dataset_generator._tabbedinterface import TabbedInterface                    │
│    2                                                                                             │
│    3 # from synthetic_dataset_generator.apps.eval import app as eval_app                         │
│ ❱  4 from synthetic_dataset_generator.apps.rag import app as rag_app                             │
│    5 from synthetic_dataset_generator.apps.about import app as about_app                         │
│    6 from synthetic_dataset_generator.apps.chat import app as chat_app                           │
│    7 from synthetic_dataset_generator.apps.textcat import app as textcat_app                     │
│                                                                                                  │
│ /home/dj475/miniconda3/envs/data/lib/python3.12/site-packages/synthetic_dataset_generator/apps/r │
│ ag.py:33 in <module>                                                                             │
│                                                                                                  │
│    30 │   MODEL_COMPLETION,                                                                      │
│    31 │   SAVE_LOCAL_DIR,                                                                        │
│    32 )                                                                                          │
│ ❱  33 from synthetic_dataset_generator.pipelines.base import get_rewritten_prompts               │
│    34 from synthetic_dataset_generator.pipelines.embeddings import (                             │
│    35 │   get_embeddings,                                                                        │
│    36 │   get_sentence_embedding_dimensions,                                                     │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │ DEFAULT_BATCH_SIZE = 5                                                                       │ │
│ │                 gr = <module 'gradio' from                                                   │ │
│ │                      '/home/dj475/miniconda3/envs/data/lib/python3.12/site-packages/gradio/… │ │
│ │              MODEL = 'meta-llama/Meta-Llama-3.1-8B-Instruct'                                 │ │
│ │   MODEL_COMPLETION = 'meta-llama/Meta-Llama-3.1-8B-Instruct'                                 │ │
│ │               nltk = <module 'nltk' from                                                     │ │
│ │                      '/home/dj475/miniconda3/envs/data/lib/python3.12/site-packages/nltk/__… │ │
│ │                 os = <module 'os' (frozen)>                                                  │ │
│ │                 pd = <module 'pandas' from                                                   │ │
│ │                      '/home/dj475/miniconda3/envs/data/lib/python3.12/site-packages/pandas/… │ │
│ │             random = <module 'random' from                                                   │ │
│ │                      '/home/dj475/miniconda3/envs/data/lib/python3.12/random.py'>            │ │
│ │                 rg = <module 'argilla' from                                                  │ │
│ │                      '/home/dj475/miniconda3/envs/data/lib/python3.12/site-packages/argilla… │ │
│ │     SAVE_LOCAL_DIR = None                                                                    │ │
│ │              Union = typing.Union                                                            │ │
│ │               uuid = <module 'uuid' from                                                     │ │
│ │                      '/home/dj475/miniconda3/envs/data/lib/python3.12/uuid.py'>              │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                  │
│ /home/dj475/miniconda3/envs/data/lib/python3.12/site-packages/synthetic_dataset_generator/pipeli │
│ nes/base.py:180 in <module>                                                                      │
│                                                                                                  │
│   177 │   llm.load()                                                                             │
│   178 │   llm.generate([[{"content": "Hello, world!", "role": "user"}]])                         │
│   179 except Exception as e:                                                                     │
│ ❱ 180 │   raise Exception(f"Error loading {llm.__class__.__name__}: {e}")                        │
│   181                                                                                            │
│                                                                                                  │
│ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
│ │                        API_KEYS = ['']                  │ │
│ │              DEFAULT_BATCH_SIZE = 5                                                          │ │
│ │            HUGGINGFACE_BASE_URL = None                                                       │ │
│ │ HUGGINGFACE_BASE_URL_COMPLETION = None                                                       │ │
│ │                             llm = InferenceEndpointsLLM(                                     │ │
│ │                                   │   use_magpie_template=False,                             │ │
│ │                                   │   magpie_pre_query_template=None,                        │ │
│ │                                   │   generation_kwargs={},                                  │ │
│ │                                   │   use_offline_batch_generation=False,                    │ │
│ │                                   │   offline_batch_generation_block_until_done=None,        │ │
│ │                                   │   jobs_ids=None,                                         │ │
│ │                                   │   model_id='meta-llama/Meta-Llama-3.1-8B-Instruct',      │ │
│ │                                   │   endpoint_name=None,                                    │ │
│ │                                   │   endpoint_namespace=None,                               │ │
│ │                                   │   base_url=None,                                         │ │
│ │                                   │   api_key=SecretStr('**********'),                       │ │
│ │                                   │   tokenizer_id='meta-llama/Meta-Llama-3.1-8B-Instruct',  │ │
│ │                                   │   model_display_name=None,                               │ │
│ │                                   │   structured_output=None                                 │ │
│ │                                   )                                                          │ │
│ │                            math = <module 'math' from                                        │ │
│ │                                   '/home/dj475/miniconda3/envs/data/lib/python3.12/lib-dynl… │ │
│ │                           MODEL = 'meta-llama/Meta-Llama-3.1-8B-Instruct'                    │ │
│ │                MODEL_COMPLETION = 'meta-llama/Meta-Llama-3.1-8B-Instruct'                    │ │
│ │                 OLLAMA_BASE_URL = None                                                       │ │
│ │      OLLAMA_BASE_URL_COMPLETION = None                                                       │ │
│ │                 OPENAI_BASE_URL = None                                                       │ │
│ │      OPENAI_BASE_URL_COMPLETION = None                                                       │ │
│ │                          random = <module 'random' from                                      │ │
│ │                                   '/home/dj475/miniconda3/envs/data/lib/python3.12/random.p… │ │
│ │                     TOKEN_INDEX = 1                                                          │ │
│ │                    TOKENIZER_ID = None                                                       │ │
│ │         TOKENIZER_ID_COMPLETION = None                                                       │ │
│ │                   VLLM_BASE_URL = None                                                       │ │
│ │        VLLM_BASE_URL_COMPLETION = None                                                       │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────╯ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
Exception: Error loading InferenceEndpointsLLM: 404 Client Error: Not Found for url:
https://api-inference.huggingface.co/status/meta-llama/Meta-Llama-3.1-8B-Instruct (Request ID:
Root=1-68b55e8e-30b43de1548a697b564e3515;fc6d6db8-cacd-4f0f-9aa8-dfbfb0270682)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions