From ab8e206687eae4d81c8a91e194db3bd574c26aae Mon Sep 17 00:00:00 2001 From: zihaoxu98 Date: Wed, 4 Sep 2024 11:10:14 -0500 Subject: [PATCH] fix backend filename --- appletree/context.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/appletree/context.py b/appletree/context.py index c4bb209..286c489 100644 --- a/appletree/context.py +++ b/appletree/context.py @@ -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