factor_agent.snapshot#

The RunSnapshot: the files a run searched with and the code it ran, kept in its run directory.

A run’s search space is what its files say (SearchFiles): the field files and the operator file and the replaced prompt templates. On a first start open copies each file into <run_dir>/snapshot/<name> and records its hash and the code versions (the commits of this package and of quantlab) in <run_dir>/snapshot.json. On a resume a file whose name or content differs from the snapshot is an error (differences says how, writing nothing), since a new search space needs a new run directory; a code version that differs only warns, so a bug-fix resume is allowed but visible, and every code version a run was opened with is kept in order.

The run reads the snapshot’s copies (search_files), not the files it was given, and read opens a run’s snapshot without recording anything, for Acceptance and for a replay of the run.

Classes

RunSnapshot

The snapshot of a run directory; build it with open or read.

SearchFiles

The files a run searches with: the field files, the operator file and the replaced templates.