@@ -19,24 +19,24 @@ class Prediction(BaseModel):
1919
2020
2121class PredictionResponse (RootModel [Dict [str , Any ]]):
22- """
23- Contract for the normalized prediction responses generated by the model artifact.
24-
25- Expected flat structure after normalization:
26- {
27- "1": Prediction,
28- "2": Prediction,
29- ...,
30- "IC": float, # required confidence score
31- "MLversion": str # required run_id as model version
32- }
33-
34- Notes:
35- - The output reflects what the model artifact produces, but the API applies
36- `model_dump()` in `predict()` before returning to ensure schema consistency.
37- - Strong validation is performed during training; inference focuses on lightweight
38- structural checks for performance.
39- - Any changes to the output schema (e.g., new fields, renaming) must be documented
40- both here and in training repo (codif-ape-training) to maintain API contract clarity.
41- """
42- pass
22+ """
23+ Contract for the normalized prediction responses generated by the model artifact.
24+
25+ Expected flat structure after normalization:
26+ {
27+ "1": Prediction,
28+ "2": Prediction,
29+ ...,
30+ "IC": float, # required confidence score
31+ "MLversion": str # required run_id as model version
32+ }
33+
34+ Notes:
35+ - The output reflects what the model artifact produces, but the API applies
36+ `model_dump()` in `predict()` before returning to ensure schema consistency.
37+ - Strong validation is performed during training; inference focuses on lightweight
38+ structural checks for performance.
39+ - Any changes to the output schema (e.g., new fields, renaming) must be documented
40+ both here and in training repo (codif-ape-training) to maintain API contract clarity.
41+ """
42+ pass
0 commit comments