Commit 34f08e04 authored by Peizhao Zhang's avatar Peizhao Zhang Committed by Facebook Github Bot

Renamed should_stop to has_stopped in roi_loader.

Summary: Renamed should_stop to has_stopped in roi_loader.

Reviewed By: rbgirshick

Differential Revision: D9596732

fbshipit-source-id: b34a5b20d215fa7423d96c9a8a9cf271b500b530
parent 1ecd603b
...@@ -241,7 +241,7 @@ class RoIDataLoader(object): ...@@ -241,7 +241,7 @@ class RoIDataLoader(object):
self.shutdown() self.shutdown()
break break
def should_stop(self): def has_stopped(self):
return self.coordinator.should_stop() return self.coordinator.should_stop()
def shutdown(self): def shutdown(self):
......
...@@ -60,7 +60,7 @@ def train_model(): ...@@ -60,7 +60,7 @@ def train_model():
CHECKPOINT_PERIOD = int(cfg.TRAIN.SNAPSHOT_ITERS / cfg.NUM_GPUS) CHECKPOINT_PERIOD = int(cfg.TRAIN.SNAPSHOT_ITERS / cfg.NUM_GPUS)
for cur_iter in range(start_iter, cfg.SOLVER.MAX_ITER): 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') handle_critical_error(model, 'roi_data_loader failed')
training_stats.IterTic() training_stats.IterTic()
lr = model.UpdateWorkspaceLr(cur_iter, lr_policy.get_lr_at_iter(cur_iter)) lr = model.UpdateWorkspaceLr(cur_iter, lr_policy.get_lr_at_iter(cur_iter))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment