flip_api.private_services.services.private_service

Functions

save_training_metrics(→ None)

Saves the provided training metrics to the database.

Module Contents

flip_api.private_services.services.private_service.save_training_metrics(model_id: uuid.UUID, trust: flip_api.db.models.main_models.Trust, training_metrics: flip_api.domain.schemas.private.TrainingMetrics, db: sqlmodel.Session) None

Saves the provided training metrics to the database.

Parameters:
  • model_id (UUID) – The ID of the model these metrics belong to.

  • trust (Trust) – The trust the metric is attributed to, resolved from the reported FL client name by the endpoint.

  • training_metrics (TrainingMetrics) – The metrics payload reported by an FL client.

  • db (Session) – The SQLModel session used for the insert.

Raises:

Exception – Re-raises any database error after rolling back the session.