Unverified Commit 07f95503 authored by w4ffl35's avatar w4ffl35 Committed by GitHub
Browse files

Disable telemetry when DISABLE_TELEMETRY is set (#1686)

fixed #1685 - disables telemetry when DISABLE_TELEMETRY and HF_HUB_OFFLINE is set
parent e01d6cf2
...@@ -84,7 +84,7 @@ def send_telemetry(data: Dict, name: str): ...@@ -84,7 +84,7 @@ def send_telemetry(data: Dict, name: str):
name: a unique name to differentiate the telemetry logs, e.g. "diffusers_examples" or "diffusers_notebooks" name: a unique name to differentiate the telemetry logs, e.g. "diffusers_examples" or "diffusers_notebooks"
""" """
if DISABLE_TELEMETRY or HF_HUB_OFFLINE: if DISABLE_TELEMETRY or HF_HUB_OFFLINE:
pass return
headers = {"user-agent": http_user_agent(data)} headers = {"user-agent": http_user_agent(data)}
endpoint = HUGGINGFACE_CO_TELEMETRY + name endpoint = HUGGINGFACE_CO_TELEMETRY + name
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment