From 9d65463f3dc5d257fd1610bcac44e530d5959848 Mon Sep 17 00:00:00 2001 From: dreamerlin <528557675@qq.com> Date: Wed, 16 Sep 2020 20:19:16 +0800 Subject: [PATCH 1/5] add exp_name --- tools/train.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/train.py b/tools/train.py index 7371898619..c7bdca9293 100644 --- a/tools/train.py +++ b/tools/train.py @@ -120,6 +120,7 @@ def main(): set_random_seed(args.seed, deterministic=args.deterministic) cfg.seed = args.seed meta['seed'] = args.seed + meta['exp_name'] = osp.basename(args.config) model = build_model( cfg.model, train_cfg=cfg.train_cfg, test_cfg=cfg.test_cfg) From b6da15aad342f16a175133303c0c808e039f996a Mon Sep 17 00:00:00 2001 From: dreamerlin <528557675@qq.com> Date: Wed, 16 Sep 2020 20:41:23 +0800 Subject: [PATCH 2/5] update changelog --- docs/changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/changelog.md b/docs/changelog.md index 75683b32cc..c67d433f78 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -15,6 +15,7 @@ **Improvements** - Support to run a demo with a video url ([#165](https://github.com/open-mmlab/mmaction2/pull/165)) - Add tutorial for adding a new learning rate updater ([#181](https://github.com/open-mmlab/mmaction2/pull/181)) +- Add experiment name in meta info ([#183](https://github.com/open-mmlab/mmaction2/pull/183)) - Remove git hash in `__version__` ([#189](https://github.com/open-mmlab/mmaction2/pull/189)) - Check mmcv version ([#189](https://github.com/open-mmlab/mmaction2/pull/189)) From 74ee53ae3300c24c66ff4f519378cc2055720a8c Mon Sep 17 00:00:00 2001 From: dreamerlin <528557675@qq.com> Date: Tue, 22 Sep 2020 22:46:38 +0800 Subject: [PATCH 3/5] add cfg_name rather than exp_name --- docs/changelog.md | 2 +- tools/train.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/changelog.md b/docs/changelog.md index c67d433f78..6eca0fd803 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -15,7 +15,7 @@ **Improvements** - Support to run a demo with a video url ([#165](https://github.com/open-mmlab/mmaction2/pull/165)) - Add tutorial for adding a new learning rate updater ([#181](https://github.com/open-mmlab/mmaction2/pull/181)) -- Add experiment name in meta info ([#183](https://github.com/open-mmlab/mmaction2/pull/183)) +- Add config name in meta info ([#183](https://github.com/open-mmlab/mmaction2/pull/183)) - Remove git hash in `__version__` ([#189](https://github.com/open-mmlab/mmaction2/pull/189)) - Check mmcv version ([#189](https://github.com/open-mmlab/mmaction2/pull/189)) diff --git a/tools/train.py b/tools/train.py index c7bdca9293..0642d22313 100644 --- a/tools/train.py +++ b/tools/train.py @@ -120,7 +120,7 @@ def main(): set_random_seed(args.seed, deterministic=args.deterministic) cfg.seed = args.seed meta['seed'] = args.seed - meta['exp_name'] = osp.basename(args.config) + meta['cfg_name'] = osp.basename(args.config) model = build_model( cfg.model, train_cfg=cfg.train_cfg, test_cfg=cfg.test_cfg) From 44aa0878a73f0c701e3713224bb8ed94eceafbd0 Mon Sep 17 00:00:00 2001 From: dreamerlin <528557675@qq.com> Date: Wed, 23 Sep 2020 13:28:06 +0800 Subject: [PATCH 4/5] cfg->config, add 'work_dir' in meta --- tools/train.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/train.py b/tools/train.py index 0642d22313..70245ba7ea 100644 --- a/tools/train.py +++ b/tools/train.py @@ -120,7 +120,8 @@ def main(): set_random_seed(args.seed, deterministic=args.deterministic) cfg.seed = args.seed meta['seed'] = args.seed - meta['cfg_name'] = osp.basename(args.config) + meta['config_name'] = osp.basename(args.config) + meta['work_dir'] = osp.abspath(cfg.work_dir) model = build_model( cfg.model, train_cfg=cfg.train_cfg, test_cfg=cfg.test_cfg) From 0076ff93b56234f924d713035d9d381dc0a61547 Mon Sep 17 00:00:00 2001 From: dreamerlin <528557675@qq.com> Date: Wed, 23 Sep 2020 13:55:42 +0800 Subject: [PATCH 5/5] update 'work_dir' in meta --- tools/train.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/train.py b/tools/train.py index 70245ba7ea..9ed8359a78 100644 --- a/tools/train.py +++ b/tools/train.py @@ -121,7 +121,7 @@ def main(): cfg.seed = args.seed meta['seed'] = args.seed meta['config_name'] = osp.basename(args.config) - meta['work_dir'] = osp.abspath(cfg.work_dir) + meta['work_dir'] = osp.basename(cfg.work_dir.rstrip('/\\')) model = build_model( cfg.model, train_cfg=cfg.train_cfg, test_cfg=cfg.test_cfg)