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):
149149 raise
150150 else :
151151 for input_metadata in input_metadata_list :
152- if not util .is_dict (input_metadata ):
152+ if not util .is_dict (sample ):
153153 expected_keys = [metadata .name for metadata in input_metadata_list ]
154154 raise UserException (
155155 "expected sample to be a dictionary with keys {}" .format (
@@ -160,7 +160,9 @@ def convert_to_onnx_input(sample, input_metadata_list):
160160 if sample .get (input_metadata .name ) is None :
161161 raise UserException ('missing key "{}"' .format (input_metadata .name ))
162162 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+ )
164166 except CortexException as e :
165167 e .wrap ('key "{}"' .format (input_metadata .name ))
166168 raise
You can’t perform that action at this time.
0 commit comments