@training_job_controller.route('/training-jobs', methods=['POST'])
def create_trainingjob():
try:
- LOGGER.debug(f"Request for training job with JSON: {request.get_json()}")
request_json = request.get_json()
+ LOGGER.debug(f"Request for training job with JSON: {request_json}")
+
if not check_key_in_dictionary(["training_config"], request_json):
return ProblemDetails(400, "Bad Request", "The 'training_config' field is missing.").to_json()
request_json['training_config'] = json.dumps(request_json["training_config"])
return jsonify(model_metrics), 200
except Exception as err:
LOGGER.error(f"Error Getting model_metrics of trainingJob-ID {trainingjob_id}: {str(err)}")
- return ProblemDetails(500, "Internal Server Error", str(err)).to_json()
\ No newline at end of file
+ return ProblemDetails(500, "Internal Server Error", str(err)).to_json()