Args: gpus (list[int]): list of GPU ids. server (tf.train.Server): the server with ps and workers.
(self, gpus, server)
| 286 | |
| 287 | @map_arg(gpus=_int_to_range) |
| 288 | def __init__(self, gpus, server): |
| 289 | """ |
| 290 | Args: |
| 291 | gpus (list[int]): list of GPU ids. |
| 292 | server (tf.train.Server): the server with ps and workers. |
| 293 | """ |
| 294 | super(DistributedTrainerReplicated, self).__init__(gpus, server) |
| 295 | assert self.job_name in ['ps', 'worker'], self.job_name |
| 296 | if self.job_name == 'ps': |
| 297 | self.join() |
| 298 | |
| 299 | self._builder = DistributedReplicatedBuilder(gpus, server) |
| 300 | self.is_chief = self._builder.is_chief |
| 301 | |
| 302 | def _setup_input(self, input_signature, input): |
| 303 | with override_to_local_variable(): |
nothing calls this directly
no test coverage detected