quantlab.runs.directory.write_record#

quantlab.runs.directory.write_record(directory, kind, record)[source]#

Write record as the run.json of directory, atomically, under the header.

Call it last: the record is what makes the directory a run. NaN and inf become null.

Parameters:
directoryPath or str

The run’s directory, already holding its files.

kindstr

The run’s kind, one open_run knows.

recorddict

The run type’s own entries; paths in it relative to directory.

Returns:
Path

The run.json written.

Examples

>>> path = write_record(unit, "model", {...})
>>> read_record(unit)["kind"]
'model'