From d14c46ef482fa2fd60b920a37e55b8db0e384f5d Mon Sep 17 00:00:00 2001 From: Domenic Barbuzzi Date: Sat, 22 Jun 2024 07:32:15 -0400 Subject: [PATCH] Force-disable upstream tracking (#321) This PR force-disables upstream tracking by forcing `VLLM_DO_NOT_TRACK` and `VLLM_NO_USAGE_STATS` to be `True` (disable data collection) rather than inspecting the environment variable. An alternative approach could be to update the definition of `is_usage_stats_enabled` (in [`vllm/usage/usage_lib.py:29`](https://github.com/neuralmagic/nm-vllm/blob/main/vllm/usage/usage_lib.py#L29)) to always return `False` and set the `global _USAGE_STATS_ENABLED` to be `False`. --- vllm/envs.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/vllm/envs.py b/vllm/envs.py index f03b69f4b8866..1e772cea44953 100644 --- a/vllm/envs.py +++ b/vllm/envs.py @@ -18,8 +18,8 @@ S3_ENDPOINT_URL: Optional[str] = None VLLM_CONFIG_ROOT: str = "" VLLM_USAGE_STATS_SERVER: str = "https://stats.vllm.ai" - VLLM_NO_USAGE_STATS: bool = False - VLLM_DO_NOT_TRACK: bool = False + VLLM_NO_USAGE_STATS: bool = True + VLLM_DO_NOT_TRACK: bool = True VLLM_USAGE_SOURCE: str = "" VLLM_CONFIGURE_LOGGING: int = 1 VLLM_LOGGING_LEVEL: str = "INFO" @@ -162,11 +162,11 @@ # Usage stats collection "VLLM_USAGE_STATS_SERVER": lambda: os.environ.get("VLLM_USAGE_STATS_SERVER", "https://stats.vllm.ai"), + # UPSTREAM SYNC: following changes force tracking to be disabled "VLLM_NO_USAGE_STATS": - lambda: os.environ.get("VLLM_NO_USAGE_STATS", "0") == "1", + lambda: True, "VLLM_DO_NOT_TRACK": - lambda: (os.environ.get("VLLM_DO_NOT_TRACK", None) or os.environ.get( - "DO_NOT_TRACK", None) or "0") == "1", + lambda: True, "VLLM_USAGE_SOURCE": lambda: os.environ.get("VLLM_USAGE_SOURCE", "production"),