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

Refine the error message when auto_scale_lr is not set correctly #1181

Merged
merged 5 commits into from
Jun 6, 2023

Conversation

alexander-soare
Copy link
Contributor

Motivation

RuntimeError when attempting to resume a run. It seems the logic for triggering the runtime error is incorrect (or the error message is incorrect, but this PR is based on the assumption that the error message is correct).

Modification

Remove a not to fix the logic. This makes the RuntimeError trigger if self.auto_scale_lr has a key called "enable" and that key is True. This is the desired logic if we consider the error message which asks the user to set "enable" to False to avoid the error.

Checklist

I did this in 30 seconds so admittedly I haven't followed the checklist. I'd be happy to file an issue and allow a core maintainer to carry on from here. Please let me know.

@CLAassistant
Copy link

CLAassistant commented Jun 1, 2023

CLA assistant check
All committers have signed the CLA.

zhouzaida
zhouzaida previously approved these changes Jun 2, 2023
@zhouzaida zhouzaida self-requested a review June 2, 2023 03:05
mmengine/runner/runner.py Outdated Show resolved Hide resolved
@zhouzaida zhouzaida self-requested a review June 2, 2023 03:32
Co-authored-by: Alexander Soare <alexander.soare159@gmail.com>
@zhouzaida zhouzaida changed the title fix resume logic when auto_scale_lr is disabled Refine the error message when auto_scale_lr is not set correctly Jun 5, 2023
mmengine/runner/runner.py Outdated Show resolved Hide resolved
@zhouzaida zhouzaida added this to the 0.8.0 milestone Jun 5, 2023
@zhouzaida zhouzaida merged commit 8593691 into open-mmlab:main Jun 6, 2023
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.

3 participants