Update flaml/tune/searcher/search_thread.py

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
This commit is contained in:
Anonymous-submission-repo 2022-10-13 14:22:34 -04:00 committed by GitHub
parent 2d18c49cdd
commit 7f6e7b3d54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -138,8 +138,7 @@ class SearchThread:
self.cost_last = result.get(self.cost_attr, 1)
self.cost_total += self.cost_last
if self._search_alg.metric in result and (
not hasattr(self._search_alg, "lexico_objectives")
or self._search_alg.lexico_objectives is None
getattr(self._search_alg, "lexico_objectives", None) is None
):
# TODO: Improve this behavior. When lexico_objectives is provided to CFO,
# related variables are not callable.