Update spacy/training/pretrain.py

Co-authored-by: Adriane Boyd <adrianeboyd@gmail.com>
This commit is contained in:
Edward 2023-03-27 14:12:49 +02:00 committed by GitHub
parent 1da14748db
commit 33b39baf61
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -64,7 +64,7 @@ def pretrain(
is_temp_str = ".temp" if is_temp else ""
with model.use_params(optimizer.averages):
if is_last:
save_path = output_dir / f"model_last.bin"
save_path = output_dir / f"model-last.bin"
else:
save_path = output_dir / f"model{epoch}{is_temp_str}.bin"
with (save_path).open("wb") as file_: