flip_api.domain.schemas.private
Classes
One FL training/evaluation metric point. Mirrors flip-utils' |
|
One row for |
|
Response model for a single trust task. |
|
Input model for submitting a task result. |
Module Contents
- class flip_api.domain.schemas.private.OmopCohortResults
Bases:
pydantic.BaseModel- query_id: uuid.UUID
- trust_id: uuid.UUID
- created: str
- record_count: int
- error: str | None = None
- suppressed: bool = False
- ensure_data_is_list(value: Any) list[Any]
- class flip_api.domain.schemas.private.TrainingMetrics
Bases:
pydantic.BaseModelOne FL training/evaluation metric point. Mirrors flip-utils’
flip/schemas.py(the sender).global_roundis provenance — always the FL global round the metric was reported in, never overridden. The plot coordinate is the (x_label,x_value) pair, defaulting to the global round on the “Global Rounds” axis — see FLIP#148.- fl_client_name: str
- global_round: int
- label: str
- result: float
- x_value: float
- x_label: str
- classmethod _default_x_value_to_global_round(data: Any) Any
Backfill a missing/None
x_valuefromglobal_round(back-compat with old senders).
- class flip_api.domain.schemas.private.TrainingLog
Bases:
pydantic.BaseModelOne row for
POST /model/{id}/logs: free text XOR a typed round event.Mirrored in
flip-utils/flip/schemas.py(the FL-side sender) — keep the two in sync. Two mutually exclusive shapes:Free text (
logset): exception reports and legacy messages. The text is stored and served verbatim.Typed event (
event_typeset): a round-progress fact. Display text is composed hub-side at serve time, so the FL layer never bakes in wording.
fl_client_nameis the FL kit slot when the row is trust-attributed, orNonefor hub-attributed rows (e.g.ROUND_STARTED). Old FL images keep sending the original{fl_client_name, log}shape — every new field is optional with a compatible default.- fl_client_name: str | None = None
- log: str | None = None
- event_type: str | None
- global_round: int | None
- details: dict[str, Any] | None = None
- success: bool = True
- _log_xor_event() TrainingLog
- _bound_details() TrainingLog
- class flip_api.domain.schemas.private.ProjectApprovalBody
Bases:
pydantic.BaseModel- trusts: list[uuid.UUID]
- class flip_api.domain.schemas.private.ProjectApproval
Bases:
pydantic.BaseModel- project_id: uuid.UUID
- trust_ids: list[uuid.UUID]
- class flip_api.domain.schemas.private.TrustSpecificData
Bases:
pydantic.BaseModel- record_count: int
- error: str | None = None
- suppressed: bool = False
- class flip_api.domain.schemas.private.AggregatedTrustFieldResult
Bases:
pydantic.BaseModel- data: Any
- trust_name: str
- trust_id: str
- class flip_api.domain.schemas.private.AggregatedFieldResult
Bases:
pydantic.BaseModel- name: str
- results: list[AggregatedTrustFieldResult]
- class flip_api.domain.schemas.private.AggregatedCohortStats
Bases:
pydantic.BaseModel- record_count: int
- trusts_results: list[AggregatedFieldResult]
- trust_record_counts: dict[str, int]
- trust_errors: dict[str, str]
- trust_suppressed: list[str]
- class flip_api.domain.schemas.private.FetchedAggregationData
Bases:
pydantic.BaseModel- trust_name: list[str]
- trust_id: list[str]
- data: list[str]