- Graphical Overhead: The continuous updating of plots and charts can become resource-intensive over time, especially if the number of episodes increases significantly. Try reducing the frequency of updates in the Training Manager. It can be done by adjusting the "Plots" option in the training options to update less frequently or turn off some of the plots temporarily.
- Logging Overhead: Even with minimal logged variables, the overhead of writing data to logs can accumulate, especially if the data is being written to disk frequently.
- Memory Accumulation: The data accumulated from each episode could consume significant memory, slowing down the process. Ensure that unnecessary data is not being stored. Consider clearing variables that are no longer needed or reducing the amount of data logged per episode.
RL Training Manager has progressively slower updates as training progresses
2 views (last 30 days)
Show older comments
I'm training a RL agent using the train function and I'm using the Training Manager to monitor the reward evolution.
I noticed that at the beginning of the training the Training Manager is updated very quickly with the informations related to the latest episodes.
However, as the training progresses, the Training Manager updates become slower and slower. As a consequence, the training itsef slows down noticeably.
Please consider that the simulation environment is moderately complex, but the number of logged variables is absolutely minimal (a few constant values for each simulation).
What could be the reason of the progressive slow-down? Could it be due to some not negligible graphical overhead of the Training Manager? (e.g. the necessity of re-generating the whole pattern of episodes from scratch every time)
0 Comments
Answers (1)
Ronit
on 23 Sep 2024
Hi Federico,
It is possible that the slowdown you are experiencing during training could be due to the graphical overhead of the Training Manager. Also, take a look at the following potential aspects:
I recommend leveraging the "useParallel" option for parallel computing to potentially accelerate the training process. Please refer to the documentation of the "useParallel" option provided by "rlTrainingOptions":
I hope it helps your query!
0 Comments
See Also
Categories
Find more on Training and Simulation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!