Skip to content

Commit

Permalink
fix backend filename
Browse files Browse the repository at this point in the history
  • Loading branch information
zihaoxu98 committed Sep 4, 2024
1 parent 63367ae commit ab8e206
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions appletree/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ def from_backend(cls, backend_h5_file_name):
nwalkers = file["mcmc"].attrs["nwalkers"]
batch_size = file["mcmc"].attrs["batch_size"]
tree = cls(instruct)
# Overwrite the backend_h5 file name. If the user renames the
# backend file then it could be different from the one in intruct
tree.backend_h5 = backend_h5_file_name
tree.pre_fitting(nwalkers, batch_size=batch_size)
return tree

Expand Down

0 comments on commit ab8e206

Please sign in to comment.