Skip to content
Snippets Groups Projects
Commit 572ede7f authored by Simon Will's avatar Simon Will
Browse files

Make model parameter obligatory in /validate view

parent 7f5df260
No related branches found
No related tags found
No related merge requests found
......@@ -13,7 +13,10 @@ from joeynmt_server.trainer import validate as validate_on_data
@current_app.route('/validate', methods=['POST'])
def validate():
data = request.json
config_basename = data.get('model')
if 'model' in data:
config_basename = data['model']
else:
return jsonify({'error': 'No model specified.'}), 400
dataset = data.get('dataset', 'dev')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment