Skip to content

Commit

Permalink
Log true batch size
Browse files Browse the repository at this point in the history
Summary:
The true batch size was always questionable due to the auto scaling stuff.

Fix: add logging for it

Reviewed By: tglik

Differential Revision: D50995954

fbshipit-source-id: f499bbfccbd8a7f96821e0344e82c2e8f075bcc6
  • Loading branch information
dongyuzheng authored and facebook-github-bot committed Nov 6, 2023
1 parent 337ca34 commit 017abbf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions detectron2/data/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,8 @@ def build_batch_data_loader(
total_batch_size, world_size
)
batch_size = total_batch_size // world_size
logger = logging.getLogger(__name__)
logger.info("Making batched data loader with batch_size=%d", batch_size)

if isinstance(dataset, torchdata.IterableDataset):
assert sampler is None, "sampler must be None if dataset is IterableDataset"
Expand Down

0 comments on commit 017abbf

Please sign in to comment.