From 28b818d48125edc1818f251b28ba5f335bbf04f1 Mon Sep 17 00:00:00 2001 From: Ailing Date: Fri, 23 Dec 2022 05:36:12 -0800 Subject: [PATCH] [bug] Fix taichi_ngp starting from ti example (#6973) If you start `ti example` and type `66` (taichi_ngp) it crashes and complains about unknown arg `example`. This PR fixes it. Issue: # ### Brief Summary --- python/taichi/examples/rendering/taichi_ngp.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/taichi/examples/rendering/taichi_ngp.py b/python/taichi/examples/rendering/taichi_ngp.py index 2082a4c6bdd6c..91e4e371e9cec 100644 --- a/python/taichi/examples/rendering/taichi_ngp.py +++ b/python/taichi/examples/rendering/taichi_ngp.py @@ -1106,4 +1106,5 @@ def main(args): parser.add_argument('--model_path', type=str, default=None) parser.add_argument('--gui', action='store_true', default=False) parser.add_argument('--print_profile', action='store_true', default=False) - main(parser.parse_args()) + cmd_args, _ = parser.parse_known_args() + main(cmd_args)