This commit is contained in:
Julien Chaumond
2019-11-05 19:06:12 -05:00
parent de890ae67d
commit 30968d70af
6 changed files with 27 additions and 17 deletions

View File

@@ -238,7 +238,7 @@ class PreTrainedModel(nn.Module):
"""
assert os.path.isdir(save_directory), "Saving path should be a directory where the model and configuration can be saved"
# Only save the model it-self if we are using distributed training
# Only save the model itself if we are using distributed training
model_to_save = self.module if hasattr(self, 'module') else self
# Save configuration file