Skip to content

Commit 2d56e58

Browse files
author
nrandriamanana
committed
test image pull argocd
1 parent 92de039 commit 2d56e58

1 file changed

Lines changed: 15 additions & 9 deletions

File tree

src/api/routes/predict.py

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,18 @@ async def predict(
5252
},
5353
}
5454

55-
model = request.app.state.model
56-
57-
response = []
58-
for out in model.predict(input_data, params=params_dict):
59-
out_dict = out.model_dump()
60-
out_dict["MLversion"] = model.metadata.run_id
61-
response.append(out_dict)
62-
logging.info(response)
63-
return response
55+
output = request.app.state.model.predict(input_data, params=params_dict)
56+
57+
return [out.model_dump() for out in output]
58+
59+
# TO ADD DIRECTLY FROM INFERENCE
60+
61+
# model = request.app.state.model
62+
63+
# response = []
64+
# for out in model.predict(input_data, params=params_dict):
65+
# out_dict = out.model_dump()
66+
# out_dict["MLversion"] = model.metadata.run_id
67+
# response.append(out_dict)
68+
69+
# return response

0 commit comments

Comments
 (0)