diff --git a/config.py b/config.py index 88acdb6a..ab7cb876 100644 --- a/config.py +++ b/config.py @@ -341,7 +341,7 @@ def _check_args(name): if PYTORCH_MAJOR_VERSION == 1: config.LOCAL_RANK = args.local_rank else: - config.LOCAL_RANK = int(os.environ['LOCAL_RANK']) + config.LOCAL_RANK = int(os.environ.get('LOCAL_RANK', 0)) # output folder config.OUTPUT = os.path.join(config.OUTPUT, config.MODEL.NAME, config.TAG)