areusch commented on a change in pull request #10608:
URL: https://github.com/apache/tvm/pull/10608#discussion_r833596336
##########
File path: python/tvm/driver/tvmc/compiler.py
##########
@@ -153,7 +153,10 @@ def drive_compile(args):
Zero if successfully completed
"""
- tvmc_model = frontends.load_model(args.FILE, args.model_format,
args.input_shapes)
+ try:
+ tvmc_model = frontends.load_model(args.FILE, args.model_format,
args.input_shapes)
+ except FileNotFoundError:
+ raise TVMCException(f"Input file {args.FILE} does not exist!")
Review comment:
what about just checking if `os.exists(args.FILE)` rather than assuming
all FileNotFoundError relate to the input file?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]