rlpyt
rlpyt copied to clipboard
Set number of workers in ParallelSamplerBase without setting affinities manually
Hi Adam,
When using a class that inherits from ParallelSamplerBase (e.g. CPUSampler), I set the number of workers by passing a list of cpu affinities into my runner in the worker_cpus
key of the affinity dictionary
. But I'd like to allow the operating system to choose which cpu(s) each worker gets assigned to, rather than setting this by hand.
It looks like that could be accomplished by setting the n_worker
argument to ParallelSamplerBase._get_n_envs_list
, but when the function is called in initialize
, the n_worker
argument isn't given. Is there a good reason for this that I'm not thinking of? If not, could I submit a pull request to add the functionality?