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

Keras CI fix #5486

Merged
merged 4 commits into from
Nov 3, 2021
Merged

Keras CI fix #5486

merged 4 commits into from
Nov 3, 2021

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Nov 3, 2021

Fix for keras==2.7.0 CI errors

https://github.com/ultralytics/yolov5/runs/4096367094?check_suite_focus=true

tensorflow.python.framework.errors_impl.AlreadyExistsError: Another metric with the same name already exists.

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Introducing pinned Keras version to resolve export issue in CI workflow.

📊 Key Changes

  • Updated Continuous Integration (CI) testing workflow configuration.
  • Specified Keras version 2.6.0 when installing dependencies for export functions.

🎯 Purpose & Impact

  • 🛠 Purpose: The change addresses a known issue with Keras version 2.7.0 that was affecting model export functionality.
  • 🚀 Impact: The fix ensures that developers and users who rely on exporting models from YOLOv5 to ONNX or TensorFlow formats experience no errors or disruptions due to incompatibilities with the latest Keras version.
  • 🎨 Non-Expert Explanation: We've made sure that the tools used to turn our AI models into formats that other software can use are working smoothly, by opting for a version of Keras that we know works well.

@glenn-jocher glenn-jocher self-assigned this Nov 3, 2021
@glenn-jocher glenn-jocher merged commit 34b859a into master Nov 3, 2021
@glenn-jocher glenn-jocher deleted the fix/keras branch November 3, 2021 18:25
@glenn-jocher
Copy link
Member Author

glenn-jocher commented Nov 3, 2021

@Borda FYI CI fix

@zldrobit it seems that Keras 2.7.0 is causing an error with python models/tf.py. The CI checks caught this as pip started installing 2.7.0 today, and I implemented this PR as a workaround pinning keras==2.6.0. I don't think there's any action for us to take, but just thought you should know.

@zldrobit
Copy link
Contributor

zldrobit commented Nov 4, 2021

@glenn-jocher This is caused by the different versions between TensorFlow and Keras. I could reproduce the error using python models/tf.py --weights yolov5s.pt with tensorflow-cpu==2.6.1 and keras=2.7.0, and there is no error while running with tensorflow-cpu==2.7.0rc1 and keras==2.7.0.

BjarneKuehl pushed a commit to fhkiel-mlaip/yolov5 that referenced this pull request Aug 26, 2022
* Keras CI fix

* pre-commit fixes

* Update ci-testing.yml

Co-authored-by: pre-commit <pre-commit@example.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

2 participants