How can i limit training time using relative training time?
Hello guys i am doing some study on my agent i need to compare some training sesions. I know i can limit my trainig time using max_setps parameter in config file. But is it possible to limit training not by setps but with training time duration. For example if i want to train model only 30 minutes.
You can do basic math by measuring how many seconds are in 100 steps and do the math from there.
Yeah, but time of 1 step is not constant and it depend on many configuration aspects. However o already came up with solution that is maybe not the best but it works, i measure the time on Unity side using unscaled time and call:
UnityEditor.EditorApplication.ExecuteMenuItem("Edit/Play");
... when it extends maximum time.
wait, how are steps not constant? They should be constant. An agent takes action every X steps (set in Decision Interval of an agent). You can set max_steps = 100 and calculate how long an episode takes at maximum.
I mean that time of one step can vary between different training sessions due to different parameters of training i.e. decision interval.
how do we know that for certain? I'd think the steps would be constant.
@roboserg i used to think same as you. I am analiysing training summaries for different training sessions using tensorboard. Changing some paramterers usualy makes relative small difference, but if you f.e. swtich between PPO and BC the difference is huge.
Hi @oseq, you are right, training time could be vastly different depending on how fast samples are gathered from the Unity executable. BC is an entirely different beast as well, since it trains purely from .demo files and doesn't really use the Unity game for training.
Since we now keep track of the time elapsed, you could add a check for time as well as max steps in trainer.py (here). If you get it to work, we'd definitely welcome a PR!
@ervteng Arent steps itself, constantly in time? The ones we are setting with "max_steps" and "decision interval" etc? Environment steps of the simulation.
Thanks for submitting this request. I’ve shared it with the team, so I’m going to close this issue for now.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.