From 7f6e7b3d541c27a57a68255b936a8a1fd7d37ea9 Mon Sep 17 00:00:00 2001 From: Anonymous-submission-repo <79179917+Anonymous-submission-repo@users.noreply.github.com> Date: Thu, 13 Oct 2022 14:22:34 -0400 Subject: [PATCH] Update flaml/tune/searcher/search_thread.py Co-authored-by: Chi Wang --- flaml/tune/searcher/search_thread.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/flaml/tune/searcher/search_thread.py b/flaml/tune/searcher/search_thread.py index 6e2cc0986..8f0c160f7 100644 --- a/flaml/tune/searcher/search_thread.py +++ b/flaml/tune/searcher/search_thread.py @@ -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.