Skip to content

Add a way to snapshot state #39

@rsmith49

Description

@rsmith49

We want to be able to take a snapshot of a particular state, both for RL purposes and for Mech Interp purposes. This will probably be done via some kind of "tar environment then save locally" process, but a lot of open questions on how we implement it.

After a bit of thought can have:

  • a CodeBaseState dataclass in environments logic that contains a reference to where the tarball is locally
  • a ContainerSnapshot dataclass in containers logic that contains all necessary info to recreate a container exactly as is (image, name, dockerfile, resources, and files? or maybe some files diff with the docker image?)
    • Might be able to just leverage Daytona's create_snapshot logic here
  • an export_state() method on CodeBaseEnvs to save the state somewhere in order to recreate it later
  • a load_from_state() class method on CodeBaseEnvs in order to replay the environment starting at that state
    • This might be hard to implement for CodeAgents, especially installed agents in future

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