Dedicated WandbLogger for MMDetection#7413
Dedicated WandbLogger for MMDetection#7413ayulockin wants to merge 14 commits intoopen-mmlab:masterfrom
Conversation
|
ayulockin seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
Codecov Report
@@ Coverage Diff @@
## master #7413 +/- ##
==========================================
- Coverage 63.45% 63.12% -0.34%
==========================================
Files 340 341 +1
Lines 27493 27687 +194
Branches 4645 4688 +43
==========================================
+ Hits 17446 17477 +31
- Misses 9119 9284 +165
+ Partials 928 926 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
|
Hellow @ayulockin. Thank you for your contributions. I have left some comments above. |
|
Hi @ayulockin , |
Hey @ZwwWayne, even though I am signing the CLA it's not showing up here. Do you have any clue as to why this is the case? |
|
|
||
| @master_only | ||
| def after_run(self, runner): | ||
| self.wandb.finish() |
There was a problem hiding this comment.
As you can see I have overwritten the after_run method of mmcv.WandbLoggerHook. Do you want me to use super() instead?
The current mmcv.WandbLoggerHook logs the files with output_prefix as artifacts, however, this dedicated logger makes use of the artifacts better. If you think, it's best to not override, I will revert the change.
|
Hey @jbwang1997 @ZwwWayne, I am not able to sign the CLA probably because, the email id that was configured with git for few of the initial commits is not linked to my GitHub account (there might be a typo). If it's not an issue, can I make a new PR from a new branch so that I can sign the CLA. Ideally, would love to get the review process done and then we can close this PR and I can open a new PR for merger. Apologies for inconvenience. |
You are welcome to open a new pr. This is awesome work and we can continue to discuss this function in the new pr. |
|
@ayulockin Very meaningful work!Thank you very much for your contribution. |
| super(WandbLogger, self).before_run(runner) | ||
| self.cfg = self.wandb.config | ||
| # Check if configuration is passed to wandb. | ||
| if len(dict(self.cfg)) == 0: | ||
| warnings.warn( | ||
| 'To log mmdetection Config, ' | ||
| 'pass it to init_kwargs of WandbLogger.', UserWarning) |
There was a problem hiding this comment.
The config in mmdetection is too huge for users to be added by init_kwargs. Is it possible to add config from the file?
There was a problem hiding this comment.
By adding config from file, do you mean log something like this - here's an example command line:
python tools/train.py configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco.py
Do you want to log the config from configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco.py? It's doable in my opinion.
There was a problem hiding this comment.
On second thought, here's another solution for logging config easily, however it will require a PR in the MMCV repo.
|
@ayulockin Thank you so much for your awesome contributions again. I am now running some samples with this function. After running, I will give you more detailed feedback on this function. I left some small comments above. You can fix them and open a new pr. |
|
Closing this PR in favor of #7459. |

As per the discussion in this issue #7391, I have opened this PR to introduce a dedicated
WandbLoggerfor MMDetection.Motivation
The goal and motivation for this PR are mentioned in detail in this #7391 issue.
Modification
The PR adds a new file
wandblogger_hook.pywhere all the Weights and Biases related logic lives. The features that are introduced are explained in detail in my initial issue.Other than this file, there is a small modification to the
eval_hook.pyfile. It was made so that theWandbLoggercan access the evaluation results.I am really looking forward to all the feedback. I would love to answer questions if any. If you require a colab to test out the feature, I can provide that as well. However, using it is straightforward as shown in the code snippet below.
Checklist