Skip to content

run error #3

@xgdyp

Description

@xgdyp

Thanks for this great work. I read the scope doc and this work match me a lot.

But when I run the project, there are errors:

ERROR:    Traceback (most recent call last):
  File "/workspaces/InferAdmin/.venv/lib/python3.11/site-packages/starlette/routing.py", line 692, in lifespan
    async with self.lifespan_context(app) as maybe_state:
  File "/home/codespace/.local/share/uv/python/cpython-3.11.12-linux-x86_64-gnu/lib/python3.11/contextlib.py", line 210, in __aenter__
    return await anext(self.gen)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/workspaces/InferAdmin/.venv/lib/python3.11/site-packages/fastapi/routing.py", line 133, in merged_lifespan
    async with original_context(app) as maybe_original_state:
  File "/home/codespace/.local/share/uv/python/cpython-3.11.12-linux-x86_64-gnu/lib/python3.11/contextlib.py", line 210, in __aenter__
    return await anext(self.gen)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/workspaces/InferAdmin/src/inferadmin/lifespan.py", line 14, in lifespan
    await config_manager.load()
  File "/workspaces/InferAdmin/src/inferadmin/config/loader.py", line 7, in load
    self.config = InferAdminConfig()
                  ^^^^^^^^^^^^^^^^^^
  File "/workspaces/InferAdmin/.venv/lib/python3.11/site-packages/pydantic_settings/main.py", line 176, in __init__
    super().__init__(
  File "/workspaces/InferAdmin/.venv/lib/python3.11/site-packages/pydantic/main.py", line 253, in __init__
    validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pydantic_core._pydantic_core.ValidationError: 2 validation errors for InferAdminConfig
model_storage_path
  Field required [type=missing, input_value={}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.11/v/missing
hf_token
  Field required [type=missing, input_value={}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.11/v/missing

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