-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[ci] feat: Add CI for checking irregular device api usage #2089
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
vermouth1992
merged 5 commits into
volcengine:main
from
FightingZhen:ci_cuda_device_check
Jun 19, 2025
Merged
[ci] feat: Add CI for checking irregular device api usage #2089
vermouth1992
merged 5 commits into
volcengine:main
from
FightingZhen:ci_cuda_device_check
Jun 19, 2025
Conversation
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
be16099 to
62f8bde
Compare
vermouth1992
approved these changes
Jun 19, 2025
yellowbee686
pushed a commit
to yellowbee686/verl
that referenced
this pull request
Jun 23, 2025
…#2089) ### Checklist Before Starting - [x] Searched for similar PR(s). - [x] Checked PR Title format - In format of: [modules] type: Title - modules are in `fsdp, megatron, sglang, vllm, rollout, trainer, ci, training_utils, recipe, hardware, deployment, ray, worker, single_controller, misc, perf, model, algo, env, tool, ckpt, doc, data` - type is in `feat, fix, refactor, chore, test` - can involve multiple modules, seperated by `,` or space, like `[megatron, fsdp, doc] feat: xxx` ### What does this PR do? Add CI for checking irregular device api usage, suggest using api in `verl/utils/device.py` to get device name or object. Besides, this CI test case is friendly for non-linux system (e.g. windows), which is easier to debug and find out the problem. ### Test Not related. ### High-Level Design Not related. ### Specific Changes Add a new CI test case for checking irregular device api usage, suggest using api in `verl/utils/device.py`. ### API Not related. ### Usage Example ```shell python tests\special_sanity\check_device_api_usage.py --directory ./recipe` [CHECK] File D:\workspace\verl\recipe\char_count\create_dataset.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\char_count\reward_function.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\dapo\dapo_ray_trainer.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\dapo\main_dapo.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\prime\main_prime.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\prime\prime_core_algos.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\prime\prime_dp_rm.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\prime\prime_fsdp_workers.py is detected for device api usage check, check result: success. [SKIP] File D:\workspace\verl\recipe\prime\prime_ray_trainer.py is in device api usage check whitelist, checking is skipped. [CHECK] File D:\workspace\verl\recipe\prime\__init__.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\r1\data_process.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\r1\main_eval.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\r1\reward_score.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\r1\__init__.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\r1\tasks\gpqa.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\r1\tasks\livecodebench.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\r1\tasks\math.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\r1\tasks\__init__.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\retool\retool_multi_turn_sft_preprocess.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\spin\core_algos.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\spin\dp_actor.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\spin\fsdp_workers.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\spin\main_spin.py is detected for device api usage check, check result: success. [SKIP] File D:\workspace\verl\recipe\spin\spin_trainer.py is in device api usage check whitelist, checking is skipped. [CHECK] File D:\workspace\verl\recipe\sppo\dp_actor.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\sppo\main_sppo.py is detected for device api usage check, check result: success. [SKIP] File D:\workspace\verl\recipe\sppo\sppo_ray_trainer.py is in device api usage check whitelist, checking is skipped. [CHECK] File D:\workspace\verl\recipe\sppo\sppo_worker.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\sppo\__init__.py is detected for device api usage check, check result: success. ``` ### Checklist Before Submitting - [x] Read the [Contribute Guide](https://github.com/volcengine/verl?tab=readme-ov-file#contribution-guide). - [x] Apply [pre-commit checks](https://github.com/volcengine/verl?tab=readme-ov-file#code-linting-and-formatting). - [x] Add `[BREAKING]` to the PR title `description` if it breaks any API. - [x] Update the documentation about your changes in the [docs](https://github.com/volcengine/verl/tree/main/docs). - [x] New CI unit test(s) are added to cover the code path. - [x] Rely on existing unit tests on CI that covers the code path.
Tyizhanshen
pushed a commit
to HyperdriveHustle/verl
that referenced
this pull request
Jul 1, 2025
…#2089) ### Checklist Before Starting - [x] Searched for similar PR(s). - [x] Checked PR Title format - In format of: [modules] type: Title - modules are in `fsdp, megatron, sglang, vllm, rollout, trainer, ci, training_utils, recipe, hardware, deployment, ray, worker, single_controller, misc, perf, model, algo, env, tool, ckpt, doc, data` - type is in `feat, fix, refactor, chore, test` - can involve multiple modules, seperated by `,` or space, like `[megatron, fsdp, doc] feat: xxx` ### What does this PR do? Add CI for checking irregular device api usage, suggest using api in `verl/utils/device.py` to get device name or object. Besides, this CI test case is friendly for non-linux system (e.g. windows), which is easier to debug and find out the problem. ### Test Not related. ### High-Level Design Not related. ### Specific Changes Add a new CI test case for checking irregular device api usage, suggest using api in `verl/utils/device.py`. ### API Not related. ### Usage Example ```shell python tests\special_sanity\check_device_api_usage.py --directory ./recipe` [CHECK] File D:\workspace\verl\recipe\char_count\create_dataset.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\char_count\reward_function.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\dapo\dapo_ray_trainer.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\dapo\main_dapo.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\prime\main_prime.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\prime\prime_core_algos.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\prime\prime_dp_rm.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\prime\prime_fsdp_workers.py is detected for device api usage check, check result: success. [SKIP] File D:\workspace\verl\recipe\prime\prime_ray_trainer.py is in device api usage check whitelist, checking is skipped. [CHECK] File D:\workspace\verl\recipe\prime\__init__.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\r1\data_process.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\r1\main_eval.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\r1\reward_score.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\r1\__init__.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\r1\tasks\gpqa.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\r1\tasks\livecodebench.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\r1\tasks\math.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\r1\tasks\__init__.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\retool\retool_multi_turn_sft_preprocess.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\spin\core_algos.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\spin\dp_actor.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\spin\fsdp_workers.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\spin\main_spin.py is detected for device api usage check, check result: success. [SKIP] File D:\workspace\verl\recipe\spin\spin_trainer.py is in device api usage check whitelist, checking is skipped. [CHECK] File D:\workspace\verl\recipe\sppo\dp_actor.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\sppo\main_sppo.py is detected for device api usage check, check result: success. [SKIP] File D:\workspace\verl\recipe\sppo\sppo_ray_trainer.py is in device api usage check whitelist, checking is skipped. [CHECK] File D:\workspace\verl\recipe\sppo\sppo_worker.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\sppo\__init__.py is detected for device api usage check, check result: success. ``` ### Checklist Before Submitting - [x] Read the [Contribute Guide](https://github.com/volcengine/verl?tab=readme-ov-file#contribution-guide). - [x] Apply [pre-commit checks](https://github.com/volcengine/verl?tab=readme-ov-file#code-linting-and-formatting). - [x] Add `[BREAKING]` to the PR title `description` if it breaks any API. - [x] Update the documentation about your changes in the [docs](https://github.com/volcengine/verl/tree/main/docs). - [x] New CI unit test(s) are added to cover the code path. - [x] Rely on existing unit tests on CI that covers the code path.
whatadayG
pushed a commit
to whatadayG/verl
that referenced
this pull request
Sep 5, 2025
…#2089) ### Checklist Before Starting - [x] Searched for similar PR(s). - [x] Checked PR Title format - In format of: [modules] type: Title - modules are in `fsdp, megatron, sglang, vllm, rollout, trainer, ci, training_utils, recipe, hardware, deployment, ray, worker, single_controller, misc, perf, model, algo, env, tool, ckpt, doc, data` - type is in `feat, fix, refactor, chore, test` - can involve multiple modules, seperated by `,` or space, like `[megatron, fsdp, doc] feat: xxx` ### What does this PR do? Add CI for checking irregular device api usage, suggest using api in `verl/utils/device.py` to get device name or object. Besides, this CI test case is friendly for non-linux system (e.g. windows), which is easier to debug and find out the problem. ### Test Not related. ### High-Level Design Not related. ### Specific Changes Add a new CI test case for checking irregular device api usage, suggest using api in `verl/utils/device.py`. ### API Not related. ### Usage Example ```shell python tests\special_sanity\check_device_api_usage.py --directory ./recipe` [CHECK] File D:\workspace\verl\recipe\char_count\create_dataset.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\char_count\reward_function.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\dapo\dapo_ray_trainer.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\dapo\main_dapo.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\prime\main_prime.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\prime\prime_core_algos.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\prime\prime_dp_rm.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\prime\prime_fsdp_workers.py is detected for device api usage check, check result: success. [SKIP] File D:\workspace\verl\recipe\prime\prime_ray_trainer.py is in device api usage check whitelist, checking is skipped. [CHECK] File D:\workspace\verl\recipe\prime\__init__.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\r1\data_process.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\r1\main_eval.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\r1\reward_score.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\r1\__init__.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\r1\tasks\gpqa.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\r1\tasks\livecodebench.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\r1\tasks\math.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\r1\tasks\__init__.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\retool\retool_multi_turn_sft_preprocess.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\spin\core_algos.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\spin\dp_actor.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\spin\fsdp_workers.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\spin\main_spin.py is detected for device api usage check, check result: success. [SKIP] File D:\workspace\verl\recipe\spin\spin_trainer.py is in device api usage check whitelist, checking is skipped. [CHECK] File D:\workspace\verl\recipe\sppo\dp_actor.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\sppo\main_sppo.py is detected for device api usage check, check result: success. [SKIP] File D:\workspace\verl\recipe\sppo\sppo_ray_trainer.py is in device api usage check whitelist, checking is skipped. [CHECK] File D:\workspace\verl\recipe\sppo\sppo_worker.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\sppo\__init__.py is detected for device api usage check, check result: success. ``` ### Checklist Before Submitting - [x] Read the [Contribute Guide](https://github.com/volcengine/verl?tab=readme-ov-file#contribution-guide). - [x] Apply [pre-commit checks](https://github.com/volcengine/verl?tab=readme-ov-file#code-linting-and-formatting). - [x] Add `[BREAKING]` to the PR title `description` if it breaks any API. - [x] Update the documentation about your changes in the [docs](https://github.com/volcengine/verl/tree/main/docs). - [x] New CI unit test(s) are added to cover the code path. - [x] Rely on existing unit tests on CI that covers the code path.
chenjiaoAngel
added a commit
to chenjiaoAngel/verl
that referenced
this pull request
Nov 14, 2025
…#2089) ### Checklist Before Starting - [x] Searched for similar PR(s). - [x] Checked PR Title format - In format of: [modules] type: Title - modules are in `fsdp, megatron, sglang, vllm, rollout, trainer, ci, training_utils, recipe, hardware, deployment, ray, worker, single_controller, misc, perf, model, algo, env, tool, ckpt, doc, data` - type is in `feat, fix, refactor, chore, test` - can involve multiple modules, seperated by `,` or space, like `[megatron, fsdp, doc] feat: xxx` ### What does this PR do? Add CI for checking irregular device api usage, suggest using api in `verl/utils/device.py` to get device name or object. Besides, this CI test case is friendly for non-linux system (e.g. windows), which is easier to debug and find out the problem. ### Test Not related. ### High-Level Design Not related. ### Specific Changes Add a new CI test case for checking irregular device api usage, suggest using api in `verl/utils/device.py`. ### API Not related. ### Usage Example ```shell python tests\special_sanity\check_device_api_usage.py --directory ./recipe` [CHECK] File D:\workspace\verl\recipe\char_count\create_dataset.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\char_count\reward_function.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\dapo\dapo_ray_trainer.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\dapo\main_dapo.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\prime\main_prime.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\prime\prime_core_algos.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\prime\prime_dp_rm.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\prime\prime_fsdp_workers.py is detected for device api usage check, check result: success. [SKIP] File D:\workspace\verl\recipe\prime\prime_ray_trainer.py is in device api usage check whitelist, checking is skipped. [CHECK] File D:\workspace\verl\recipe\prime\__init__.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\r1\data_process.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\r1\main_eval.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\r1\reward_score.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\r1\__init__.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\r1\tasks\gpqa.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\r1\tasks\livecodebench.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\r1\tasks\math.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\r1\tasks\__init__.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\retool\retool_multi_turn_sft_preprocess.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\spin\core_algos.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\spin\dp_actor.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\spin\fsdp_workers.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\spin\main_spin.py is detected for device api usage check, check result: success. [SKIP] File D:\workspace\verl\recipe\spin\spin_trainer.py is in device api usage check whitelist, checking is skipped. [CHECK] File D:\workspace\verl\recipe\sppo\dp_actor.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\sppo\main_sppo.py is detected for device api usage check, check result: success. [SKIP] File D:\workspace\verl\recipe\sppo\sppo_ray_trainer.py is in device api usage check whitelist, checking is skipped. [CHECK] File D:\workspace\verl\recipe\sppo\sppo_worker.py is detected for device api usage check, check result: success. [CHECK] File D:\workspace\verl\recipe\sppo\__init__.py is detected for device api usage check, check result: success. ``` ### Checklist Before Submitting - [x] Read the [Contribute Guide](https://github.com/volcengine/verl?tab=readme-ov-file#contribution-guide). - [x] Apply [pre-commit checks](https://github.com/volcengine/verl?tab=readme-ov-file#code-linting-and-formatting). - [x] Add `[BREAKING]` to the PR title `description` if it breaks any API. - [x] Update the documentation about your changes in the [docs](https://github.com/volcengine/verl/tree/main/docs). - [x] New CI unit test(s) are added to cover the code path. - [x] Rely on existing unit tests on CI that covers the code path.
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.
Checklist Before Starting
fsdp, megatron, sglang, vllm, rollout, trainer, ci, training_utils, recipe, hardware, deployment, ray, worker, single_controller, misc, perf, model, algo, env, tool, ckpt, doc, datafeat, fix, refactor, chore, test,or space, like[megatron, fsdp, doc] feat: xxxWhat does this PR do?
Add CI for checking irregular device api usage, suggest using api in
verl/utils/device.pyto get device name or object.Besides, this CI test case is friendly for non-linux system (e.g. windows), which is easier to debug and find out the problem.
Test
Not related.
High-Level Design
Not related.
Specific Changes
Add a new CI test case for checking irregular device api usage, suggest using api in
verl/utils/device.py.API
Not related.
Usage Example
Checklist Before Submitting
[BREAKING]to the PR titledescriptionif it breaks any API.