Skip to content

Commit 7c6ba44

Browse files
committed
minor fix for early stop
1 parent 181cfb0 commit 7c6ba44

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

docs/en/advanced_usage/early_stop.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ The output of early stopping is as follows:
9595
```
9696
[Early Stop] EI less than the threshold! min_improvement_percentage=0.05,
9797
default_obj=0.03334620334620342, best_obj=0.022310167310167328,
98-
threshold=0.0005518018018018045, max_EI=[0.00051861]
98+
threshold=0.0005518018018018045, max_EI=0.0005186128080311961
9999
100100
Early stop triggered at iter 41!
101101
```

docs/zh_CN/advanced_usage/early_stop.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ print(history)
8080
```
8181
[Early Stop] EI less than the threshold! min_improvement_percentage=0.05,
8282
default_obj=0.03334620334620342, best_obj=0.022310167310167328,
83-
threshold=0.0005518018018018045, max_EI=[0.00051861]
83+
threshold=0.0005518018018018045, max_EI=0.0005186128080311961
8484
8585
Early stop triggered at iter 41!
8686
```

openbox/core/generic_advisor.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ def get_suggestion(self, history: History = None, return_list: bool = False):
524524

525525
# early stop
526526
if self.early_stop:
527-
max_acq_value = max(self.acquisition_function(challengers))
527+
max_acq_value = np.max(self.acquisition_function(challengers)).item()
528528
if self.early_stop_algorithm.decide_early_stop_after_suggest(
529529
history=history, max_acq_value=max_acq_value):
530530
self.early_stop_algorithm.set_already_early_stopped(history)

0 commit comments

Comments
 (0)