-
Notifications
You must be signed in to change notification settings - Fork 155
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
frames comparison within max epoch if #212
Comments
Fixed in #213 |
@alex-petrenko ^_^ |
@ankurhanda can you confirm the issue is fixed for you? |
@ViktorM Looks good https://github.com/Denys88/rl_games/blob/master/rl_games/common/a2c_common.py#L1014-L1032 I will retrain and verify soon. |
This is still a problem because max_frames are set in default in the code so if epochs have not reached max_epochs it will still enter the 2nd if condition and end the training. |
@ankurhanda can we just set it to something very large by default, like 10 trillion? |
@ankurhanda in your example, it won't enter the 2nd condition as the default max_frames value is -1. @alex-petrenko there were many issues with max_frames code. Linear learning rate wasn't updated properly when max_frames, but not max_epochs were set. Misleading message when max_frame was reached, it notified instead that max_epochs were reached and a few cosmetic ones. |
Thank you for fixing these. I was not aware an extra stopping condition can affect learning rate. |
Extra stopping condition is not affecting. But the linear scheduler itself instead of current_epoch and max_epoch should be using current_frame and max_frames to calculate the current learning rate if we have max_frames as a stopping condition. |
The current a2c_common.py has
self.frame >= self.max_frames
in the same if withself.epochs >= self.max_epochs
rl_games/rl_games/common/a2c_common.py
Lines 978 to 984 in d8645b2
It used to be like this https://github.com/ArthurAllshire/rl_games/blob/master/rl_games/common/a2c_common.py#L1243-L1248
The other issue is that when the if condition returns True it always prints
MAX EPOCHS NUM!
which is not an accurate description because I was running my code and it would print this even when epochs hadn't reached their max. Need to have a separate if condition sayingMAX FRAMES NUM!
. Though I think what we had earlier is enough and we don't need to add another check on frames.The text was updated successfully, but these errors were encountered: