Can't harvest-plant jitted scan in clobber mode
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 328
- Forks
- 13
- Avg merge
- 49m
- Merged PRs (30d)
- 2
Description
Example:
```py
def body(carry, _):
return harvest.sow(carry, name='x', mode='clobber', tag='tag'), None
f = jax.jit(lambda x: jax.lax.scan(body, x, None, 5))
harvest.harvest(f, tag='tag')({'x': 1}, 1)
```
This raises `ValueError: safe_zip() argument 2 is longer than argument 1`.
Interestingly, it does work without the planted value, or without the jit, or if we replace `harvest.harvest` with `harvest.plant`.
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 reported Python reproducer using jax.jit, jax.lax.scan, harvest.sow in clobber mode, and harvest.harvest. Compare it with the cases that work without the planted value, without jit, or with harvest.plant; done means the jitted scan completes without the safe_zip ValueError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100