mirror of
https://github.com/trustedsec/hate_crack.git
synced 2026-03-12 21:23:05 -07:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user