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