Skip to content

Conversation

@glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Aug 6, 2025

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

This update streamlines and modernizes the workflow for building, testing, and pushing the YOLO11n model to Replicate, making the process more modular and easier to maintain. 🚀

📊 Key Changes

  • Refactored the GitHub Actions workflow to use a matrix strategy, enabling easier scaling to multiple models in the future.
  • Moved the model weight download logic into a dedicated download.py script for better modularity.
  • Simplified the cog.yaml dependencies by removing unnecessary packages (Torch, torchvision, numpy, opencv-python, pillow).
  • Cleaned up and slightly reorganized the predict.py script for clarity and maintainability.

🎯 Purpose & Impact

  • Easier Maintenance & Scaling: The new structure makes it simpler to add or update models in the future, reducing manual work. 🛠️
  • Faster & Leaner Builds: Removing unneeded dependencies can speed up builds and reduce potential conflicts. ⚡
  • Clearer Workflow: Modular scripts and a cleaner workflow make it easier for contributors and users to understand and extend the process. 📚
  • Improved Reliability: Dedicated scripts and a streamlined workflow help ensure consistent, reliable model deployment to Replicate. ✅

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
@UltralyticsAssistant UltralyticsAssistant added the enhancement New feature or request label Aug 6, 2025
@UltralyticsAssistant
Copy link
Member

👋 Hello @glenn-jocher, thank you for submitting an ultralytics/replicate 🚀 PR! 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/replicate 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! 🚀

This is an automated response. An Ultralytics engineer will review your PR and assist you soon. 😊

UltralyticsAssistant and others added 3 commits August 6, 2025 18:14
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 Remove cd from push.yml Parameterize push.yml Aug 6, 2025
UltralyticsAssistant and others added 3 commits August 6, 2025 18:27
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
@glenn-jocher glenn-jocher merged commit 82cebe8 into main Aug 6, 2025
8 checks passed
@glenn-jocher glenn-jocher deleted the glenn-jocher-patch-1 branch August 6, 2025 18:42
@UltralyticsAssistant
Copy link
Member

Fantastic work, @glenn-jocher! 🚀 This merge brings incredible clarity and scalability to the YOLO11n workflow, making future advancements smoother for everyone. As Henry Ford once said, “If everyone is moving forward together, then success takes care of itself.” Your commitment to modularity and streamlined processes directly empowers the whole Ultralytics community. Thank you for driving innovation and reliability forward!

@glenn-jocher
Copy link
Member Author

@onuralpszr I parameterized push.yml here so the current yolo11n dir is just one element in the matrix (refactored download code into yolo11n/download.py).

I think this can help us scale model deployments without scaling Action YAMLs. Can you update your two other PRs to use this?

Note also eliminated some deps that are already ultralytics package deps.

@onuralpszr
Copy link
Member

@onuralpszr I parameterized push.yml here so the current yolo11n dir is just one element in the matrix (refactored download code into yolo11n/download.py).

I think this can help us scale model deployments without scaling Action YAMLs. Can you update your two other PRs to use this?

Note also eliminated some deps that are already ultralytics package deps.

@glenn-jocher sure, I will update them all and do some clean up and "deployment" test as well.

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.

4 participants