ml-agents icon indicating copy to clipboard operation
ml-agents copied to clipboard

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

Open xiaoxuh opened this issue 4 years ago • 6 comments

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

image

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?)

xiaoxuh avatar Feb 08 '22 02:02 xiaoxuh

Hi! There's not need to manage the time-scale yourself. The ML-Agents toolkit automatically accelerates the environment during training. You can also set the time scale through the config file: https://github.com/Unity-Technologies/ml-agents/blob/82a1114d83d43fed0b3078ab4cc90943e2804e02/docs/Training-ML-Agents.md.

miguelalonsojr avatar Feb 09 '22 03:02 miguelalonsojr

Thank you for your replay! But you may not understand what I mean What I'm trying to say is that I packaged the Unity environment I built and implemented the MADDPG algorithm myself for training. I used UnityEnvRegistry to create an environment and set the time-scale=20: image After setting up the environment, I started training with the MADDPG algorithm, but as the training speed slowed down, I didn't change the time-scale at all . The relevant picture is in my original problem description. I am looking forward to your reply as soon as possible, which is very important to me

xiaoxuh avatar Feb 09 '22 03:02 xiaoxuh

Is this using a custom environment? If so, we are unable to help reproduce bugs. Please attempt to reproduce this issue with one of the example environments, or provide a minimal patch to one of the environments needed to reproduce the issue. This would help us determine track the issue down and determine if it's within the ML-Agents toolkit. If you are using a custom environment, it may be a bug in your environment that is slowing it down over time.

miguelalonsojr avatar Feb 09 '22 18:02 miguelalonsojr

This issue has been automatically marked as stale because it has not had activity in the last 28 days. It will be closed in the next 14 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 16 '22 03:04 stale[bot]

This issue has been automatically closed because it has not had activity in the last 42 days. If this issue is still valid, please ping a maintainer. Thank you for your contributions.

stale[bot] avatar Apr 30 '22 03:04 stale[bot]

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.

github-actions[bot] avatar May 30 '22 04:05 github-actions[bot]