Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code Refactor ruff check --fix --extend-select I #13093

Merged
merged 6 commits into from
Jun 16, 2024

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Jun 16, 2024

This Ultralytics PR refactors code to improve performance and readability. 🔄

Key changes include:

🚀 Optimized various functions for faster execution.
🧩 Simplified complex logic for better understanding and maintenance.
🗑️ Removed redundant code to streamline operations.
📚 Improved code structure and organization.

These changes aim to enhance the overall quality and efficiency of the code. 🌟

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Updated several Python scripts and GitHub workflow actions for better code readability and maintainability.

📊 Key Changes

  • GitHub Actions: Simplified the merge-main-into-prs.yml workflow file for merging main branch into PRs.
  • Training Scripts: Refactored lambda functions into proper function definitions in train.py for better clarity.
  • YOLO Model Script: Refactored lambda functions to proper function definitions in yolo.py.
  • Segment Training Script: Similar refactoring of lambda functions in segment/train.py.
  • Tensorboard Logging: Converted lambda-based placeholder to a proper function in utils/loggers/__init__.py.
  • Documentation: Adjusted markdown formatting in clearml/README.md.
  • DataLoader Import: Modified import statements for better clarity in dataloaders.py.

🎯 Purpose & Impact

  • Readability: The modifications improve the readability and maintainability of the code. ✅
  • Clarity: Refactoring lambda functions into full function definitions helps in understanding the code. 🧠
  • Consistency: Ensures consistent code style across the repository. 📏

@glenn-jocher glenn-jocher merged commit dfdfbcf into master Jun 16, 2024
8 checks passed
@glenn-jocher glenn-jocher deleted the refactor-20240616200945 branch June 16, 2024 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants