fix delete (#950)

This commit is contained in:
Susan Xueqing Liu
2023-03-13 23:19:58 -04:00
committed by GitHub
parent 27b2712016
commit a3e770eac5

View File

@@ -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()