[Misc] Remove deprecated profiler environment variables#33536
Merged
DarkLight1337 merged 1 commit intovllm-project:mainfrom Feb 3, 2026
Merged
Conversation
Remove deprecated environment variables for profiler configuration that were scheduled for removal in v0.15.0. Users should now use the `--profiler-config.*` command line arguments or `ProfilerConfig(...)` directly. Removed environment variables: - VLLM_TORCH_CUDA_PROFILE - VLLM_TORCH_PROFILER_DIR - VLLM_TORCH_PROFILER_RECORD_SHAPES - VLLM_TORCH_PROFILER_WITH_PROFILE_MEMORY - VLLM_TORCH_PROFILER_DISABLE_ASYNC_LLM - VLLM_TORCH_PROFILER_WITH_STACK - VLLM_TORCH_PROFILER_WITH_FLOPS - VLLM_TORCH_PROFILER_USE_GZIP - VLLM_TORCH_PROFILER_DUMP_CUDA_TIME_TOTAL - VLLM_PROFILER_DELAY_ITERS - VLLM_PROFILER_MAX_ITERS Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: carlory <baofa.fan@daocloud.io>
Contributor
There was a problem hiding this comment.
Code Review
This pull request correctly removes deprecated environment variables for profiler configuration. The changes in vllm/config/profiler.py and vllm/envs.py are straightforward and effectively clean up obsolete code, which improves maintainability. The implementation aligns with the stated purpose in the description. The changes look good.
yewentao256
approved these changes
Feb 2, 2026
Member
yewentao256
left a comment
There was a problem hiding this comment.
LGTM, thanks for the work!
hmellor
reviewed
Feb 3, 2026
Comment on lines
-105
to
-137
| def _get_from_env_if_set(self, field_name: str, env_var_name: str) -> None: | ||
| """Get field from env var if set, with deprecation warning.""" | ||
|
|
||
| if envs.is_set(env_var_name): | ||
| value = getattr(envs, env_var_name) | ||
| logger.warning_once( | ||
| "Using %s environment variable is deprecated and will be removed in " | ||
| "v0.15.0 or v1.0.0, whichever is soonest. Please use " | ||
| "--profiler-config.%s command line argument or " | ||
| "ProfilerConfig(%s=...) config field instead.", | ||
| env_var_name, | ||
| field_name, | ||
| field_name, | ||
| ) | ||
| return value | ||
| return None | ||
|
|
||
| def _set_from_env_if_set( | ||
| self, | ||
| field_name: str, | ||
| env_var_name: str, | ||
| to_bool: bool = True, | ||
| to_int: bool = False, | ||
| ) -> None: | ||
| """Set field from env var if set, with deprecation warning.""" | ||
| value = self._get_from_env_if_set(field_name, env_var_name) | ||
| if value is not None: | ||
| if to_bool: | ||
| value = value == "1" | ||
| if to_int: | ||
| value = int(value) | ||
| setattr(self, field_name, value) | ||
|
|
Member
There was a problem hiding this comment.
We should probably add general versions of these methods back in utils.py so that we don't have to keep reinventing them when we do future deprecations
PiratePai
pushed a commit
to PiratePai/epd_shm
that referenced
this pull request
Feb 3, 2026
…#33536) Signed-off-by: carlory <baofa.fan@daocloud.io> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: Pai <416932041@qq.com>
PiratePai
pushed a commit
to PiratePai/epd_shm
that referenced
this pull request
Feb 3, 2026
…#33536) Signed-off-by: carlory <baofa.fan@daocloud.io> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: Pai <416932041@qq.com>
gameofdimension
pushed a commit
to gameofdimension/vllm
that referenced
this pull request
Feb 5, 2026
…#33536) Signed-off-by: carlory <baofa.fan@daocloud.io> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: felix01.yu <felix01.yu@vipshop.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Remove deprecated environment variables for profiler configuration that were scheduled for removal in v0.15.0. The deprecation warning stated:
Since v0.15.0 has been released, it's time to clean up these deprecated environment variables.
Changes
vllm/config/profiler.py_get_from_env_if_set()method_set_from_env_if_set()method_validate_profiler_config()validator by removing all environment variable reading logicimport vllm.envs as envsvllm/envs.pyRemoved 11 deprecated environment variables:
VLLM_TORCH_CUDA_PROFILEVLLM_TORCH_PROFILER_DIRVLLM_TORCH_PROFILER_RECORD_SHAPESVLLM_TORCH_PROFILER_WITH_PROFILE_MEMORYVLLM_TORCH_PROFILER_DISABLE_ASYNC_LLMVLLM_TORCH_PROFILER_WITH_STACKVLLM_TORCH_PROFILER_WITH_FLOPSVLLM_TORCH_PROFILER_USE_GZIPVLLM_TORCH_PROFILER_DUMP_CUDA_TIME_TOTALVLLM_PROFILER_DELAY_ITERSVLLM_PROFILER_MAX_ITERSMigration
Users should migrate to using:
--profiler-config.torch_profiler_dir=/path/to/dirProfilerConfig(torch_profiler_dir="/path/to/dir")Test Plan
Test Result
All pre-commit hooks passed successfully.