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 #25

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

Minor corrections and optimizations in the profiling of model operations and parameter calculations.

📊 Key Changes

  • 🛠️ Corrected variable names in test_relu.py and optimized input parameters.
  • 🔧 Simplified and improved accuracy in count_fn_linear for calculating FLOPs.
  • 🏗️ Removed unnecessary graph assignment in fx_profile.
  • ✂️ Cleaned up redundant code in basic_hooks, particularly in parameter counting and convolution operation calculations.

🎯 Purpose & Impact

  • 🚀 Efficiency: Streamlines existing code for better readability and potentially faster execution.
  • 🔍 Accuracy: Ensures more accurate profiling of model operations and parameter counts, particularly in linear and convolutional layers.
  • 💡 Usability: Simplifies code maintenance and reduces potential for errors, benefiting developers working with this profiling utility.

@glenn-jocher glenn-jocher merged commit 014798b into main Jun 16, 2024
1 check passed
@glenn-jocher glenn-jocher deleted the refactor-20240616200945 branch June 16, 2024 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant