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
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:
CodeBaseStatedataclass in environments logic that contains a reference to where the tarball is locallyContainerSnapshotdataclass 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?)create_snapshotlogic hereexport_state()method onCodeBaseEnvs to save the state somewhere in order to recreate it laterload_from_state()class method onCodeBaseEnvs in order to replay the environment starting at that state