flip_api.private_services.add_log
Attributes
Functions
|
Add a log entry to the database for a specific model. |
Module Contents
- flip_api.private_services.add_log.router
- flip_api.private_services.add_log.add_log_endpoint(model_id: uuid.UUID, training_log: flip_api.domain.schemas.private.TrainingLog, db: sqlmodel.Session = Depends(get_session), _: None = Depends(authenticate_internal_service)) dict[str, str]
Add a log entry to the database for a specific model.
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.
training_log (TrainingLog) – The log entry to be added.
db (Session) – The database session.
- Returns:
A confirmation message indicating the log entry was created.
- Return type:
dict[str, str]
- Raises:
HTTPException – If the trust is not associated with the model or if there is an internal server error.