Skip to content

Commit

Permalink
Save_ONNX defaults to False
Browse files Browse the repository at this point in the history
  • Loading branch information
mdw771 committed Apr 26, 2024
1 parent adf8753 commit 75be2ae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion generic_trainer/configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ class TrainingConfig(Config):
automatic_mixed_precision: bool = False
"""Automatic mixed precision and gradient scaling are enabled if True."""

save_onnx: bool = True
save_onnx: bool = False
"""If True, ONNX models are saved along with state dicts."""


Expand Down
2 changes: 1 addition & 1 deletion generic_trainer/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,7 @@ def save_model(self, path, subcomponent=None):
m = getattr(m, subcomponent)
torch.save(m.state_dict(), path)

def update_saved_model(self, filename='best_model.pth', save_configs=True, save_onnx=True, subcomponent=None,
def update_saved_model(self, filename='best_model.pth', save_configs=True, save_onnx=False, subcomponent=None,
run_with_only_rank_0=True):
"""
Updates saved model if validation loss is minimum.
Expand Down

0 comments on commit 75be2ae

Please sign in to comment.