Skip to content

Commit 4881d30

Browse files
committed
Fix the helper function that has been broken after a merge
1 parent d41e8ea commit 4881d30

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Diff for: src/deepsparse/utils/onnx.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -478,17 +478,17 @@ def truncate_onnx_embedding_model(
478478
return output_filepath, tmp_file
479479

480480

481-
def default_cached_outputs(model: Union[str, ModelProto]) -> List[bool]:
481+
def default_cached_outputs(model_path: str) -> List[bool]:
482482
"""
483483
Get a list of bools that indicate which outputs should be cached.
484484
The elements that are set to True correspond to cached outputs,
485485
the rest are set to False.
486486
487-
:param model_path: Path to a model
487+
:param model_path: Path to the model.
488488
:return A list of bools that indicate which outputs should be cached.
489489
"""
490490

491-
outputs = get_output_names(model_path)
492-
assert len(outputs) > 0
491+
output_names = get_output_names(model_path)
492+
assert len(output_names) > 0
493493

494-
return [output.name.startswith(CACHE_OUTPUT_PREFIX) for output in outputs]
494+
return [name.startswith(CACHE_OUTPUT_PREFIX) for name in output_names]

0 commit comments

Comments
 (0)