Skip to content

Commit 90725b7

Browse files
authored
Update responses.py
1 parent d5d4d10 commit 90725b7

1 file changed

Lines changed: 21 additions & 21 deletions

File tree

src/api/models/responses.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,24 @@ class Prediction(BaseModel):
1919

2020

2121
class 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

Comments
 (0)