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

ultralytics 8.2.25 latest TensorFlow 2.16 support #13176

Merged
merged 95 commits into from
May 29, 2024
Merged

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented May 28, 2024

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Enhancements in dependency management and testing for broader compatibility and performance.

πŸ“Š Key Changes

  • Introduced conditions to install additional dependencies (pycocotools, mlflow, ray[tune]) during certain GitHub Actions events to enhance testing robustness.
  • Adjusted TensorFlow and TensorFlow.js dependencies to ensure broader compatibility across different platforms, including a specific fix for aarch64 machines.
  • Updated testing procedures to include TensorFlow Lite (TFLite) export tests under specific Python versions and operating systems, reflecting an expanded testing scope.
  • Made several adjustments in the CI configurations to standardize slow test execution across all events.
  • Commented out a conditional for RaspberryPi to potentially change its execution strategy.

🎯 Purpose & Impact

  • Enhanced Compatibility: Updates to dependencies and conditional installations aim to improve the package's compatibility across various hardware platforms and Python environments. This will likely result in smoother installation processes and fewer conflicts for users working in diverse development contexts.
  • Expanded Testing Coverage: By including TFLite export tests and modifying existing conditions, the project enhances its ability to catch potential issues across more scenarios before making releases. This proactive approach is beneficial for maintaining high-quality releases.
  • Performance Optimizations: Through selective dependency loading and adjusted test configurations, the project seeks to optimize its performance and efficiency, particularly in continuous integration environments. This can lead to faster development cycles and more reliable software performance for end-users.
  • Broader Support for Machine Learning Tasks: The inclusion of additional libraries for specific GitHub Actions events suggests an effort to support a wider array of machine learning tasks and experiments, potentially increasing the project's usefulness and applicability in real-world scenarios.

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Enhancements in CI workflows and documentation improvements for a smoother development experience. πŸš€

πŸ“Š Key Changes

  • πŸ§ͺ CI workflow now conditionally installs additional dependencies (pycocotools, mlflow, ray[tune]) for specific GitHub events (schedule, workflow_dispatch), facilitating more comprehensive testing scenarios.
  • πŸ“š Documentation for analytics and project goals has been streamlined, clarifying the importance of graphs and setting measurable objectives.
  • 🐞 Fixed TensorFlow and TensorFlow.js dependencies, specifying broader and updated version ranges for improved compatibility across different platforms. Also introduced keras as an explicit dependency to ensure smooth TensorFlow 2.16 compatibility.
  • βœ… Added new test cases for TensorFlow Lite (TFLite) exports, covering more scenarios and ensuring robust model export functionality.

🎯 Purpose & Impact

  • πŸ›  CI Workflow Enhancements: The updated CI setup allows for more targeted and efficient testing, reducing resource consumption and speeding up the development pipeline.
  • πŸ” Documentation Improvements: By refining the documentation, users are better guided on the importance of data visualization and setting clear project goals, improving project planning and outcomes.
  • πŸ•Έ Dependency Updates: The adjustments in TensorFlow dependencies ensure broader compatibility with different Python versions and operating systems, leading to fewer installation issues for developers.
  • πŸ§ͺ Extended TFLite Support: New test coverage for TFLite exports enhances the reliability of model conversions, providing users with more flexible deployment options for their AI models, especially in edge computing scenarios.

glenn-jocher and others added 30 commits May 22, 2024 22:09
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
@glenn-jocher
Copy link
Member Author

@lakshanthad cache issue is now solved. RPi benchmarks are failing on TF.js with error in TF Decision Tree Forest saying inference.so file not found. I found an existing bug report but I don't know what the right solution is:
#8343

@glenn-jocher
Copy link
Member Author

glenn-jocher commented May 28, 2024

Also:

WARNING:root:TensorFlow Decision Forests 1.8.1 is compatible with the following TensorFlow Versions: ['2.15.0']. However, TensorFlow 2.15.1 was detected. This can cause issues with the TF API and symbols in the custom C++ ops. See the TF and TF-DF compatibility table at https://github.com/tensorflow/decision-forests/blob/main/documentation/known_issues.md#compatibility-table.
WARNING:root:Failure to load the inference.so custom c++ tensorflow ops. This error is likely caused the version of TensorFlow and TensorFlow Decision Forests are not compatible.

EDIT: Going to try purging the cache to see if a fresh install helps.

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
@glenn-jocher
Copy link
Member Author

@lakshanthad ok I think this should work now. I disabled TF.js benchmarks exports in RPi that were causing the problem. Also wheel build time solved by simply remove --no-cache-dir from pip install command :)

@lakshanthad
Copy link
Contributor

@glenn-jocher Wow. That caching solution looks very simple even though we were trying to get around it by different methods :)

So now it seems this will only affect the build time the next time tensorstore updates their packages. Anyways we can look forward to some good news from Google about the pre-built binaries.

About the TF.JS exports, yeah we can keep it disabled for now but in the meantime I will try to debug in a different PR and continue from there.

ultralytics/engine/exporter.py Outdated Show resolved Hide resolved
ultralytics/utils/benchmarks.py Outdated Show resolved Hide resolved
@glenn-jocher glenn-jocher changed the title TensorFlow 2.16 Support ultralytics 8.2.24 TensorFlow 2.16 support May 29, 2024
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
@glenn-jocher glenn-jocher changed the title ultralytics 8.2.24 TensorFlow 2.16 support ultralytics 8.2.25 TensorFlow 2.16 support May 29, 2024
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
@glenn-jocher glenn-jocher changed the title ultralytics 8.2.25 TensorFlow 2.16 support ultralytics 8.2.25 latest TensorFlow 2.16 support May 29, 2024
@glenn-jocher glenn-jocher self-assigned this May 29, 2024
@glenn-jocher glenn-jocher merged commit dd819fc into main May 29, 2024
16 checks passed
@glenn-jocher glenn-jocher deleted the tflite-tf216-only branch May 29, 2024 10:40
gkinman pushed a commit to Octasic/ultralytics that referenced this pull request May 30, 2024
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
Co-authored-by: lakshanthad <lakshanthad@yahoo.com>
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

3 participants