Skip to content

Commit 14df77d

Browse files
Improved MME support for TF
1 parent c38b7ed commit 14df77d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/source_dir/inference_tf_clean_model2/inference.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def _process_output(data, context):
4848

4949
if response_content_type == 'application/json':
5050
d_json = json.loads(d)
51-
d[0] = d[0] + 20000 # alter prediction for model 2
51+
d_json['predictions'][0] = d_json['predictions'][0] + 20000 # alter prediction for model 2
5252
d = json.dumps(d_json['predictions'])
5353

5454
prediction = d

tests/source_dir/inference_tf_model2/inference.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def _process_output(data, context):
5555

5656
if response_content_type == 'application/json':
5757
d_json = json.loads(d)
58-
d[0] = d[0] + 20000 # alter prediction for model 2
58+
d_json['predictions'][0] = d_json['predictions'][0] + 20000 # alter prediction for model 2
5959
d = json.dumps(d_json['predictions'])
6060

6161
prediction = d

0 commit comments

Comments
 (0)