From 5a9fc6a6ecf553c1edf4b5ed3d5c7e65869b74ad Mon Sep 17 00:00:00 2001 From: Jiangtao Hu Date: Thu, 7 Nov 2024 13:34:45 -0800 Subject: [PATCH] [Misc] Add report prefix TORCH and NCCL --- collect_env.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/collect_env.py b/collect_env.py index 6561bddd570fe..04d24297b158f 100644 --- a/collect_env.py +++ b/collect_env.py @@ -518,12 +518,15 @@ def is_xnnpack_available(): def get_env_vars(): env_vars = '' secret_terms=('secret', 'token', 'api', 'access', 'password') + report_prefix = ("TORCH", "NCCL") for k, v in os.environ.items(): if any(term in k.lower() for term in secret_terms): - v = '***' - if k not in environment_variables: - v = '***' - env_vars = env_vars + "{}={}".format(k, v) + "\n" + continue + if k in environment_variables: + env_vars = env_vars + "{}={}".format(k, v) + "\n" + if k.startswith(report_prefix): + env_vars = env_vars + "{}={}".format(k, v) + "\n" + return env_vars def get_env_info():