quantlab.runs.directory.read_record#
- quantlab.runs.directory.read_record(directory, kinds=None)[source]#
Return the
run.jsonof the run indirectory, after checking its header.- Parameters:
- directoryPath or str
The run’s directory.
- kindscollection of str, optional
The kinds the caller reads; any kind when not given.
- Returns:
- dict
The whole record, header included.
- Raises:
- ValueError
If
directoryhas norun.json, it was written in aformat_versionother thanFORMAT_VERSION, or its kind is not one ofkinds.
Examples
>>> read_record(unit)["kind"] 'model'