gromero commented on a change in pull request #9229:
URL: https://github.com/apache/tvm/pull/9229#discussion_r747901711



##########
File path: python/tvm/driver/tvmc/common.py
##########
@@ -38,6 +41,36 @@
 class TVMCException(Exception):
     """TVMC Exception"""
 
+class TVMCSilentArgumentParser(argparse.ArgumentParser):

Review comment:
       @areusch Hi. PTAL at 
https://github.com/apache/tvm/pull/9229/commits/ffd19e868adb51505843d8090ec61054c6ef1480
 
   
   The approach of adding the help options at the last minute works :) Now I 
think the code is fine. Adding at the last minute for each parser didn't work 
well, but it was in fact only necessary to do that to the main parser (in 
main.py) and additionally ignore the `invalid choice` error in the main parser 
too by overriding the `error` method in `argparse.ArgumentParser`. I've changed 
the name of `TVMCSilentArgumentParser` to `TVMCSuppressedArgumentParser`, since 
that class can't suppress all the error, like for instance, the "required 
argument" error (but that's not necessary).




-- 
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]


Reply via email to