зеркало из https://github.com/microsoft/FLAML.git
fix delete (#950)
This commit is contained in:
Родитель
27b2712016
Коммит
a3e770eac5
|
@ -732,10 +732,8 @@ class TransformersEstimator(BaseEstimator):
|
||||||
|
|
||||||
def _delete_one_ckpt(self, ckpt_location):
|
def _delete_one_ckpt(self, ckpt_location):
|
||||||
if self._use_ray is False:
|
if self._use_ray is False:
|
||||||
try:
|
if os.path.exists(ckpt_location):
|
||||||
shutil.rmtree(ckpt_location)
|
shutil.rmtree(ckpt_location)
|
||||||
except FileNotFoundError:
|
|
||||||
logger.warning("checkpoint {} not found".format(ckpt_location))
|
|
||||||
|
|
||||||
def cleanup(self):
|
def cleanup(self):
|
||||||
super().cleanup()
|
super().cleanup()
|
||||||
|
|
Загрузка…
Ссылка в новой задаче