- Experience Variability: Not all workers may generate the same number of experiences due to the variability in episodes. Some episodes might end quicker than others based on the policy's actions and the environment dynamics.
- Sampling Strategy: The actual implementation of the minibatch sampling strategy might not enforce strict equality in the number of experiences sampled from each worker.
Minibatches construction for PPO agent in parallel syncronous mode
조회 수: 3 (최근 30일)
이전 댓글 표시
If I understood correctly the documentation, when a PPO agent is trained in parallel syncronous mode each worker sends its own experiences back to the client, which then assembles the minibatches and then calculates the gradients for the policy update. My question is: at the moment of the construction of minibatches, does the client attempt to sample experiences evenly from all the workers? For example: if I have 4 workers and my minibatch size has been set to 32, does the client sample 8 experiences from each worker, for every single minibatch?
댓글 수: 0
답변 (1개)
Avadhoot
2024년 3월 12일
Hi Federico,
From your question I infer that you are concerned with the actual implementation of how the minibatch is constructed from all the updates received from the workers. During parallel synchronous training, the client collects samples from all the workers but the exact method of that is dependent on various factors like the algorithm, the settings used during the training and other specified options. The documentation does not provide implementation-level details into the process.
What you have described would be the ideal behaviour for the client, to sample equal number of experiences from each worker. But this is not always practical. Some prominent factors to consider include the following:
If you require the ideal behaviour for your application, you can simulate it manually through custom training loop. But this might not always be a good choice as the ideal behaviour is not practical in many cases.
I hope this helps.
참고 항목
카테고리
Help Center 및 File Exchange에서 Sequence and Numeric Feature Data Workflows에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!