flip_api.private_services.invoke_model_status_update

Attributes

router

Functions

invoke_model_status_update_endpoint(, db, _, str])

Update a model's status. Restricted to internal FL services via internal service key authentication.

Module Contents

flip_api.private_services.invoke_model_status_update.router
flip_api.private_services.invoke_model_status_update.invoke_model_status_update_endpoint(model_id: uuid.UUID, model_status: flip_api.domain.schemas.status.ModelStatus = Path(..., title='New model status'), db: sqlmodel.Session = Depends(get_session), _: None = Depends(authenticate_internal_service)) dict[str, str]

Update a model’s status. Restricted to internal FL services via internal service key authentication.

This endpoint is internal-only: it accepts requests from the fl-server on the Central Hub (authenticated via INTERNAL_SERVICE_KEY_HEADER).

Parameters:
  • model_id (UUID) – The ID of the model whose status is to be updated.

  • model_status (ModelStatus) – The new status to set for the model.

  • db (Session) – The database session, provided by dependency injection.

Returns:

A dictionary containing the result of the status update operation.

Return type:

dict[str, str]

Raises:

HTTPException – If the model does not exist or there is a database/server error.