experiment.utils module¶
General utilities.
-
experiment.utils.
createResultFolder
(results_folder: str = None, base_path: str = None, params: list = None, diff_file: bool = True, use_timestamp: bool = True, use_jobid: bool = True, postfix: str = None, strict_git: bool = False)[source]¶ Create Results Folder
This function creates a unique hierarchical results folder name. It is made of the git version and time stamp. It can also dump a diff log between the git version and the working copy at the time of run.
Parameters: - results_folder (Optional[str]) – Results folder. Useful when results folder exists and only storing of params is needed.
- base_path (optional[str]) – Root name of the results folder.
- params (optional[list]) – List of parameters of the run. Will be saved
- txt file. (as) –
- diff_file (optional[bool]) – Whether to save the diff log.
- use_timestamp (optional[bool]) – Whether to add a timestamp to the path.
- use_jobid (optional[bool]) – Whether to add a the jobid to the path.
- postfix (optional[str]) – Last subfolder.
- strict_git (optional[bool]) –
Returns: Full path of results folder.
-
experiment.utils.
getGitInfo
(strict: bool = False) → Tuple[str, str][source]¶ Get version and diff information.
Parameters: - strict (bool, optional) – If True (default) will raise an exception when
- are modified or un-tracked python files in the repository. (there) –