Skip to content

Commit

Permalink
fix: Update type check
Browse files Browse the repository at this point in the history
  • Loading branch information
rapsealk committed Oct 17, 2024
1 parent 596c15e commit 5c573f1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/ai/backend/manager/api/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -745,15 +745,17 @@ class StartHuggingFaceModelResponse(BaseModel):
service: Service | None = Field(default=None)


@auth_required
@auth_required # type: ignore
@server_status_required(ALL_ALLOWED)
@pydantic_params_api_handler(StartHuggingFaceModelRequest)
@pydantic_response_api_handler
async def start_huggingface_model(
request: web.Request, params: StartHuggingFaceModelRequest
) -> StartHuggingFaceModelResponse:
root_ctx: RootContext = request.app["_root.context"]
author, model_name, *_ = params.huggingface_url.path.lstrip("/").split("/")
if (huggingface_path := params.huggingface_url.path) is None:
raise URLNotFound
author, model_name, *_ = huggingface_path.lstrip("/").split("/")
postfix = uuid.uuid4().hex[:4]
service_name = params.service_name or f"hf-model-service-{postfix}"
folder_name = params.folder_name or f"vf-model-service-{postfix}"
Expand Down

0 comments on commit 5c573f1

Please sign in to comment.