| 71 | build_hogwild_trainer(reader, model) |
| 72 | """ |
| 73 | def __init__(self, |
| 74 | init_group=None, epoch_group=None, |
| 75 | download_group=None, exit_group=None, |
| 76 | stop_conditions=None, nodes_to_checkpoint=None): |
| 77 | self.init_group = init_group or TaskGroup( |
| 78 | workspace_type=WorkspaceType.GLOBAL) |
| 79 | self.epoch_group = epoch_group or TaskGroup() |
| 80 | self.download_group = download_group or TaskGroup() |
| 81 | self.exit_group = exit_group or TaskGroup() |
| 82 | self.stop_conditions = stop_conditions or [] |
| 83 | self._nodes_to_checkpoint = nodes_to_checkpoint |
| 84 | |
| 85 | def nodes_to_checkpoint(self): |
| 86 | if self._nodes_to_checkpoint: |