Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Daemon thread mosaic plots fix #1943

Merged
merged 1 commit into from
Jan 14, 2021
Merged

Daemon thread mosaic plots fix #1943

merged 1 commit into from
Jan 14, 2021

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Jan 14, 2021

Partial fix for #1937.

  File "train.py", line 518, in <module>
    train(hyp, opt, device, tb_writer, wandb)
  File "train.py", line 322, in train
    wandb.log({"Mosaics": [wandb.Image(str(x), caption=x.name) for x in save_dir.glob('train*.jpg')]})
  File "train.py", line 322, in <listcomp>
    wandb.log({"Mosaics": [wandb.Image(str(x), caption=x.name) for x in save_dir.glob('train*.jpg')]})
  File "/usr/local/lib/python3.6/dist-packages/wandb/data_types.py", line 1555, in __init__
    self._initialize_from_path(data_or_path)
  File "/usr/local/lib/python3.6/dist-packages/wandb/data_types.py", line 1625, in _initialize_from_path
    self._image = pil_image.open(path)
  File "/usr/local/lib/python3.6/dist-packages/PIL/Image.py", line 2862, in open
    "cannot identify image file %r" % (filename if filename else fp)
PIL.UnidentifiedImageError: cannot identify image file 'runs/train/bat_16/train_batch2.jpg'

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Improved WandB logging for training mosaic images in YOLOv5.

📊 Key Changes

  • Adjusted condition for logging mosaics from ni == 3 to ni > 3.
  • Added a file existence check before logging images to WandB.

🎯 Purpose & Impact

  • 🎯 Purpose: Ensure reliable logging of mosaic images to WandB, preventing errors when image files do not exist.
  • 💪 Impact: Enhances the robustness of training logs in WandB and prevents potential disruptions due to missing files. Users of YOLOv5 will experience more consistent tracking of their model training progress.

@glenn-jocher glenn-jocher linked an issue Jan 14, 2021 that may be closed by this pull request
@glenn-jocher
Copy link
Member Author

/rebase

@glenn-jocher glenn-jocher merged commit 777032e into master Jan 14, 2021
@glenn-jocher glenn-jocher deleted the daemon_fix branch January 14, 2021 21:16
KMint1819 pushed a commit to KMint1819/yolov5 that referenced this pull request May 12, 2021
taicaile pushed a commit to taicaile/yolov5 that referenced this pull request Oct 12, 2021
BjarneKuehl pushed a commit to fhkiel-mlaip/yolov5 that referenced this pull request Aug 26, 2022
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.

runs not logging separately in wandb.ai
1 participant