Skip to content

Commit

Permalink
[Misc] Add report prefix TORCH and NCCL
Browse files Browse the repository at this point in the history
  • Loading branch information
ycool committed Nov 7, 2024
1 parent a7a6611 commit 5a9fc6a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions collect_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit 5a9fc6a

Please sign in to comment.