vllm.usage.usage_lib
_USAGE_ENV_VARS_TO_COLLECT
module-attribute
¶
_USAGE_ENV_VARS_TO_COLLECT = [
"VLLM_USE_MODELSCOPE",
"VLLM_USE_TRITON_FLASH_ATTN",
"VLLM_ATTENTION_BACKEND",
"VLLM_USE_FLASHINFER_SAMPLER",
"VLLM_PP_LAYER_PARTITION",
"VLLM_USE_TRITON_AWQ",
"VLLM_USE_V1",
"VLLM_ENABLE_V1_MULTIPROCESSING",
]
_USAGE_STATS_DO_NOT_TRACK_PATH
module-attribute
¶
_USAGE_STATS_DO_NOT_TRACK_PATH = join(
_config_home, "do_not_track"
)
_USAGE_STATS_JSON_PATH
module-attribute
¶
_USAGE_STATS_JSON_PATH = join(
_config_home, "usage_stats.json"
)
UsageContext
¶
Source code in vllm/usage/usage_lib.py
OPENAI_BATCH_RUNNER
class-attribute
instance-attribute
¶
UsageMessage
¶
Collect platform information and send it to the usage stats server.
Source code in vllm/usage/usage_lib.py
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 |
|
__init__
¶
Source code in vllm/usage/usage_lib.py
_report_continuous_usage
¶
Report usage every 10 minutes.
This helps us to collect more data points for uptime of vLLM usages. This function can also help send over performance metrics over time.
Source code in vllm/usage/usage_lib.py
_report_usage_once
¶
_report_usage_once(
model_architecture: str,
usage_context: UsageContext,
extra_kvs: dict[str, Any],
) -> None
Source code in vllm/usage/usage_lib.py
_report_usage_worker
¶
_report_usage_worker(
model_architecture: str,
usage_context: UsageContext,
extra_kvs: dict[str, Any],
) -> None
_send_to_server
¶
Source code in vllm/usage/usage_lib.py
_write_to_file
¶
Source code in vllm/usage/usage_lib.py
_detect_cloud_provider
¶
_detect_cloud_provider() -> str
Source code in vllm/usage/usage_lib.py
is_usage_stats_enabled
¶
Determine whether or not we can send usage stats to the server. The logic is as follows: - By default, it should be enabled. - Three environment variables can disable it: - VLLM_DO_NOT_TRACK=1 - DO_NOT_TRACK=1 - VLLM_NO_USAGE_STATS=1 - A file in the home directory can disable it if it exists: - $HOME/.config/vllm/do_not_track