From a844b76fe1ebe88264e2b55a7bc4e6e9a2eede0c Mon Sep 17 00:00:00 2001 From: Tamino Huxohl <thuxohl@techfak.uni-bielefeld.de> Date: Fri, 13 Jan 2023 11:27:51 +0100 Subject: [PATCH] formatting --- mu_map/training/random_search.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mu_map/training/random_search.py b/mu_map/training/random_search.py index 275b316..0688ef3 100644 --- a/mu_map/training/random_search.py +++ b/mu_map/training/random_search.py @@ -236,6 +236,7 @@ def validate_and_make_directory(_dir: str): print(f"Directory {_dir} exists and is unexpectedly not empty!") exit(1) + def init_from_dir(_dir: str, logger: logging.Logger) -> Tuple[int, float]: last_run = os.listdir(_dir) # filter non-directories @@ -251,7 +252,9 @@ def init_from_dir(_dir: str, logger: logging.Logger) -> Tuple[int, float]: min_loss = pd.read_csv(os.path.join(_dir, "best", "measures.csv")) min_loss = min_loss["NMAE"].mean() - logger.info(f"Continue existing random search from run {last_run} and minimal NMAE {min_loss}") + logger.info( + f"Continue existing random search from run {last_run} and minimal NMAE {min_loss}" + ) return last_run + 1, min_loss -- GitLab