From 398d6e06289d3bd89a33f34fad0a49caae3d3fd0 Mon Sep 17 00:00:00 2001 From: jjanezhang Date: Fri, 2 Feb 2024 13:30:59 -0800 Subject: [PATCH] set default for log dir --- composer/cli/launcher.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/composer/cli/launcher.py b/composer/cli/launcher.py index c0eae19d24..c238f88156 100755 --- a/composer/cli/launcher.py +++ b/composer/cli/launcher.py @@ -482,13 +482,13 @@ def main(): # If running on the Mosaic platform, log all gpu ranks' stderr and stdout to Mosaic platform if os.environ.get(MOSAICML_PLATFORM_ENV_VAR, - 'false').lower() == 'true' and os.environ.get(MOSAICML_LOG_DIR_ENV_VAR, '') != '': + 'false').lower() == 'true' and os.environ.get(MOSAICML_LOG_DIR_ENV_VAR, '/') != '/': log.info('Logging all GPU ranks to Mosaic Platform.') log_file_format = f'{os.environ.get(MOSAICML_LOG_DIR_ENV_VAR)}/gpu_{{rank}}.txt' if args.stderr is not None or args.stdout is not None: warnings.warn( - 'Logging to Mosaic Platform. Ignoring provided stdout and stderr args. Set env var MOSAICML_LOG_DIR=' - ' to use provided stdout and stderr args.') + 'Logging to Mosaic Platform. Ignoring provided stdout and stderr args. Set MOSAICML_LOG_DIR="/" to use provided stdout and stderr args.' + ) args.stdout = log_file_format args.stderr = None