Commit 9354fd7
Set seed in test_learned_preference_objective to stop it from flaking (#2145)
Summary:
## Motivation
* The test was flaky due to a varying amount of numerical error depending on random inputs, so I set a seed to a random number between 0 and 10
* Changed some data to double precision to avoid a warning
Pull Request resolved: #2145
Test Plan:
* checked that the test passes for each seed between 0 and 10
* I confirmed that there are seeds that do cause it to fail
* Increased the number of samples a lot to confirm that numerical error because small when the number of samples is large -- in other words, the error is due to a low number of samples
Reviewed By: Balandat
Differential Revision: D52002349
Pulled By: esantorella
fbshipit-source-id: c1908bdf649db0d51c8e8c2806b9e55258ffb8551 parent f2003dd commit 9354fd7
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
454 | 454 | | |
455 | 455 | | |
456 | 456 | | |
| 457 | + | |
| 458 | + | |
457 | 459 | | |
458 | 460 | | |
459 | 461 | | |
| |||
492 | 494 | | |
493 | 495 | | |
494 | 496 | | |
495 | | - | |
| 497 | + | |
496 | 498 | | |
497 | 499 | | |
498 | 500 | | |
| |||
0 commit comments