From cf812aa0dd3883c8c6679bc69f4db9a54d590e3e Mon Sep 17 00:00:00 2001 From: CarolinaCheng616 <948005247@qq.com> Date: Sat, 19 Dec 2020 12:06:58 +0800 Subject: [PATCH 1/3] fix_merge_config --- tools/test.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/tools/test.py b/tools/test.py index 86315d78f5..994e2afb0f 100644 --- a/tools/test.py +++ b/tools/test.py @@ -102,15 +102,18 @@ def main(): # Load output_config from cfg output_config = cfg.get('output_config', {}) - # Overwrite output_config from args.out - output_config = Config._merge_a_into_b(dict(out=args.out), output_config) + if args.out: + # Overwrite output_config from args.out + output_config = Config._merge_a_into_b(dict(out=args.out), output_config) # Load eval_config from cfg eval_config = cfg.get('eval_config', {}) - # Overwrite eval_config from args.eval - eval_config = Config._merge_a_into_b(dict(metrics=args.eval), eval_config) - # Add options from args.eval_options - eval_config = Config._merge_a_into_b(args.eval_options, eval_config) + if args.eval: + # Overwrite eval_config from args.eval + eval_config = Config._merge_a_into_b(dict(metrics=args.eval), eval_config) + if args.eval_options: + # Add options from args.eval_options + eval_config = Config._merge_a_into_b(args.eval_options, eval_config) assert output_config or eval_config, \ ('Please specify at least one operation (save or eval the ' From a276e5425e7c2391d85b80d1cf9f5aedcc5271e2 Mon Sep 17 00:00:00 2001 From: CarolinaCheng616 <948005247@qq.com> Date: Sat, 19 Dec 2020 12:47:43 +0800 Subject: [PATCH 2/3] pre-commit --- tools/test.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/test.py b/tools/test.py index 994e2afb0f..b50f8de9cb 100644 --- a/tools/test.py +++ b/tools/test.py @@ -104,13 +104,15 @@ def main(): output_config = cfg.get('output_config', {}) if args.out: # Overwrite output_config from args.out - output_config = Config._merge_a_into_b(dict(out=args.out), output_config) + output_config = Config._merge_a_into_b( + dict(out=args.out), output_config) # Load eval_config from cfg eval_config = cfg.get('eval_config', {}) if args.eval: # Overwrite eval_config from args.eval - eval_config = Config._merge_a_into_b(dict(metrics=args.eval), eval_config) + eval_config = Config._merge_a_into_b( + dict(metrics=args.eval), eval_config) if args.eval_options: # Add options from args.eval_options eval_config = Config._merge_a_into_b(args.eval_options, eval_config) From b13224dcb33cd39731d3d33219e86394a9eccac8 Mon Sep 17 00:00:00 2001 From: CarolinaCheng616 <948005247@qq.com> Date: Sat, 19 Dec 2020 12:54:14 +0800 Subject: [PATCH 3/3] add changelog --- docs/changelog.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/changelog.md b/docs/changelog.md index 3e56586252..a7f1e64358 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -13,12 +13,13 @@ - Support training and testing for Spatio-Temporal Action Detection ([#351](https://github.com/open-mmlab/mmaction2/pull/351)) - Fix CI due to pip upgrade ([#454](https://github.com/open-mmlab/mmaction2/pull/454)) - Add markdown lint in pre-commit hook ([#255](https://github.com/open-mmlab/mmaction2/pull/225)) -- Use title case in modelzoo statistics. ([#456](https://github.com/open-mmlab/mmaction2/pull/456)) +- Use title case in modelzoo statistics ([#456](https://github.com/open-mmlab/mmaction2/pull/456)) - Add FAQ documents for easy troubleshooting. ([#413](https://github.com/open-mmlab/mmaction2/pull/413), [#420](https://github.com/open-mmlab/mmaction2/pull/420), [#439](https://github.com/open-mmlab/mmaction2/pull/439)) **Bug and Typo Fixes** -- Fix typo in default argument of BaseHead. ([#446](https://github.com/open-mmlab/mmaction2/pull/446)) +- Fix typo in default argument of BaseHead ([#446](https://github.com/open-mmlab/mmaction2/pull/446)) +- Fix potential bug about `output_config` overwrite ([#463](https://github.com/open-mmlab/mmaction2/pull/463)) **ModelZoo**