Repository navigation
Validate ul:// model and data URIs before cloud workflows run - #112
Conversation
|
👋 Hello @JaviChulvi, thank you for submitting a
For more guidance, please refer to our Contributing Guide. Don't hesitate to leave a comment if you have any questions. Thank you for contributing to Ultralytics! 🚀 |
UltralyticsAssistant
left a comment
There was a problem hiding this comment.
🔍 PR Review
Made with ❤️ by Ultralytics Actions
Reviewed the shared cloud-argument validation in both CLI sources and the download check it replaces. The change rejects malformed ul:// values before cloud workflow operations while preserving the existing three-part URI rule. LGTM.
UltralyticsAssistant
left a comment
There was a problem hiding this comment.
🔍 PR Review 2
Made with ❤️ by Ultralytics Actions
No changes since review 1; the shared URI validation and removal of the duplicate download check remain sound. No new issues found. LGTM.
|
🎉 PR #112 has been merged—thank you, @JaviChulvi, for adding clear validation for malformed
This change turns a later parsing failure or Platform request into an early, clear validation error. |
Part of https://github.com/ultralytics/portal/issues/3969.
A malformed
model=ordata=URI such asul://owner/projectcrashedul cloud exportandul cloud predictwith "not enough values to unpack", andul cloud trainsent it to Platform.yolo_args, the parser all four cloud workflows share, now applies ultralytics' rule (three non-empty parts) before any upload or request, replacingul cloud download's own length check.Validated on production: malformed URIs exit 2 with a clear error and no request; valid URIs, official weights, local paths, and
project=/name=/save_dir=values are unchanged. Lint and tests pass.🛠️ PR Summary
Made with ❤️ by Ultralytics Actions
🌟 Summary
The shared argument parser now rejects malformed
ul://model and data URIs before cloud workflows proceed, replacing later parsing failures or requests with a clear validation error.📊 Key Changes
ul://values formodelanddatacontain exactly three non-empty path parts.yolo_args, which is shared by the cloud workflows.cloud_download’s duplicate URI-part count check while retaining its requirement thatmodel=start withul://.🎯 Purpose & Impact