Skip to content

Inplace vs out of place in local updates #2

Description

@frozaken

Currently local updates follow roughly this sceme

it = exe.get_iterator(noise_tree)

for node in it:
    key, subkey = jax.random.split(key)
    proposed = params.propose(subkey)

    accepted = exe.update(node, proposed)
    params.update(proposed, accepted)

The problem here, is that all operations are inplace. We should figure out if get_iterator should also return a new tree pointer, or if each update call should result in a new tree (and if so, how on earth do we make that fast). The immediate way to effectivize soemthing like that is create a context manager that requires either the previous state or new state to be commited into the tree before exiting the context, this way we would only have one working dataview at a time

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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