Skip to content

Commit

Permalink
always prioritize tags from model (#3789)
Browse files Browse the repository at this point in the history
  • Loading branch information
RafalSkolasinski authored Dec 7, 2021
1 parent 655b718 commit 9417602
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion python/seldon_core/batch_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,11 @@ def _send_batch_predict_multi_request(
try:
new_response = copy.deepcopy(response)
if data_type == "raw":
new_response["meta"]["tags"].update(raw_input_tags[i])
# This is for tags from model to take priority (match BATCH_SIZE: 1 behaviour)
new_response["meta"]["tags"] = {
**raw_input_tags[i],
**new_response["meta"]["tags"],
}
if payload_type == "ndarray":
# Format new responses for each original prediction request
new_response["data"]["ndarray"] = [response["data"]["ndarray"][i]]
Expand Down

0 comments on commit 9417602

Please sign in to comment.