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

[Bug] Setting EpochBasedTrainLoop.val_begin=0 does not work! #1448

Open
2 tasks done
ChanCody opened this issue Dec 2, 2023 · 0 comments
Open
2 tasks done

[Bug] Setting EpochBasedTrainLoop.val_begin=0 does not work! #1448

ChanCody opened this issue Dec 2, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@ChanCody
Copy link

ChanCody commented Dec 2, 2023

Prerequisite

Environment

mmengine == 0.9.0, but the related code in the latest version is the same.

Reproduces the problem - code sample

Set EpochBasedTrainLoop.val_begin to 0 and run it.

Reproduces the problem - command or script

Set EpochBasedTrainLoop.val_begin to 0 and run it.

Reproduces the problem - error message

The val_loop is still launched after the first epoch.

Additional information

I'm currently using EpochBasedTrainLoop to train my model. After I added a custom Metric, I want to test it before training. So I need to run val_loop before the first epoch. I set the val_begin to 0 but nothing happens.
I checked the code. Move self.run_epoch() line 96 to line 103 in loops.py should fix this bug.

@ChanCody ChanCody added the bug Something isn't working label Dec 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant