Skip to content

compile_train gives no way to get the shared variables its step writes #80

Description

@jessegrabowski

save_state wants the list of shared variables one step writes and compile_train assembles exactly that dict and throws it away, so anything that checkpoints -- or that has to force MLX's lazy arrays each step -- hand-assembles the updates instead, or reaches into f.maker.expanded_inputs.

step = compile_train(loss, adam(1e-3), extra_outputs=[abs_residual])
save_state(step, "latest.safetensors")  # want: a Function is enough to say what to save

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions