Skip to content

Commit

Permalink
Added try block in load_from_path()
Browse files Browse the repository at this point in the history
  • Loading branch information
xuyuon committed Sep 2, 2024
1 parent c906c67 commit 7309e44
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/jimgw/single_event/runManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,12 @@ def load_from_path(self, path: str) -> SingleEventRun:
and "local_sampler_arg" in data["jim_parameters"]
and "step_size" in data["jim_parameters"]["local_sampler_arg"]
):
data["jim_parameters"]["local_sampler_arg"]["step_size"] = jnp.array(
data["jim_parameters"]["local_sampler_arg"]["step_size"]
)
try:
data["jim_parameters"]["local_sampler_arg"]["step_size"] = jnp.array(
data["jim_parameters"]["local_sampler_arg"]["step_size"]
)
except Exception as e:
print(f"Error in loading step_size: {e}")
return SingleEventRun(**data)

### Initialization functions ###
Expand Down

0 comments on commit 7309e44

Please sign in to comment.