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, 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.

  • training_metrics (TrainingMetrics) – The metrics payload reported by a trust.

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

Raises:

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