From a3e770eac53de3f6c24bd0090668a095a6f2ab64 Mon Sep 17 00:00:00 2001 From: Susan Xueqing Liu Date: Mon, 13 Mar 2023 23:19:58 -0400 Subject: [PATCH] fix delete (#950) --- flaml/automl/model.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/flaml/automl/model.py b/flaml/automl/model.py index 019aee347..96ada5e15 100644 --- a/flaml/automl/model.py +++ b/flaml/automl/model.py @@ -732,10 +732,8 @@ class TransformersEstimator(BaseEstimator): def _delete_one_ckpt(self, ckpt_location): if self._use_ray is False: - try: + if os.path.exists(ckpt_location): shutil.rmtree(ckpt_location) - except FileNotFoundError: - logger.warning("checkpoint {} not found".format(ckpt_location)) def cleanup(self): super().cleanup()