Change the ray_accel_env_var_override_on_zero warning to future_warning#55791
Merged
edoakes merged 1 commit intoray-project:masterfrom Aug 20, 2025
Merged
Change the ray_accel_env_var_override_on_zero warning to future_warning#55791edoakes merged 1 commit intoray-project:masterfrom
edoakes merged 1 commit intoray-project:masterfrom
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request correctly changes a logger.warning to a warnings.warn with FutureWarning. My feedback focuses on improving the warning by adjusting the stacklevel to point to the user's code and refining the warning message for better clarity and formality. This will make the warning more actionable for Ray users.
edoakes
approved these changes
Aug 20, 2025
ljstrnadiii
pushed a commit
to ljstrnadiii/ray
that referenced
this pull request
Aug 21, 2025
…ng (ray-project#55791) Before this pr: ``` python /ray-workspace/temp.py 2025-08-18 18:26:21,621 INFO worker.py:1943 -- Started a local Ray instance. View the dashboard at http://127.0.0.1:8265 2025-08-18 18:26:53,873 WARNING worker.py:1991 -- Tip: In future versions of Ray, Ray will no longer override accelerator visible devices env var if num_gpus=0 or num_gpus=None (default). To enable this behavior and turn off this error message, set RAY_ACCEL_ENV_VAR_OVERRIDE_ON_ZERO=0 ``` After this pr: ``` 2025-08-20 19:08:41,923 INFO worker.py:1939 -- Started a local Ray instance. View the dashboard at http://127.0.0.1:8265 /sgl-workspace/ray/python/ray/_private/worker.py:1987: FutureWarning: Tip: In future versions of Ray, Ray will no longer override accelerator visible devices env var if num_gpus=0 or num_gpus=None (default). To enable this behavior and turn off this error message, set RAY_ACCEL_ENV_VAR_OVERRIDE_ON_ZERO=0 warnings.warn( ``` ray-project#54928
ljstrnadiii
pushed a commit
to ljstrnadiii/ray
that referenced
this pull request
Aug 21, 2025
…ng (ray-project#55791) Before this pr: ``` python /ray-workspace/temp.py 2025-08-18 18:26:21,621 INFO worker.py:1943 -- Started a local Ray instance. View the dashboard at http://127.0.0.1:8265 2025-08-18 18:26:53,873 WARNING worker.py:1991 -- Tip: In future versions of Ray, Ray will no longer override accelerator visible devices env var if num_gpus=0 or num_gpus=None (default). To enable this behavior and turn off this error message, set RAY_ACCEL_ENV_VAR_OVERRIDE_ON_ZERO=0 ``` After this pr: ``` 2025-08-20 19:08:41,923 INFO worker.py:1939 -- Started a local Ray instance. View the dashboard at http://127.0.0.1:8265 /sgl-workspace/ray/python/ray/_private/worker.py:1987: FutureWarning: Tip: In future versions of Ray, Ray will no longer override accelerator visible devices env var if num_gpus=0 or num_gpus=None (default). To enable this behavior and turn off this error message, set RAY_ACCEL_ENV_VAR_OVERRIDE_ON_ZERO=0 warnings.warn( ``` ray-project#54928 Signed-off-by: ljstrnadiii <ljstrnadiii@gmail.com>
alimaazamat
pushed a commit
to alimaazamat/ray
that referenced
this pull request
Aug 21, 2025
…ng (ray-project#55791) Before this pr: ``` python /ray-workspace/temp.py 2025-08-18 18:26:21,621 INFO worker.py:1943 -- Started a local Ray instance. View the dashboard at http://127.0.0.1:8265 2025-08-18 18:26:53,873 WARNING worker.py:1991 -- Tip: In future versions of Ray, Ray will no longer override accelerator visible devices env var if num_gpus=0 or num_gpus=None (default). To enable this behavior and turn off this error message, set RAY_ACCEL_ENV_VAR_OVERRIDE_ON_ZERO=0 ``` After this pr: ``` 2025-08-20 19:08:41,923 INFO worker.py:1939 -- Started a local Ray instance. View the dashboard at http://127.0.0.1:8265 /sgl-workspace/ray/python/ray/_private/worker.py:1987: FutureWarning: Tip: In future versions of Ray, Ray will no longer override accelerator visible devices env var if num_gpus=0 or num_gpus=None (default). To enable this behavior and turn off this error message, set RAY_ACCEL_ENV_VAR_OVERRIDE_ON_ZERO=0 warnings.warn( ``` ray-project#54928
jugalshah291
pushed a commit
to jugalshah291/ray_fork
that referenced
this pull request
Sep 11, 2025
…ng (ray-project#55791) Before this pr: ``` python /ray-workspace/temp.py 2025-08-18 18:26:21,621 INFO worker.py:1943 -- Started a local Ray instance. View the dashboard at http://127.0.0.1:8265 2025-08-18 18:26:53,873 WARNING worker.py:1991 -- Tip: In future versions of Ray, Ray will no longer override accelerator visible devices env var if num_gpus=0 or num_gpus=None (default). To enable this behavior and turn off this error message, set RAY_ACCEL_ENV_VAR_OVERRIDE_ON_ZERO=0 ``` After this pr: ``` 2025-08-20 19:08:41,923 INFO worker.py:1939 -- Started a local Ray instance. View the dashboard at http://127.0.0.1:8265 /sgl-workspace/ray/python/ray/_private/worker.py:1987: FutureWarning: Tip: In future versions of Ray, Ray will no longer override accelerator visible devices env var if num_gpus=0 or num_gpus=None (default). To enable this behavior and turn off this error message, set RAY_ACCEL_ENV_VAR_OVERRIDE_ON_ZERO=0 warnings.warn( ``` ray-project#54928 Signed-off-by: jugalshah291 <shah.jugal291@gmail.com>
dstrodtman
pushed a commit
that referenced
this pull request
Oct 6, 2025
…ng (#55791) Before this pr: ``` python /ray-workspace/temp.py 2025-08-18 18:26:21,621 INFO worker.py:1943 -- Started a local Ray instance. View the dashboard at http://127.0.0.1:8265 2025-08-18 18:26:53,873 WARNING worker.py:1991 -- Tip: In future versions of Ray, Ray will no longer override accelerator visible devices env var if num_gpus=0 or num_gpus=None (default). To enable this behavior and turn off this error message, set RAY_ACCEL_ENV_VAR_OVERRIDE_ON_ZERO=0 ``` After this pr: ``` 2025-08-20 19:08:41,923 INFO worker.py:1939 -- Started a local Ray instance. View the dashboard at http://127.0.0.1:8265 /sgl-workspace/ray/python/ray/_private/worker.py:1987: FutureWarning: Tip: In future versions of Ray, Ray will no longer override accelerator visible devices env var if num_gpus=0 or num_gpus=None (default). To enable this behavior and turn off this error message, set RAY_ACCEL_ENV_VAR_OVERRIDE_ON_ZERO=0 warnings.warn( ``` #54928 Signed-off-by: Douglas Strodtman <douglas@anyscale.com>
landscapepainter
pushed a commit
to landscapepainter/ray
that referenced
this pull request
Nov 17, 2025
…ng (ray-project#55791) Before this pr: ``` python /ray-workspace/temp.py 2025-08-18 18:26:21,621 INFO worker.py:1943 -- Started a local Ray instance. View the dashboard at http://127.0.0.1:8265 2025-08-18 18:26:53,873 WARNING worker.py:1991 -- Tip: In future versions of Ray, Ray will no longer override accelerator visible devices env var if num_gpus=0 or num_gpus=None (default). To enable this behavior and turn off this error message, set RAY_ACCEL_ENV_VAR_OVERRIDE_ON_ZERO=0 ``` After this pr: ``` 2025-08-20 19:08:41,923 INFO worker.py:1939 -- Started a local Ray instance. View the dashboard at http://127.0.0.1:8265 /sgl-workspace/ray/python/ray/_private/worker.py:1987: FutureWarning: Tip: In future versions of Ray, Ray will no longer override accelerator visible devices env var if num_gpus=0 or num_gpus=None (default). To enable this behavior and turn off this error message, set RAY_ACCEL_ENV_VAR_OVERRIDE_ON_ZERO=0 warnings.warn( ``` ray-project#54928
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.
Why are these changes needed?
Before this pr:
After this pr:
Related issue number
This is to refine #54928
Checks
git commit -s) in this PR.scripts/format.shto lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/under thecorresponding
.rstfile.