Skip to content

Commit

Permalink
patch to allow for overwriting model files (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
eacharles committed Nov 1, 2023
1 parent ee6eba5 commit 263b2a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rail/core/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ def write(self, model, path, force=False, writer=None, **kwargs): #pylint: disa
"""Write the model, this default implementation uses pickle"""
if writer is None:
writer = default_model_write
if force or path not in self:
if force or path not in self or not os.path.exists(path):
self.__setitem__(path, model)
writer(model, path)

Expand Down

0 comments on commit 263b2a6

Please sign in to comment.