File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
pkg/workloads/cortex/onnx_serve Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ def convert_to_onnx_input(sample, input_metadata_list):
149
149
raise
150
150
else :
151
151
for input_metadata in input_metadata_list :
152
- if not util .is_dict (input_metadata ):
152
+ if not util .is_dict (sample ):
153
153
expected_keys = [metadata .name for metadata in input_metadata_list ]
154
154
raise UserException (
155
155
"expected sample to be a dictionary with keys {}" .format (
@@ -160,7 +160,9 @@ def convert_to_onnx_input(sample, input_metadata_list):
160
160
if sample .get (input_metadata .name ) is None :
161
161
raise UserException ('missing key "{}"' .format (input_metadata .name ))
162
162
try :
163
- input_dict [input_metadata .name ] = transform_to_numpy (sample , input_metadata )
163
+ input_dict [input_metadata .name ] = transform_to_numpy (
164
+ sample [input_metadata .name ], input_metadata
165
+ )
164
166
except CortexException as e :
165
167
e .wrap ('key "{}"' .format (input_metadata .name ))
166
168
raise
You can’t perform that action at this time.
0 commit comments