-
Notifications
You must be signed in to change notification settings - Fork 19.6k
Relax tolerance for SVD test #21731
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
Relax tolerance for SVD test #21731
Conversation
Summary of ChangesHello @abheesht17, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request adjusts the numerical tolerance for a Singular Value Decomposition (SVD) test within the Keras linear algebra operations. The change aims to prevent test failures due to minor floating-point discrepancies by allowing a slightly larger margin of error in the assertion. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request relaxes the tolerance in a Singular Value Decomposition (SVD) test from 1e-6 to 1e-5. This is a common and reasonable adjustment to account for minor numerical precision differences that can occur across various backends and hardware, which helps prevent test flakiness. The new tolerance remains sufficiently strict. The change looks good. In the future, it would be helpful to include a brief description in the pull request explaining the context for the change, for instance, which backend or hardware was causing the test to fail. This helps with tracking and understanding the evolution of the codebase.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #21731 +/- ##
=======================================
Coverage 82.59% 82.59%
=======================================
Files 572 572
Lines 58535 58535
Branches 9158 9158
=======================================
Hits 48345 48345
Misses 7853 7853
Partials 2337 2337
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
1e-6is too precise, relax tol to1e-5. Fixes internal tests