Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Can't plant into scan in append mode #70

@jkramar

Description

@jkramar

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions