Skip to content

Commit

Permalink
fix compile behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewdipper committed May 22, 2024
1 parent 5ebb63d commit 8534f5f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion numpyro/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,9 @@ def loop_fn(collection):

if upper == 0:
# special case, only compiling
_body_fn_wrap(0, *vals)
val, collection, start_idx, thinning = vals
dummy_collection = jax.tree.map(lambda x: x.copy(), collection)
_body_fn_wrap(0, val, dummy_collection, start_idx, thinning)
else:
with tqdm.trange(upper) as t:
for i in t:
Expand Down

0 comments on commit 8534f5f

Please sign in to comment.