Skip to content

Print dataset scan only if RANK in (-1, 0)#7337

Merged
glenn-jocher merged 2 commits intomasterfrom
update/DDP_dataset
Apr 7, 2022
Merged

Print dataset scan only if RANK in (-1, 0)#7337
glenn-jocher merged 2 commits intomasterfrom
update/DDP_dataset

Conversation

@glenn-jocher
Copy link
Copy Markdown
Member

@glenn-jocher glenn-jocher commented Apr 7, 2022

Resolves multiple dataset scan printouts i.e. #7336 (comment)

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Improved multi-GPU support in YOLOv5 training and dataset handling.

📊 Key Changes

  • Replaced list syntax with tuple syntax when checking RANK values.
  • Introduced LOCAL_RANK environment variable for better multi-GPU support.
  • Conditionally display cache information based on LOCAL_RANK in datasets.

🎯 Purpose & Impact

  • 🧩 Enhances compatibility with distributed computing, facilitating better support for multi-GPU training environments.
  • 🚀 Potentially improves training experience on multi-GPU setups by preventing unnecessary output on all ranks except the master.
  • 🖥️ Ensures that only the master process displays dataset scanning progress, reducing clutter and confusion in the console output when using multiple GPUs.

@glenn-jocher glenn-jocher self-assigned this Apr 7, 2022
@glenn-jocher
Copy link
Copy Markdown
Member Author

It works!!

Screen Shot 2022-04-07 at 4 37 56 PM

@glenn-jocher glenn-jocher merged commit 5f941a8 into master Apr 7, 2022
@glenn-jocher glenn-jocher deleted the update/DDP_dataset branch April 7, 2022 14:44
BjarneKuehl pushed a commit to fhkiel-mlaip/yolov5 that referenced this pull request Aug 26, 2022
* Print dataset scan only `if RANK in (-1, 0)`

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant