Skip to content

Commit

Permalink
Prevent InferenceConfig.pretrained_model_path from being overwritten …
Browse files Browse the repository at this point in the history
…to None
  • Loading branch information
mdw771 committed May 22, 2024
1 parent d049b7b commit 54dcb8c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions generic_trainer/configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,8 @@ def string_to_object(self, key, value):
value = super().string_to_object(key, value)
if key == 'model_save_dir':
self.pretrained_model_path = os.path.join(value, 'best_model.pth')
if key == 'pretrained_model_path' and value is None:
value = self.pretrained_model_path
return value


Expand Down

0 comments on commit 54dcb8c

Please sign in to comment.