mirror of
https://github.com/microsoft/autogen.git
synced 2025-11-02 02:40:21 +00:00
Use get to avoid KeyError (#824)
Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu> Co-authored-by: Kevin Chen <74878789+int-chaos@users.noreply.github.com>
This commit is contained in:
parent
f8fa5258e1
commit
dbc2e2d796
@ -235,7 +235,7 @@ class SearchState:
|
||||
n_iter = (
|
||||
trained_estimator
|
||||
and hasattr(trained_estimator, "ITER_HP")
|
||||
and trained_estimator.params[trained_estimator.ITER_HP]
|
||||
and trained_estimator.params.get(trained_estimator.ITER_HP)
|
||||
)
|
||||
if n_iter:
|
||||
config[trained_estimator.ITER_HP] = n_iter
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user