Here's an example:
def body(carry, _):
return harvest.sow(carry, name='x', mode='append', tag='tag'), None
harvest.plant(lambda x: jax.lax.scan(body, x, None, 5), tag='tag')({'x': 1}, 1)
This crashes with an IndexError: list assignment index out of range. The equivalent snippet with mode='clobber' works fine.
Here's an example:
This crashes with an
IndexError: list assignment index out of range. The equivalent snippet withmode='clobber'works fine.