BUG: Checkpoint path not picked up correctly (#630)

Fix for the checkpoint path (of the best metrics checkpoint) not being
correctly picked up on the cluster.
This commit is contained in:
Harshita Sharma 2022-10-13 11:27:39 +01:00 коммит произвёл GitHub
Родитель e2c1ca1cb4
Коммит bbc19ec084
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -196,6 +196,10 @@ class BaseMIL(LightningContainer, EncoderParams, PoolingParams, LossCallbackPara
if absolute_checkpoint_path_parent.is_file():
return absolute_checkpoint_path_parent
checkpoint_path = Path(self.checkpoint_folder, self.best_checkpoint_filename_with_suffix)
if checkpoint_path.is_file():
return checkpoint_path
checkpoint_path = get_best_checkpoint_path(self.checkpoint_folder)
if checkpoint_path.is_file():
return checkpoint_path