Skip to content

Fix Replicate README badge rendering and apply Codex review fixes#40

Merged
glenn-jocher merged 3 commits into
mainfrom
fix-replicate-rendering-codex
Jun 26, 2026
Merged

Fix Replicate README badge rendering and apply Codex review fixes#40
glenn-jocher merged 3 commits into
mainfrom
fix-replicate-rendering-codex

Conversation

@glenn-jocher

@glenn-jocher glenn-jocher commented Jun 26, 2026

Copy link
Copy Markdown
Member

Badge rendering (your report: badges stacked vertically on Replicate)

The pepy.tech downloads badge is an SVG with no fixed width, so Replicate/HF render it full-width and stack the badge row. Swapped it for the fixed-width img.shields.io/pepy/dt/ultralytics (same data) in the 6 YOLO26 task READMEs → badges render inline. (Same fix already applied to the HF model cards, plus removed the broken width=2% social-icon rows there.)

Codex review fixes (independent pass on the Replicate content)

  • yolov8s-worldv2: dropped the false "leave empty to auto-detect" claim; parse class_names on bare commas + trim; skip set_classes when empty.
  • yoloe11s: robust comma parsing (empty still falls back to the prompt-free model).
  • yolo26/cls & /sem: label conf/iou "(unused for this task)" — kept for the uniform signature + CI smoke test.
  • README: add a YOLO26 download.py example.

Skipped (by design): sem return_json text is already correct (semantic to_json() returns per-class pixel coverage); github_url intentionally points to ultralytics/ultralytics.

🤖 Generated with Claude Code

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

🛠️ This PR mainly improves YOLO26 Replicate docs and prediction input handling, making the repo clearer, more consistent, and more user-friendly.

📊 Key Changes

  • 📘 Updated the main README.md to show the YOLO26 task directory pattern, with an example for yolo26/seg/download.py.
  • 🧹 Cleaned up all YOLO26 task READMEs (detect, seg, sem, cls, pose, obb):
    • removed extra notebook/platform launch badges
    • standardized the Ultralytics downloads badge to a newer style
  • 🏷️ Clarified in yolo26/cls/predict.py and yolo26/sem/predict.py that conf and iou inputs are currently unused for those tasks.
  • ✅ Improved class-name parsing in yoloe11s/predict.py and yolov8s-worldv2/predict.py:
    • now trims whitespace more robustly
    • supports inputs like person,bus,sign as well as person, bus, sign
    • ignores empty entries
  • 🛡️ Added a safety check in yolov8s-worldv2/predict.py so class filtering is only applied when valid class names are provided.
  • ✏️ Simplified the yolov8s-worldv2 input description to clearly say the field is for classes to detect.

🎯 Purpose & Impact

  • 👍 Makes the repository easier to navigate and understand, especially for users working with YOLO26’s multiple task types.
  • 📚 Reduces confusion in the Replicate UI by explicitly marking parameters that do not affect classification or semantic segmentation outputs.
  • 🎯 Improves reliability for prompt-style class inputs in YOLOE11 and YOLOv8-World, helping prevent errors caused by spacing or empty values.
  • 🧼 Creates more consistent documentation across YOLO26 task pages, which should make maintenance easier and the user experience smoother.
  • ⚠️ This is mostly a quality-of-life PR: low risk, no major model logic changes, but helpful for usability and clarity.

Badge rendering: the pepy.tech downloads badge is an SVG with no fixed width, so
Replicate/HF render it full-width and stack the whole badge row vertically. Swap
it for the fixed-width shields.io equivalent (img.shields.io/pepy/dt/ultralytics,
same total-downloads data) in the 6 YOLO26 task READMEs so badges render inline.

Codex review fixes:
- yolov8s-worldv2: drop the false "leave empty to auto-detect" claim; parse
  class_names on bare commas with trimming; skip set_classes when empty.
- yoloe11s: parse class_names on bare commas with trimming (empty still falls
  back to the prompt-free model, as before).
- yolo26/cls and yolo26/sem: label conf/iou "(unused for this task)" — kept for a
  uniform predict() signature and the shared CI smoke-test command.
- README: add a YOLO26 task download.py example.

Skipped two Codex items by design: the semantic return_json text is already
correct (to_json() returns per-class pixel coverage), and github_url
intentionally points to ultralytics/ultralytics.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@UltralyticsAssistant UltralyticsAssistant added bug Something isn't working documentation Improvements or additions to documentation fixed Bug has been resolved labels Jun 26, 2026
@UltralyticsAssistant

Copy link
Copy Markdown
Member

👋 Hello @glenn-jocher, thank you for submitting a ultralytics/replicate 🚀 PR! This is an automated message to help with review readiness—an engineer will assist shortly. Please review the checklist below:

  • Define a Purpose: Clearly explain the purpose of your fix or feature in your PR description, and link to any relevant issues. For this PR, it may help to note the README badge rendering fixes, YOLO26 documentation update, and predictor review cleanups.
  • 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! 🚀🙂

@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

Nice cleanup overall: the badge fixes and clearer unused-parameter descriptions look good, and the class-name parsing improvement is a solid robustness win. One edge case remains in yoloe11s/predict.py, where whitespace/comma-only class_names can now collapse to an empty list and still be passed into set_classes().

💬 Posted 1 inline comment

Comment thread yoloe11s/predict.py
else:
self.model = YOLOE("yoloe-11s-seg.pt")
class_list = class_names.split(", ")
class_list = [c.strip() for c in class_names.split(",") if c.strip()]

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.

💡 MEDIUM: This normalization can now produce an empty class_list for inputs like " " or ",". Unlike yolov8s-worldv2, this path still calls set_classes() with an empty list, which can leave the model in an invalid state or raise at runtime. Please guard the empty-list case here as well, ideally by falling back to the prompt-free weights or skipping set_classes() when no valid class names remain.

UltralyticsAssistant and others added 2 commits June 26, 2026 10:00
… notebook badges

The pepy and Gradient/Kaggle/Binder badge SVGs have no fixed width, so Replicate
renders them full-width and stacks the rows. Make the downloads badge shields.io
blue and remove the notebook-launch row (repo-tutorial links, not model-relevant,
and markdown can't size them). Remaining badge row is all fixed-width shields.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@glenn-jocher glenn-jocher merged commit 89522a5 into main Jun 26, 2026
19 checks passed
@glenn-jocher glenn-jocher deleted the fix-replicate-rendering-codex branch June 26, 2026 10:17
@UltralyticsAssistant

Copy link
Copy Markdown
Member

Merged! 🎉 Thanks for the thoughtful improvements here, @glenn-jocher.

As Leonardo da Vinci said, “Simplicity is the ultimate sophistication.” This PR reflects that well by making the YOLO26 Replicate experience clearer, more consistent, and more robust—from README cleanup and task-page standardization to safer class parsing and clearer prediction inputs.

These quality-of-life updates may be small individually, but together they make the repo easier to navigate, easier to maintain, and smoother for users. Really appreciate the attention to detail here.

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

Labels

bug Something isn't working documentation Improvements or additions to documentation fixed Bug has been resolved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants