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 <noreply@anthropic.com>
This commit is contained in:
Justin Bollinger
2026-02-18 15:34:11 -05:00
parent 546c608c33
commit 893533c200

View File

@@ -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