Skip to content

Commit

Permalink
[#263] add passing model_id and model_version as headers
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelbotsman committed Dec 27, 2018
1 parent 320e389 commit af816ec
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions legion/legion/serving/pyserve.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,10 @@ def model_invoke(model_id, model_version, endpoint='default'):

output = model.endpoints[endpoint].invoke(input_dict)
response = legion.http.prepare_response(output)
response.headers[legion.containers.headers.MODEL_ID] = model_id
response.headers[legion.containers.headers.MODEL_VERSION] = model_version
response.headers[legion.containers.headers.MODEL_ENDPOINT] = endpoint

return response


Expand Down

0 comments on commit af816ec

Please sign in to comment.