From 59250846b035cff382a1a9180fe5b203175cca1e Mon Sep 17 00:00:00 2001 From: Han Wang Date: Mon, 10 May 2021 20:04:59 -0700 Subject: [PATCH] Update tune init (#29) * update * update * update * update * update * update --- README.md | 4 ++++ fuggle/__init__.py | 6 +++++- fuggle_version/__init__.py | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7878c0d..e081e68 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,10 @@ Fugue for Kaggle users ## Release History +### 0.2.8 + +* Update tune init + ### 0.2.7 * Update fugue and tune versions diff --git a/fuggle/__init__.py b/fuggle/__init__.py index 5f02832..97fe14d 100644 --- a/fuggle/__init__.py +++ b/fuggle/__init__.py @@ -24,7 +24,7 @@ def setup(default_engine: str = "") -> Any: TUNE_OBJECT_FACTORY.set_temp_path("/tmp") - TUNE_OBJECT_FACTORY.set_noniterative_objective_runner_converter(_to_runner) + TUNE_OBJECT_FACTORY.set_noniterative_local_optimizer_converter(_to_runner) TUNE_OBJECT_FACTORY.set_monitor_converter(_to_monitor) # we no longer enable SQL highlighting, kaggle has changed @@ -35,12 +35,16 @@ def setup(default_engine: str = "") -> Any: def _to_runner(obj: Any) -> Optional[NonIterativeObjectiveLocalOptimizer]: if obj is None: return HyperoptLocalOptimizer(20, 0) + if isinstance(obj, NonIterativeObjectiveLocalOptimizer): + return obj raise NotImplementedError(obj) def _to_monitor(obj: Any) -> Optional[Monitor]: if obj is None: return None + if isinstance(obj, Monitor): + return obj if isinstance(obj, str): if obj == "hist": return NotebookSimpleHist() diff --git a/fuggle_version/__init__.py b/fuggle_version/__init__.py index 6cd38b7..c49a95c 100644 --- a/fuggle_version/__init__.py +++ b/fuggle_version/__init__.py @@ -1 +1 @@ -__version__ = "0.2.7" +__version__ = "0.2.8"