Skip to content

Commit

Permalink
refine code
Browse files Browse the repository at this point in the history
  • Loading branch information
WeldonWangwang committed Jan 10, 2024
1 parent 94b2391 commit 8fe4b84
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions optimum/intel/openvino/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,13 @@ def _print_compiled_model_properties(compiled_model):
for k in keys:
try:
value = compiled_model.get_property(k)
if k == properties.device.properties():
for device_key in value.keys():
logger.info(f" {device_key}:")
for k2, value2 in value.get(device_key).items():
if k2 not in skip_keys:
logger.info(f" {k2}: {value2}")
else:
logger.info(f" {k}: {value}")
except Exception:
logger.error(f"[error] Get property of '{k}' failed")
if k == properties.device.properties():
for device_key in value.keys():
logger.info(f" {device_key}:")
for k2, value2 in value.get(device_key).items():
if k2 not in skip_keys:
logger.info(f" {k2}: {value2}")
else:
logger.info(f" {k}: {value}")

0 comments on commit 8fe4b84

Please sign in to comment.