"...resnet50_tensorflow.git" did not exist on "fe6829597a381e8ddecbf901143bae23a3529622"
Unverified Commit c48546c7 authored by Sylvain Gugger's avatar Sylvain Gugger Committed by GitHub
Browse files

Fix resuming training for Windows (#6847)

parent d2f9cb83
......@@ -644,7 +644,7 @@ class Trainer:
if model_path is not None:
# set global_step to global_step of last saved checkpoint from model path
try:
self.global_step = int(model_path.split("-")[-1].split("/")[0])
self.global_step = int(model_path.split("-")[-1].split(os.path.sep)[0])
epochs_trained = self.global_step // (len(train_dataloader) // self.args.gradient_accumulation_steps)
steps_trained_in_current_epoch = self.global_step % (
len(train_dataloader) // self.args.gradient_accumulation_steps
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment