Skip to content

[Fix] Fix repeating log by setup_multi_processes.#1267

Merged
MeowZheng merged 1 commit intoopen-mmlab:masterfrom
MengzhangLI:fix_repeat_log
Feb 8, 2022
Merged

[Fix] Fix repeating log by setup_multi_processes.#1267
MeowZheng merged 1 commit intoopen-mmlab:masterfrom
MengzhangLI:fix_repeat_log

Conversation

@MengzhangLI
Copy link
Copy Markdown
Contributor

@MengzhangLI MengzhangLI commented Feb 8, 2022

The issue: #1261 reports the error.

In setup_multi_processes, it uses get_logger from MMCV which would initialize new logger if no log initialized.

If setup_multi_processes is used before dump config in train.py, it would create two different logs in mmseg.

Solution is simple, just move setup_multi_processes behind of get_logger part of train.py.

@MengzhangLI MengzhangLI self-assigned this Feb 8, 2022
@MengzhangLI MengzhangLI requested a review from MeowZheng February 8, 2022 05:31
@MengzhangLI
Copy link
Copy Markdown
Contributor Author

Before modification, the log would repeat N times where N is number of used GPU.

image

After modification, it is fixed.

image

@MeowZheng MeowZheng merged commit af88b86 into open-mmlab:master Feb 8, 2022
@MengzhangLI MengzhangLI mentioned this pull request Feb 9, 2022
@MengzhangLI MengzhangLI deleted the fix_repeat_log branch February 16, 2022 11:11
bowenroom pushed a commit to bowenroom/mmsegmentation that referenced this pull request Feb 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants