jax-ml / jax-ml/oryx

Can't plant into scan in append mode

Open
#70 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.