[Bug]: final-model.pt on KeyboardInterrupt even if save_final_model=False
#3250
Labels
bug
Something isn't working
save_final_model=False
#3250
Describe the bug
Flair's trainer saves a "final-model.pt" on a keyboard-interrupt even if
save_final_model
is false.I haven't opened a PR yet, since I'm not sure, if this behavior is intended (e.g. to enable the continuation of training). Personally, I would not expect flair to produce a "final-model.pt" in this case.
The following line (as well as in the following except-block), would need to be encased by an if-statement:
flair/flair/trainers/trainer.py
Line 707 in 5c53e35
To Reproduce
Expected behavior
I would expect flair to terminate the training (after doing the final evaluation) and to not write a final model file.
Logs and Stack traces
No response
Screenshots
No response
Additional Context
No response
Environment
Versions:
Flair
0.12.2
Pytorch
2.0.1+cu117
Transformers
4.29.2
GPU
True
The text was updated successfully, but these errors were encountered: