Skip to content

Validate ul:// model and data URIs before cloud workflows run - #112

Merged
glenn-jocher merged 1 commit into
ultralytics:mainfrom
JaviChulvi:JaviChulvi/cloud-uri-check
Oct 12, 2026
Merged

glenn-jocher merged 1 commit into
ultralytics:mainfrom
JaviChulvi:JaviChulvi/cloud-uri-check

Conversation

@JaviChulvi

@JaviChulvi JaviChulvi commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Part of https://github.com/ultralytics/portal/issues/3969.

A malformed model= or data= URI such as ul://owner/project crashed ul cloud export and ul cloud predict with "not enough values to unpack", and ul cloud train sent 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, replacing ul 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

  • Validates that ul:// values for model and data contain exactly three non-empty path parts.
  • Applies the check in yolo_args, which is shared by the cloud workflows.
  • Removes cloud_download’s duplicate URI-part count check while retaining its requirement that model= start with ul://.

🎯 Purpose & Impact

  • Malformed Platform URIs fail during argument parsing instead of reaching later workflow processing or a Platform request. Valid URIs and other argument handling are unchanged according to the PR description.

@UltralyticsAssistant UltralyticsAssistant added bug Something isn't working fixed Bug has been resolved labels Oct 11, 2026
@UltralyticsAssistant

Copy link
Copy Markdown
Member

👋 Hello @JaviChulvi, thank you for submitting a ultralytics/sdk 🚀 PR! This automated message confirms your contribution was received, and an Ultralytics engineer will assist with the review. To ensure a seamless integration of your work, please review the following checklist:

  • ✅ Define a Purpose: Clearly explain the purpose of your fix or feature in your PR description, and link to any relevant issues. Ensure your commit messages are clear, concise, and adhere to the project's conventions.
  • ✅ Synchronize with Source: Confirm your PR is synchronized with the ultralytics/sdk main branch. If it's behind, update it by clicking the 'Update branch' button or by running git pull and git merge main locally.
  • ✅ Ensure CI Checks Pass: Verify all Ultralytics Continuous Integration (CI) checks are passing. If any checks fail, please address the issues.
  • ✅ Update Documentation: Update the relevant documentation for any new or modified features.
  • ✅ Add Tests: If applicable, include or update tests to cover your changes, and confirm that all tests are passing.
  • ✅ Sign the CLA: Please ensure you have signed our Contributor License Agreement if this is your first Ultralytics PR; the CLA check will comment with signing instructions if needed.
  • ✅ Minimize Changes: Limit your changes to the minimum necessary 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

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 UltralyticsAssistant left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🔍 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
UltralyticsAssistant dismissed their stale review October 11, 2026 16:28

Superseded by new review

@UltralyticsAssistant UltralyticsAssistant left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🔍 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.

@JaviChulvi
JaviChulvi marked this pull request as ready for review October 11, 2026 16:47
@glenn-jocher
glenn-jocher merged commit 5e3bebc into ultralytics:main Oct 12, 2026
6 checks passed
@UltralyticsAssistant

Copy link
Copy Markdown
Member

🎉 PR #112 has been merged—thank you, @JaviChulvi, for adding clear validation for malformed ul:// model and data URIs before cloud workflows proceed.

“Well done is better than well said.” — Benjamin Franklin

This change turns a later parsing failure or Platform request into an early, clear validation error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working fixed Bug has been resolved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants