Skip to content

Commit 05cef15

Browse files
committed
implement save_strategy no
1 parent 38b886f commit 05cef15

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/transformers/trainer.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3231,6 +3231,9 @@ def save_model(self, output_dir: Optional[str] = None, _internal_call: bool = Fa
32313231
Will only save from the main process.
32323232
"""
32333233

3234+
if self.args.save_strategy == "no":
3235+
return
3236+
32343237
if output_dir is None:
32353238
output_dir = self.args.output_dir
32363239

0 commit comments

Comments
 (0)