Commit 923cce5
authored
Fix BruteForce serialize test (#1568)
`test_serialization.py::test_save_load_brute_force` can sometimes fail due to the ordering of the neighbors. To fix this we can sort the neighbors before comparison, and if there's a small discrepancy due to two neighbors being at the same distance on the `k` cutoff we check that the recall is over 99.8%.
I ran this test on a loop for 60k iterations without it failing.
Authors:
- Micka (https://github.com/lowener)
Approvers:
- Gil Forsyth (https://github.com/gforsyth)
- Divye Gala (https://github.com/divyegala)
- Corey J. Nolet (https://github.com/cjnolet)
URL: #15681 parent 19dd922 commit 923cce5
1 file changed
+15
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
81 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
0 commit comments