From aa3ee1667fccc60de98f5141ff37495178574c04 Mon Sep 17 00:00:00 2001 From: Justin Bollinger Date: Wed, 18 Feb 2026 15:34:11 -0500 Subject: [PATCH] fix: set HF_HUB_DISABLE_TELEMETRY before HuggingFace imports in main.py The env var was only set in the subprocess scripts (passgpt_generate.py, passgpt_train.py) but not in main.py, where torch/transformers are imported at module level. This ensures telemetry is disabled before any HF-related imports and is inherited by spawned subprocesses. Co-Authored-By: Claude Opus 4.6 --- hate_crack/main.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hate_crack/main.py b/hate_crack/main.py index c8e7605..f754176 100755 --- a/hate_crack/main.py +++ b/hate_crack/main.py @@ -37,6 +37,9 @@ try: except Exception: pass +# Disable HuggingFace telemetry before any HF-related imports +os.environ["HF_HUB_DISABLE_TELEMETRY"] = "1" + HAS_ML_DEPS = False try: import torch # noqa: F401