nntool.experiment.utilsΒΆ
Functions
get current time in this format: MMDDYYYY/HHMMSS |
|
|
Get output path based on environment variable OUTPUT_PATH and NNTOOL_OUTPUT_PATH. |
|
Read a toml file and return the content as a dictionary |
- nntool.experiment.utils.get_current_time()[source]ΒΆ
get current time in this format: MMDDYYYY/HHMMSS
- Returns:
time in the format MMDDYYYY/HHMMSS
- Return type:
str
- nntool.experiment.utils.read_toml_file(file_path)[source]ΒΆ
Read a toml file and return the content as a dictionary
- Parameters:
file_path (str) β path to the toml file
- Returns:
content of the toml file as a dictionary
- Return type:
dict
- nntool.experiment.utils.get_output_path(output_path='./', append_date=True, cache_into_env=True)[source]ΒΆ
Get output path based on environment variable OUTPUT_PATH and NNTOOL_OUTPUT_PATH. The output path is appended with the current time if append_date is True (e.g. /OUTPUT_PATH/xxx/MMDDYYYY/HHMMSS).
- Parameters:
append_date (bool) β append a children folder with the date time, defaults to True
cache_into_env (bool) β whether cache the newly created path into env, defaults to True
- Returns:
(output path, current time)
- Return type:
tuple[str, str]