Skip to content

Commit f24ea83

Browse files
committed
env var cleanu
1 parent ce0897c commit f24ea83

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/tests_pytorch/conftest.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,15 @@ def restore_env_variables():
9595
"TF_GRPC_DEFAULT_OPTIONS",
9696
"XLA_FLAGS",
9797
"TORCHINDUCTOR_CACHE_DIR", # leaked by torch.compile
98+
# Memory leak test related
99+
"PYTORCH_CUDA_ALLOC_CONF", # PyTorch memory allocator config
100+
"CUDA_VISIBLE_DEVICES", # GPU visibility
101+
"PYTORCH_NO_CUDA_MEMORY_CACHING", # Disable CUDA memory caching
102+
# TensorFlow and TPU related
103+
"ENABLE_RUNTIME_UPTIME_TELEMETRY", # TensorFlow telemetry
104+
"TF2_BEHAVIOR", # TensorFlow 2.x behavior flag
105+
"TPU_ML_PLATFORM", # TPU platform configuration
106+
"TPU_ML_PLATFORM_VERSION", # TPU platform version
98107
}
99108
leaked_vars.difference_update(allowlist)
100109
assert not leaked_vars, f"test is leaking environment variable(s): {set(leaked_vars)}"

0 commit comments

Comments
 (0)