The training speed decreased over time( unity executable environment,using Python API)

I implemented training acceleration in unity executable environment(time-scale=20), but I found an obvious problem:the training speed decreased over time

The log information is printed only for a fixed number of runs. The data transfer rate is also displayed in parentheses. As the training interval becomes longer, the data transfer rate becomes smaller and smaller

I would like to know what causes this problem and how to solve it. Before that, I also tried to train directly with ML agents. Without packing the environment, the training speed would still decrease.

BTW, I found the edit>project settings>time> time scale in the unity editor able to acclerate the simulation speed. Can I speed up both the Unity environment Settings and ML Agents at the same time? (Theoretically, should get training accelerometers multiplied?)

My best guess is that the problem is in the Unity environment. I guess what I’m saying is that your Unity environment itself is slowing down over time.
Possibly linked to your cleanup routine between episodes. I’m guessing that after each episode when your resetting the environment somethings are being created without the previous instances being destroyed? In other words it is possible that garbage is piling up.
That’s the only thing I can think of cause I run ML Agents for days on end without any slowdown.

Re: Timescale just set the --time-scale flag on the ML Agents command line. ML Agents will try to run as fast as the Unity side timescale. May not be able to keep up especially if you have lots of agents or complex observations.