feat/bugfix #22

Merged
Fabel merged 2 commits from feat/bugfix into main 2025-06-30 08:18:10 +00:00
1 changed files with 3 additions and 1 deletions
Showing only changes of commit 358a7c34d0 - Show all commits

View File

@ -309,7 +309,9 @@ class aiuNNTrainer:
# Cleanup
gc.collect()
torch.cuda.empty_cache()
if not is_improved:
best_model_path = os.path.join(output_path, "final_model")
self.model.save_pretrained(best_model_path)
return self.best_loss
def load_checkpoint(self, specific_checkpoint=None):