Skip to content

Commit

Permalink
pretty print error msg when onnx wheel not available
Browse files Browse the repository at this point in the history
  • Loading branch information
MattToast committed Sep 11, 2023
1 parent b459bf2 commit b1e4fe5
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions smartsim/_core/_cli/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,12 +399,16 @@ def execute(args: argparse.Namespace) -> int:
backends_str = ", ".join(s.capitalize() for s in backends) if backends else "No"
logger.info(f"{backends_str} backend(s) built")

if "torch" in backends:
check_py_torch_version(versions, device)
if "tensorflow" in backends:
check_py_tf_version(versions)
if "onnxruntime" in backends:
check_py_onnx_version(versions)
try:
if "torch" in backends:
check_py_torch_version(versions, device)
if "tensorflow" in backends:
check_py_tf_version(versions)
if "onnxruntime" in backends:
check_py_onnx_version(versions)
except SetupError as e:
logger.error(str(e))
return 1

logger.info("SmartSim build complete!")
return 0
Expand Down

0 comments on commit b1e4fe5

Please sign in to comment.