quantlab.runs.directory.open_run#

quantlab.runs.directory.open_run(path)[source]#

Read the run at path as the type its kind names.

Parameters:
pathPath or str

The run’s directory, its run.json, or a file the run type opens from (a model’s checkpoint).

Returns:
object

The run, as its type’s open(path) reads it.

Raises:
FileNotFoundError

If path does not exist.

ValueError

If the run has no run.json, another format_version, or a kind no run type reads.

Examples

>>> open_run(checkpoint) == TrainedRun.open(checkpoint)
True