Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions ludwig/trainers/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1079,14 +1079,13 @@ def resume_files_exist(
training_checkpoint_path: str,
) -> bool:
missing_files = []
if self.is_coordinator():
# training_progress.json
if not path_exists(training_progress_tracker_path):
missing_files.append(training_progress_tracker_path)
# latest.ckpt in training_checkpoints/
latest_ckpt = os.path.join(training_checkpoint_path, "latest.ckpt")
if not path_exists(latest_ckpt):
missing_files.append(latest_ckpt)
# training_progress.json
if not path_exists(training_progress_tracker_path):
missing_files.append(training_progress_tracker_path)
# latest.ckpt in training_checkpoints/
latest_ckpt = os.path.join(training_checkpoint_path, "latest.ckpt")
if not path_exists(latest_ckpt):
missing_files.append(latest_ckpt)
if missing_files:
logger.warning(f"Could not find {missing_files} while trying to resume model training.")
return False
Expand Down