Skip to content

Update Google-style docstrings#34

Merged
glenn-jocher merged 2 commits intomainfrom
glenn-jocher-patch-1
Nov 2, 2025
Merged

Update Google-style docstrings#34
glenn-jocher merged 2 commits intomainfrom
glenn-jocher-patch-1

Conversation

@glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Nov 2, 2025

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Polishes docstrings and comments across the CLIP codebase for clearer, more consistent documentation, with no functional changes. ✨

📊 Key Changes

  • Standardizes docstrings to concise one-line summaries (PEP 257 style) in:
    • clip.load, _node_get, and tokenize
    • ModifiedResNet class description
    • Tokenizer helpers: bytes_to_unicode() and get_pairs()
  • Minor punctuation and line-wrapping fixes for readability
  • No logic, API, or behavior changes

🎯 Purpose & Impact

  • Improves readability and consistency for developers and users 📚
  • Enhances compatibility with documentation generators and tooling 🛠️
  • Zero impact on model performance, training/inference, or user workflows ✅
  • Safe update: no retraining, configuration, or code changes required from users 🚀

glenn-jocher and others added 2 commits November 3, 2025 04:34
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
@UltralyticsAssistant UltralyticsAssistant added the documentation Improvements or additions to documentation label Nov 2, 2025
@UltralyticsAssistant
Copy link
Member

👋 Hello @glenn-jocher, thank you for submitting a ultralytics/CLIP 🚀 PR! This is an automated review assistant; an Ultralytics engineer will follow up shortly. 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/CLIP 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! 🚀

@glenn-jocher glenn-jocher merged commit a00cecb into main Nov 2, 2025
5 checks passed
@glenn-jocher glenn-jocher deleted the glenn-jocher-patch-1 branch November 2, 2025 19:39
@UltralyticsAssistant
Copy link
Member

🎉 Merge celebration! Huge thanks, @glenn-jocher, for refining our docs in Polish docstrings and comments across the codebase.

“Details make perfection, and perfection is not a detail.” —Leonardo da Vinci. Your thoughtful polish to docstrings and comments elevates clarity, strengthens tooling compatibility, and makes CLIP more welcoming for contributors—without touching behavior. This is the kind of craftsmanship that compounds over time.

Appreciate the care and consistency you brought here—community members will feel the difference. 🚀

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

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants