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

Update Colab Notebook CI #8798

Merged
merged 6 commits into from
Jul 30, 2022
Merged

Update Colab Notebook CI #8798

merged 6 commits into from
Jul 30, 2022

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Jul 30, 2022

# CI Checks
# export PYTHONPATH="$PWD"  # to run *.py. files in subdirectories
rm -rf runs  # remove runs/
m=yolov5n  # official weights
b=runs/train/exp/weights/best  # best.pt weights
python train.py --img 64 --batch 32 --weights $m.pt --cfg $m.yaml --epochs 1 --device 0  # train
for d in 0 cpu; do  # devices
  python val.py --img 64 --batch 32 --weights $m.pt --device $d  # val official
  python val.py --img 64 --batch 32 --weights $b.pt --device $d  # val custom
  python detect.py --weights $m.pt --device $d  # detect official
  python detect.py --weights $b.pt --device $d  # detect custom
done
python hubconf.py  # hub
python models/tf.py --weights $m.pt  # build TF model
python models/yolo.py --cfg $m.yaml  # build PyTorch model
python export.py --weights $m.pt --img 64 --include torchscript  # export

OR

# CI Checks
# export PYTHONPATH="$PWD"  # to run *.py. files in subdirectories
rm -rf runs  # remove runs/
m=yolov5n  # official weights
b=runs/train/exp/weights/best  # best.pt checkpoint
python train.py --imgsz 64 --batch 32 --weights $m.pt --cfg $m.yaml --epochs 1 --device 0  # train
for d in 0 cpu; do  # devices
  for w in $m $b; do  # weights
    python val.py --imgsz 64 --batch 32 --weights $w.pt --device $d  # val
    python detect.py --imgsz 64 --weights $w.pt --device $d  # detect
  done
done
python hubconf.py --model $m  # hub
python models/tf.py --weights $m.pt  # build TF model
python models/yolo.py --cfg $m.yaml  # build PyTorch model
python export.py --weights $m.pt --img 64 --include torchscript  # export

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Refinements to YOLOv5's tutorial notebook and CI scripts for better clarity and efficiency.

πŸ“Š Key Changes

  • Cleared execution_count in the tutorial Jupyter notebook, making it cleaner to new users.
  • Simplified continual integration (CI) scripts by streamlining the model training and evaluation commands.
  • Updated section titles and removed redundant code in the CI scripts for better readability.

🎯 Purpose & Impact

  • The removal of execution_count ensures that the notebook looks fresh and unexecuted for each new user. πŸ‘©β€πŸ«
  • The streamlined CI scripts enhance the maintainability of the code and the efficiency of the testing process. πŸ› οΈ
  • Neater CI scripts and comments improve the understandability of automated processes for contributors and maintainers. πŸ“

The modifications are expected to make the learning and development process with YOLOv5 more accessible and efficient for users and developers alike. πŸš€

@glenn-jocher glenn-jocher self-assigned this Jul 30, 2022
@glenn-jocher glenn-jocher merged commit ec4de43 into master Jul 30, 2022
@glenn-jocher glenn-jocher deleted the glenn-jocher-patch-2 branch July 30, 2022 19:11
ctjanuhowski pushed a commit to ctjanuhowski/yolov5 that referenced this pull request Sep 8, 2022
* Update Colab Notebook CI

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

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

* Created using Colaboratory

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

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

* Update tutorial.ipynb

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.

None yet

1 participant