Skip to content

Commit

Permalink
Extend Error handling in run_inference_algorithm
Browse files Browse the repository at this point in the history
Minor change.
  • Loading branch information
junpenglao authored Dec 14, 2023
1 parent f12fc38 commit 7499bfd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion blackjax/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def run_inference_algorithm(
init_key, sample_key = split(rng_key, 2)
try:
initial_state = inference_algorithm.init(initial_state_or_position, init_key)
except TypeError:
except (TypeError, ValueError, AttributeError):
# We assume initial_state is already in the right format.
initial_state = initial_state_or_position

Expand Down

0 comments on commit 7499bfd

Please sign in to comment.