Can't plant into scan in append mode
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 328
- Forks
- 13
- Avg merge
- 49m
- Merged PRs (30d)
- 2
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the provided Python example using harvest.sow in append mode inside jax.lax.scan, then compare it with the working clobber-mode case. Trace the harvest.plant and harvest.sow entry points to find why append indexing fails; done means the example completes without IndexError and preserves append behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100