Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhance] LR and Momentum Visualizer #267

Merged
merged 3 commits into from
Jun 27, 2022

Conversation

teamwong111
Copy link
Contributor

@teamwong111 teamwong111 commented May 30, 2022

Motivation

This PR can be used to check curves of lr & momentum in actual training.
Besides, a web demo on Hugging face spaces likes this can be provided to make schedulers accessible. The prototype is here

Modification

Add a script file.

Use cases (Optional)

I have tested it with resnet18_8xb16_cifar10.py in mmcls.

Downstream repo can use

from mmengine.utils.visualize import fake_run
fake_run(cfg)

to replace

runner = Runner.from_cfg(cfg)
runner.train()

in tools/train.py

After training, you can start tensorboard to see curves of lr & momentum.

Checklist

  1. Pre-commit or other linting tools are used to fix the potential lint issues.
  2. The modification is covered by complete unit tests. If not, please add more unit test to ensure the correctness.
  3. If the modification has potential influence on downstream projects, this PR should be tested with downstream projects, like MMDet or MMCls.
  4. The documentation has been modified accordingly, like docstring or example tutorials.

Copy link
Collaborator

@HAOCHENYE HAOCHENYE left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
Why is it here?

@teamwong111 teamwong111 linked an issue Jun 13, 2022 that may be closed by this pull request
@teamwong111
Copy link
Contributor Author

image Why is it here?

Because the momentum logged at iter-0 is updated.

@teamwong111
Copy link
Contributor Author

So our purpose is to make the scheduler accessible or be useful in the training process? If the former, I think this form is more suitable.

Copy link

@Ezra-Yu Ezra-Yu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we plot the curve by using mmengine.Visualizer?

Copy link

@Ezra-Yu Ezra-Yu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@ZwwWayne ZwwWayne merged commit bbe0027 into open-mmlab:main Jun 27, 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.

TODO: It would be helpful if a visualization tool can be provided.
5 participants