mirror of
https://github.com/microsoft/autogen.git
synced 2026-01-25 03:58:09 -05: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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user