nntool.utilsΒΆ
- nntool.utils.get_current_time()[source]ΒΆ
get current time in this format: MMDDYYYY/HHMMSS
- Returns:
time in the format MMDDYYYY/HHMMSS
- Return type:
str
- nntool.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]