-
Notifications
You must be signed in to change notification settings - Fork 6
Fix flaky test_json_serialization by using deterministic test data #582
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
Conversation
5866cbd to
f1c3c8e
Compare
hombit
left a comment
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.
@copilot let's better try to use gen_lc with fixed random seed
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #582 +/- ##
=======================================
Coverage 82.60% 82.60%
=======================================
Files 9 9
Lines 2604 2604
=======================================
Hits 2151 2151
Misses 453 453 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
CodSpeed Performance ReportMerging #582 will not alter performanceComparing
|
Co-authored-by: hombit <1784493+hombit@users.noreply.github.com>
Co-authored-by: hombit <1784493+hombit@users.noreply.github.com>
b9fe806 to
74c9ab8
Compare
…ignore Co-authored-by: hombit <1784493+hombit@users.noreply.github.com>
The
test_json_serializationtest intermittently fails in CI with relative differences ~1.13e-07, exceeding the defaultassert_allclosetolerance of 1e-07. This occurs due to non-deterministic random data generation in the test.Changes
rng=0togen_lc()call to ensure deterministic test data generationThis approach makes the test fully deterministic by ensuring the same random data is generated every run, eliminating flakiness at the source while maintaining the strict default tolerance (rtol=1e-7). This is consistent with the test parametrization which already uses
rng=0for feature generation.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.