Commit 4f5548a1 authored by Yanghan Wang's avatar Yanghan Wang Committed by Facebook GitHub Bot
Browse files

revert the runner change in D36632783

Summary:
Pull Request resolved: https://github.com/facebookresearch/d2go/pull/262

synchronization should be handled inside creating data loader, otherwise we need to add synchronization everywhere besides the training-loop, which is impossible.

Reviewed By: sstsai-adl

Differential Revision: D36683362

fbshipit-source-id: 0bb7c9b50656fece5df6a007c37ec5888ee172bc
parent dcb9cb48
...@@ -336,7 +336,7 @@ def coco_text_load( ...@@ -336,7 +336,7 @@ def coco_text_load(
archive_file: Optional[str] = None, archive_file: Optional[str] = None,
) -> List[Dict]: ) -> List[Dict]:
if archive_file is not None: if archive_file is not None:
if comm.get_rank() == 0: if comm.get_local_rank() == 0:
extract_archive_file(archive_file, image_root) extract_archive_file(archive_file, image_root)
comm.synchronize() comm.synchronize()
......
...@@ -325,8 +325,6 @@ class Detectron2GoRunner(BaseRunner): ...@@ -325,8 +325,6 @@ class Detectron2GoRunner(BaseRunner):
# NOTE: creating evaluator after dataset is loaded as there might be dependency. # noqa # NOTE: creating evaluator after dataset is loaded as there might be dependency. # noqa
data_loader = self.build_detection_test_loader(cfg, dataset_name) data_loader = self.build_detection_test_loader(cfg, dataset_name)
# Synchronize to ensure data processing during data loader build is complete
comm.synchronize()
evaluator = self.get_evaluator( evaluator = self.get_evaluator(
cfg, dataset_name, output_folder=output_folder cfg, dataset_name, output_folder=output_folder
......
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