(self, num_workers)
| 24 | |
| 25 | class SyncExitHook(tf.train.SessionRunHook): |
| 26 | def __init__(self, num_workers): |
| 27 | self._num_workers = num_workers |
| 28 | self._num_finished_workers = tf.Variable( |
| 29 | 0, name="num_finished_workers") |
| 30 | self._finish_self = tf.assign_add( |
| 31 | self._num_finished_workers, 1, use_locking=True) |
| 32 | |
| 33 | def end(self, session): |
| 34 | session.run(self._finish_self) |
nothing calls this directly
no outgoing calls
no test coverage detected