factor_agent.snapshot.RunSnapshot.open#

classmethod RunSnapshot.open(run_dir, search, versions, settings=None)[source]#

Open run_dir with the files of search, the code versions it runs on and its settings.

A first start copies the files, under their SearchFiles.names, and records settings (by section, the config settings the search depends on besides the files, such as {"context": {"recent_rounds": 5}} and, with an intraday family, {"intraday": {"dataset": ...}}); a resume checks the files against the copies and the settings against the recorded ones. Either way versions is appended to the recorded versions.

Raises:
SnapshotMismatch

On a resume, naming every file added, removed or changed and every setting changed since the first start.

ValueError

If two field files have the same file name.

Warns:
CodeVersionChanged

On a resume whose versions differ from the last recorded ones.