Skip to content

Add catch for misspelled --task#10420

Merged
glenn-jocher merged 4 commits intoultralytics:masterfrom
leandervaneekelen:patch-1
Dec 6, 2022
Merged

Add catch for misspelled --task#10420
glenn-jocher merged 4 commits intoultralytics:masterfrom
leandervaneekelen:patch-1

Conversation

@leandervaneekelen
Copy link
Copy Markdown
Contributor

@leandervaneekelen leandervaneekelen commented Dec 6, 2022

Signed-off-by: Leander van Eekelen 47320151+leandervaneekelen@users.noreply.github.com

Fix #10419. Makes val.py fail loudly instead of silently on a misspelled --task.

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Added error handling for unsupported tasks in the validation scripts.

📊 Key Changes

  • 🛠️ Introduced a new conditional statement to segment/val.py and val.py.
  • 🚫 Implemented an error raise for when an undefined --task argument is used.

🎯 Purpose & Impact

  • Enhanced Clarity: Users will now receive a clear error message if they try to run the validation script with an unsupported task argument.
  • Preventative Measures: Prevents accidental misuse of the script, guiding users towards correct usage.
  • User Experience: Improves the user experience by making the script more robust and user-friendly.

leandervaneekelen and others added 2 commits December 6, 2022 13:24
Signed-off-by: Leander van Eekelen <47320151+leandervaneekelen@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👋 Hello @leandervaneekelen, thank you for submitting a YOLOv5 🚀 PR! To allow your work to be integrated as seamlessly as possible, we advise you to:

  • ✅ Verify your PR is up-to-date with ultralytics/yolov5 master branch. If your PR is behind you can update your code by clicking the 'Update branch' button or by running git pull and git merge master locally.
  • ✅ Verify all YOLOv5 Continuous Integration (CI) checks are passing.
  • ✅ Reduce changes to the absolute minimum required for your bug fix or feature addition. "It is not daily increase but daily decrease, hack away the unessential. The closer to the source, the less wastage there is." — Bruce Lee

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
@glenn-jocher glenn-jocher changed the title Add catch for misspelled task Add catch for misspelled --task Dec 6, 2022
@glenn-jocher glenn-jocher merged commit 0a1fdcd into ultralytics:master Dec 6, 2022
@glenn-jocher
Copy link
Copy Markdown
Member

@leandervaneekelen PR is merged. Thank you for your contributions to YOLOv5 🚀 and Vision AI ⭐

@leandervaneekelen leandervaneekelen deleted the patch-1 branch December 12, 2022 15:51
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.

val.py fails silently when opt.task is misspelled

2 participants