From a6946369429f9bc4e75611639410adaddcb79f52 Mon Sep 17 00:00:00 2001 From: Ferdia Sherry Date: Thu, 20 Jun 2024 00:39:10 +0100 Subject: [PATCH] Explicitly save model after training (bug in transformers 4.29.2) --- scOT/train.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scOT/train.py b/scOT/train.py index 1d6967f..e2ba209 100644 --- a/scOT/train.py +++ b/scOT/train.py @@ -407,7 +407,8 @@ def get_statistics(errors): ) trainer.train(resume_from_checkpoint=params.resume_training) - + trainer.save_model(train_config.output_dir) + if (RANK == 0 or RANK == -1) and params.push_to_hf_hub is not None: model.push_to_hub(params.push_to_hf_hub)