quantlab.runs.trained_run.new_trial_directory#

quantlab.runs.trained_run.new_trial_directory(root, class_name)[source]#

Return a fresh, absolute {class_name}_trial_{%Y%m%d_%H%M%S_%f} path under root.

The path does not exist yet and is not created: when the name is taken, _1, _2, … are appended. It is absolute, so the checkpoints a unit records never depend on the working directory.

Examples

>>> new_trial_directory("models", "MyHead").name.startswith("MyHead_trial_")
True