Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
thundergolfer committed Aug 2, 2023
1 parent c15f360 commit 9a9fa29
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions 06_gpu_and_ml/flan_t5/flan_t5_finetune.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,9 @@ def on_save(self, args, state, control, **kwargs):
"""
Event called after a checkpoint save.
"""
print("running commit on modal.Volume after model checkpoint")
self.volume.commit()
if state.is_world_process_zero:
print("running commit on modal.Volume after model checkpoint")
self.volume.commit()

training_args = Seq2SeqTrainingArguments(
# Save checkpoints to the mounted volume
Expand All @@ -142,8 +143,6 @@ def on_save(self, args, state, control, **kwargs):
predict_with_generate=True,
learning_rate=3e-5,
num_train_epochs=num_train_epochs,
# Save logs to the mounted volume
logging_dir=str(VOL_MOUNT_PATH / "logs"),
logging_strategy="steps",
logging_steps=100,
evaluation_strategy="epoch",
Expand Down

0 comments on commit 9a9fa29

Please sign in to comment.