From c3a6ab02da3192aa18cda85d66d957a11aacfa10 Mon Sep 17 00:00:00 2001 From: David Novotny Date: Fri, 25 Nov 2022 10:30:01 -0800 Subject: [PATCH] Bug-fix visualize reconstruction Summary: Addresses the following issue: https://github.com/facebookresearch/pytorch3d/issues/1345#issuecomment-1272881244 I.e., when installed from conda, `pytorch3d_implicitron_visualizer` crashes since it invokes `main()` while `main` requires a single positional arg `argv`. Reviewed By: shapovalov Differential Revision: D41533497 fbshipit-source-id: e53a923eb8b2f0f9c0e92e9c0866d9cb310c4799 --- projects/implicitron_trainer/visualize_reconstruction.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/implicitron_trainer/visualize_reconstruction.py b/projects/implicitron_trainer/visualize_reconstruction.py index b1441fc52..4532055a0 100644 --- a/projects/implicitron_trainer/visualize_reconstruction.py +++ b/projects/implicitron_trainer/visualize_reconstruction.py @@ -141,7 +141,7 @@ def _get_config_from_experiment_directory(experiment_directory) -> DictConfig: return OmegaConf.merge(get_default_args(Experiment), config) -def main(argv) -> None: +def main(argv=sys.argv) -> None: # automatically parses arguments of visualize_reconstruction cfg = OmegaConf.create(get_default_args(visualize_reconstruction)) cfg.update(OmegaConf.from_cli(argv)) @@ -150,4 +150,4 @@ def main(argv) -> None: if __name__ == "__main__": - main(sys.argv) + main()