December 2019
Intermediate to advanced
368 pages
11h 10m
English
One of the primary responsibilities of the ConcurrentWorkers class is to create and manage RLEvalutionWorker instances. This is done in the class constructor as follows:
self.workers = [RLEvalutionWorker(make_env_f, *args, ref_batch=ref_batch, **dict(kwargs, device=gpus[i])) for i in range(len(gpus))] self.model = self.workers[0].model self.steps_counter = sum([w.steps_counter for w in self.workers]) self.async_hub = AsyncTaskHub() self.hub = WorkerHub(self.workers, self.async_hub.input_queue, self.async_hub)
Here, we create the number of RLEvalutionWorker instances that are correlated to the number of GPU devices that are available in the system. After that, we initialize the selected ANN graph model and ...
Read now
Unlock full access