Commit 5c25751
committed
Skip experiments with no metric when picking the best autotuning record
get_best_space_record compared metric_val > best_space_record[1]
unconditionally. When an experiment produces no metric (for example an
OOM during autotuning), metric_val is None, and once the first record
in a space is None the very next comparison raises TypeError:
'>' not supported between instances of 'NoneType' and 'NoneType'.
This crashes the whole tuning run and throws away every valid result
gathered so far, in both the fast-mode and full-tuning call sites in
tune_space, plus get_best_space_records.
Records with a None metric are no longer eligible to become the best
record. They still count toward the space's total experiment count,
they just cannot win the comparison, which matches how a failed run
should be treated everywhere the function is called from.
Fixes #3475
Signed-off-by: rakshit-gen <sisodiarakshit456@gmail.com>1 parent 05daf05 commit 5c25751
2 files changed
Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
719 | 719 | | |
720 | 720 | | |
721 | 721 | | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
722 | 725 | | |
723 | 726 | | |
724 | 727 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
82 | 103 | | |
83 | 104 | | |
84 | 105 | | |
| |||
0 commit comments