Uh oh!
There was an error while loading. Please reload this page.
[TVMC] compile: Check if FILE exists - #10608
Conversation
gromero
commented
Mar 14, 2022
cc @leandron |
@leandron Thanks for the review. Do you know what's not pleasing the CI now? The result says: I really have no clue what happens here... |
leandron
commented
Mar 15, 2022
Looks like a transient: see |
@leandron hmm I see it now. But also it says: and since it's in the CI, shouldn't we mark it as "xfail" ? I think reporting every time in HG it fails in the CI is a big ask no? |
gromero
commented
Mar 15, 2022
Anyways, I'm re-triggering 👍 |
eb20470 to
7765793Compare| 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!") |
There was a problem hiding this comment.
what about just checking if os.exists(args.FILE) rather than assuming all FileNotFoundError relate to the input file?
There was a problem hiding this comment.
@areusch yeah I was unsure about that option or the one I've used. Sure, let's use os.path. I just used os.path.isfile() instead of os.path.exists() because exists() will also return true if FILE is a directory, which is also invalid in that context. PTAL. Thanks!
Currently when a non-existing FILE is passed to 'tvmc compile' it throws a traceback because a FileNotFoundError exception is not handled. Since there is no need for such abrupt exit, and the trace can also confuse users, this commit fixes it by checking if FILE indeed exists, informing the user about the non-existing FILE before exiting. Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
7765793 to
6dd1bc1CompareCurrently when a non-existing FILE is passed to 'tvmc tune' it throws a traceback because a FileNotFoundError exception is not handled. Since there is no need for such abrupt exit, and the trace can also confuse users, this commit fixes it by checking if FILE indeed exists, kindly informing the user about the non-existing FILE before exiting. Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Currently when a non-existing FILE is passed to 'tvmc tune' it throws a traceback because a FileNotFoundError exception is not handled. Since there is no need for such abrupt exit, and the trace can also confuse users, this commit fixes it by checking if FILE indeed exists, kindly informing the user about the non-existing FILE before exiting. Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Currently when a non-existing FILE is passed to 'tvmc tune' it throws a traceback because a FileNotFoundError exception is not handled. Since there is no need for such abrupt exit, and the trace can also confuse users, this commit fixes it by checking if FILE indeed exists, kindly informing the user about the non-existing FILE before exiting.
Currently when a non-existing FILE is passed to 'tvmc compile' it throws a traceback because a FileNotFoundError exception is not handled. Since there is no need for such abrupt exit, and the trace can also confuse users, this commit fixes it by checking if FILE indeed exists, informing the user about the non-existing FILE before exiting. Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Currently when a non-existing FILE is passed to 'tvmc tune' it throws a traceback because a FileNotFoundError exception is not handled. Since there is no need for such abrupt exit, and the trace can also confuse users, this commit fixes it by checking if FILE indeed exists, kindly informing the user about the non-existing FILE before exiting.
Currently when a non-existing FILE is passed to 'tvmc tune' it throws a traceback because a FileNotFoundError exception is not handled. Since there is no need for such abrupt exit, and the trace can also confuse users, this commit fixes it by checking if FILE indeed exists, kindly informing the user about the non-existing FILE before exiting.
Currently when a non-existing FILE is passed to 'tvmc compile' it throws
a traceback because a FileNotFoundError exception is not handled. Since
there is no need for such abrupt exit, and the trace can also confuse
users, this commit fixes it by checking if FILE indeed exists, informing
the user about the non-existing FILE before exiting.