Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyangkang committed Oct 27, 2024
1 parent d0c4b0e commit d38ff40
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion stemflow/model/AdaSTEM.py
Original file line number Diff line number Diff line change
Expand Up @@ -1263,9 +1263,10 @@ def save(self, tar_gz_file, remove_temporary_file = True):

#
path, basename = os.path.split(Path(tar_gz_file.rstrip('/\\')))
tmp_code = int(np.random.uniform(0,1e8))

# temporary save the model using pickle
model_path = os.path.join(path, 'model.pkl')
model_path = os.path.join(path, f'model_{tmp_code}.pkl')
with open(model_path, 'wb') as f:
pickle.dump(self, f)

Expand Down

0 comments on commit d38ff40

Please sign in to comment.