Parallel RL#225
Merged
Merged
Conversation
Add option "Number Parallel Games" Add ->get_local_batch_size() Make NeuralNetAPIUser a member
Rename id to agentID
Make some variables to *
+ make condition variable as MCTSAgent member
with searchSettings->batchSize
with searchSettings->batchSize
Use get_default_model()
Remove mxnet code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR allows generating multiple games on a single GPU.
You need to set the variable
Number_Parallel_Games(default: 8) to configure how many games you want to run in parallel. No change ofBatch_Sizeis necessary, as it automatically increases the usualBatch_Sizeby timesNumber_Parallel_Games, i.e., times 8.The individual parallel games are exported into separate files and later merged into a single file via Python.
The
rlSettings->numberChunksis divided bysearchSettings->numberParallelGamesfor eachTrainDataExporterobject. On the GPU, it uses a queue and a future.get() setup to handle the requests.Generating one RL package on an Nvidia A100 takes 3 hours and 15 minutes by default. When using a parallelization of 8, it takes 1 hour and 15 minutes, resulting in an approximate threefold speed up.
Note, the parallel RL loop is not compatible with the Mixture of Experts (MoE) setup.
It also includes a small version of the A0 resnet.