You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extend the API to return MLflow tracking information as part of a
training or evaluation response, including the experiment and run IDs,
and update the tests accordingly. If training is already in progress,
the API returns the experiment and run IDs of the current training run.
This affects the following routes:
* POST /train_supervised
* POST /train_unsupervised
* POST /train_unsupervised_with_hf_hub_dataset
* POST /train_metacat
* POST /evaluate
Signed-off-by: Phoevos Kalemkeris <[email protected]>
returnJSONResponse(content={"message": "Your evaluation started successfully.", "evaluation_id": evaluation_id}, status_code=HTTP_202_ACCEPTED)
64
+
returnJSONResponse(
65
+
content={
66
+
"message": "Your evaluation started successfully.",
67
+
"evaluation_id": evaluation_id,
68
+
"experiment_id": experiment_id,
69
+
"run_id": run_id,
70
+
}, status_code=HTTP_202_ACCEPTED
71
+
)
63
72
else:
64
-
returnJSONResponse(content={"message": "Another training or evaluation on this model is still active. Please retry later."}, status_code=HTTP_503_SERVICE_UNAVAILABLE)
73
+
returnJSONResponse(
74
+
content={
75
+
"message": "Another training or evaluation on this model is still active. Please retry later.",
logger.debug("Training accepted with ID: %s", training_id)
74
-
returnJSONResponse(content={"message": "Your training started successfully.", "training_id": training_id}, status_code=HTTP_202_ACCEPTED)
75
+
returnJSONResponse(
76
+
content={
77
+
"message": "Your training started successfully.",
78
+
"training_id": training_id,
79
+
"experiment_id": experiment_id,
80
+
"run_id": run_id,
81
+
}, status_code=HTTP_202_ACCEPTED
82
+
)
75
83
else:
76
84
logger.debug("Training refused due to another active training or evaluation on this model")
77
-
returnJSONResponse(content={"message": "Another training or evaluation on this model is still active. Please retry your training later."}, status_code=HTTP_503_SERVICE_UNAVAILABLE)
85
+
returnJSONResponse(
86
+
content={
87
+
"message": "Another training or evaluation on this model is still active. Please retry your training later.",
logger.debug("Training accepted with ID: %s", training_id)
78
-
returnJSONResponse(content={"message": "Your training started successfully.", "training_id": training_id}, status_code=HTTP_202_ACCEPTED)
79
+
returnJSONResponse(
80
+
content={
81
+
"message": "Your training started successfully.",
82
+
"training_id": training_id,
83
+
"experiment_id": experiment_id,
84
+
"run_id": run_id,
85
+
}, status_code=HTTP_202_ACCEPTED
86
+
)
79
87
else:
80
88
logger.debug("Training refused due to another active training or evaluation on this model")
81
-
returnJSONResponse(content={"message": "Another training or evaluation on this model is still active. Please retry your training later."}, status_code=HTTP_503_SERVICE_UNAVAILABLE)
89
+
returnJSONResponse(
90
+
content={
91
+
"message": "Another training or evaluation on this model is still active. Please retry your training later.",
logger.debug("Training accepted with ID: %s", training_id)
152
-
returnJSONResponse(content={"message": "Your training started successfully.", "training_id": training_id}, status_code=HTTP_202_ACCEPTED)
153
+
returnJSONResponse(
154
+
content={
155
+
"message": "Your training started successfully.",
156
+
"training_id": training_id,
157
+
"experiment_id": experiment_id,
158
+
"run_id": run_id,
159
+
}, status_code=HTTP_202_ACCEPTED
160
+
)
153
161
else:
154
162
logger.debug("Training refused due to another active training or evaluation on this model")
155
-
returnJSONResponse(content={"message": "Another training or evaluation on this model is still active. Please retry later."}, status_code=HTTP_503_SERVICE_UNAVAILABLE)
163
+
returnJSONResponse(
164
+
content={
165
+
"message": "Another training or evaluation on this model is still active. Please retry later.",
0 commit comments