Skip to content

Allow configuring Python SDK retry methods - #53

Merged
glenn-jocher merged 1 commit into
ultralytics:mainfrom
JaviChulvi:JaviChulvi/openapi-platform-url-env
Sep 16, 2026
Merged

glenn-jocher merged 1 commit into
ultralytics:mainfrom
JaviChulvi:JaviChulvi/openapi-platform-url-env

Conversation

@JaviChulvi

@JaviChulvi JaviChulvi commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Allow callers to opt safe-to-repeat methods into the existing Python SDK retry loop with retry_methods=("POST",). Defaults stay unchanged. This lets training metrics and checkpoint signing reuse SDK retries instead of maintaining another retry loop in Ultralytics. The generator remains API-independent.

Merge this first so SDK automation can generate and publish the updated client. Then ultralytics/ultralytics#26190 can use it.

Validated with generator checks, sync/async SDK tests, and live local-training, upload, and cancellation E2E.

@UltralyticsAssistant UltralyticsAssistant added the enhancement New feature or request label Sep 15, 2026
@UltralyticsAssistant

Copy link
Copy Markdown
Member

👋 Hello @JaviChulvi, thank you for submitting a ultralytics/openapi 🚀 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/openapi 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 by writing "I have read the CLA Document and I sign the CLA" in a new message.
  • ✅ 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 retry_methods propagation, default behavior, sync/async generated clients, retry predicate, documentation, and existing generator patterns. The default GET/HEAD/OPTIONS behavior is preserved, existing JSON 429 retries remain intact, and the opt-in method configuration is API-independent. LGTM; no concrete defects found.

@JaviChulvi
JaviChulvi marked this pull request as ready for review September 15, 2026 15:20
@glenn-jocher
glenn-jocher merged commit a5dac75 into ultralytics:main Sep 16, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants