Commit 425b1db
Explicitly check timeout against None so that 0.0 isn't ignored (#2348)
Summary:
Pull Request resolved: #2348
While testing some timeout-related code, I set a timeout to 0.0 to ensure that the timeout would bind. I was confused when nothing happened; it turned out that the presence of a timeout was tested for with "if timeout" rather than "if timeout is None," so that 0.0 was not considered a timeout.
Reviewed By: Balandat, SebastianAment
Differential Revision: D57542718
fbshipit-source-id: 9de3bbb20e9c21ada28d6357c7ef64dcbf829f3f1 parent 4e1cb12 commit 425b1db
File tree
2 files changed
+9
-5
lines changed- botorch/optim/utils
- test/optim/utils
2 files changed
+9
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
46 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
47 | 51 | | |
48 | 52 | | |
49 | 53 | | |
| |||
0 commit comments