Skip to content

Commit

Permalink
Renamed should_stop to has_stopped in roi_loader.
Browse files Browse the repository at this point in the history
Summary: Renamed should_stop to has_stopped in roi_loader.

Reviewed By: rbgirshick

Differential Revision: D9596732

fbshipit-source-id: b34a5b20d215fa7423d96c9a8a9cf271b500b530
  • Loading branch information
newstzpz authored and xzhewei committed Dec 5, 2018
1 parent b44dfdd commit 2f3d2f7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion detectron/roi_data/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def start(self, prefill=False):
self.shutdown()
break

def should_stop(self):
def has_stopped(self):
return self.coordinator.should_stop()

def shutdown(self):
Expand Down
2 changes: 1 addition & 1 deletion detectron/utils/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def train_model():
CHECKPOINT_PERIOD = int(cfg.TRAIN.SNAPSHOT_ITERS / cfg.NUM_GPUS)

for cur_iter in range(start_iter, cfg.SOLVER.MAX_ITER):
if model.roi_data_loader.should_stop():
if model.roi_data_loader.has_stopped():
handle_critical_error(model, 'roi_data_loader failed')
training_stats.IterTic()
lr = model.UpdateWorkspaceLr(cur_iter, lr_policy.get_lr_at_iter(cur_iter))
Expand Down

0 comments on commit 2f3d2f7

Please sign in to comment.