Skip to content

Commit b515e73

Browse files
authored
update deprecated env var (#14975)
Signed-off-by: Maanu Grover <maanug@nvidia.com>
1 parent 1ee365b commit b515e73

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

scripts/performance/executors.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def slurm_executor(
6969
"""
7070
PERF_ENV_VARS = {
7171
"TORCH_NCCL_AVOID_RECORD_STREAMS": "1", # Disable caching NCCL communication buffer memory
72-
"TRANSFORMERS_OFFLINE": "1", # Enable online downloads from HuggingFace
72+
"HF_HUB_OFFLINE": "1", # Enable online downloads from HuggingFace
7373
"TOKENIZERS_PARALLELISM": "False", # Restrict warning message prints
7474
"NCCL_NVLS_ENABLE": "0", # Disable NVLink SHARP to save memory
7575
"NVTE_FLASH_ATTN": "1", # Enable Flash Attention, which is needed to enable cuDNN fused attention
@@ -104,7 +104,7 @@ def slurm_executor(
104104
PERF_ENV_VARS["NEMO_HOME"] = nemo_home
105105
mounts.extend([f"{nemo_home}:{nemo_home}"])
106106
if hf_token is not None:
107-
PERF_ENV_VARS.update({"HF_TOKEN": hf_token, "TRANSFORMERS_OFFLINE": "0"})
107+
PERF_ENV_VARS.update({"HF_TOKEN": hf_token, "HF_HUB_OFFLINE": "0"})
108108

109109
PERF_ENV_VARS |= custom_env_vars
110110
mounts.extend(custom_mounts)

scripts/performance/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def hf_tokenizer(model_name: str) -> run.Config[AutoTokenizer]:
4444
f"`AutoTokenizer` first searches for tokenizer files locally stored in {DEFAULT_NEMO_HOME}.",
4545
"(from env var `NEMO_HOME`- can be changed using '-nh/--nemo_home' CLI arg).",
4646
"If files are missing locally, `AutoTokenizer` will try downloading from HuggingFace. In this case-",
47-
"make sure env vars 'TRANSFORMERS_OFFLINE':'0' and 'HF_TOKEN':'<token_value>' are set in your sbatch script.",
47+
"make sure env vars 'HF_HUB_OFFLINE':'0' and 'HF_TOKEN':'<token_value>' are set in your sbatch script.",
4848
"Both of these will be set automatically if you provide '-hf/--hf_token' CLI arg.",
4949
]
5050
logging.warning(" ".join(log_msg))

0 commit comments

Comments
 (0)