[misc] fix: add missing __init__.py files to package directories#5209
[misc] fix: add missing __init__.py files to package directories#5209vermouth1992 merged 6 commits intoverl-project:mainfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request correctly adds missing __init__.py files to several directories, ensuring they are properly recognized as Python packages. This is a good structural improvement that enhances the project's packaging and import behavior. The changes are straightforward and correct, and I have no further comments.
| @@ -0,0 +1,14 @@ | |||
| # Copyright 2025 Bytedance Ltd. and/or its affiliates | |||
There was a problem hiding this comment.
This is contributed by Nvidia
There was a problem hiding this comment.
I see. I've updated the license to match the other files in the directory, however they also don't list Nvidia
| @@ -0,0 +1,14 @@ | |||
| # Copyright 2025 Bytedance Ltd. and/or its affiliates | |||
| # Copyright 2025 Meituan Ltd. and/or its affiliates | |||
There was a problem hiding this comment.
Is VLA contributed by Meituan?
There was a problem hiding this comment.
No, sorry, fixed this now
20d6eb1 to
69df06f
Compare
…age data (#5343) ### What does this PR do? Adds config files in `verl/experimental/` to package data in both `pyproject.toml` and `setup.py`. This ensures that config files for experimental entrypoints are included when verl is installed via pip (non-editable mode). This PR, together with #5209, is necessary to run the experimental entrypoints when verl is installed in non-edit mode. **Additional fix:** Also adds `trainer/config/*/*.yaml` pattern to `setup.py` to match what's already in `pyproject.toml`, ensuring nested trainer config files (in subdirectories like `actor/`, `critic/`, etc.) are included. This fixes an existing inconsistency between the two files. ### Checklist Before Starting - [x] Search for similar PRs: https://github.com/volcengine/verl/pulls?q=is%3Apr+package+data https://github.com/volcengine/verl/pulls?q=is%3Apr+experimental - [x] Format the PR title as `[{modules}] {type}: {description}` ✓ ### Test No tests needed - this only modifies packaging metadata. The correctness can be verified by: 1. Installing verl via `pip install .` (non-editable) 2. Confirming that files exist: `python -c "import verl.experimental.fully_async_policy.config; print(verl.experimental.fully_async_policy.config.__file__)"` 3. Running an experimental entrypoint ### API and Usage Example No API changes. This fix enables existing experimental entrypoints to work when installed via pip. ### Design & Code Changes **Changes:** - `pyproject.toml`: Add `experimental/*/config/*.yaml` pattern - `setup.py`: Add both `trainer/config/*/*.yaml` (fix existing bug) and `experimental/*/config/*.yaml` **Why both files?** Python packaging uses different files depending on the build backend, so both need to be consistent. ### Checklist Before Submitting - [x] Read the [Contribute Guide](https://github.com/volcengine/verl/blob/main/CONTRIBUTING.md). - [x] Apply [pre-commit checks](https://github.com/volcengine/verl/blob/main/CONTRIBUTING.md#code-linting-and-formatting): All checks passed ✓ - [x] Add / Update [the documentation](https://github.com/volcengine/verl/tree/main/docs) - Not needed (internal packaging fix) - [x] Add unit or end-to-end test(s) - This is packaging metadata that only affects pip-installed packages, not editable installs used in CI. - [ ] CI request - [x] Recipe submodule - Not applicable
…age data (verl-project#5343) ### What does this PR do? Adds config files in `verl/experimental/` to package data in both `pyproject.toml` and `setup.py`. This ensures that config files for experimental entrypoints are included when verl is installed via pip (non-editable mode). This PR, together with verl-project#5209, is necessary to run the experimental entrypoints when verl is installed in non-edit mode. **Additional fix:** Also adds `trainer/config/*/*.yaml` pattern to `setup.py` to match what's already in `pyproject.toml`, ensuring nested trainer config files (in subdirectories like `actor/`, `critic/`, etc.) are included. This fixes an existing inconsistency between the two files. ### Checklist Before Starting - [x] Search for similar PRs: https://github.com/volcengine/verl/pulls?q=is%3Apr+package+data https://github.com/volcengine/verl/pulls?q=is%3Apr+experimental - [x] Format the PR title as `[{modules}] {type}: {description}` ✓ ### Test No tests needed - this only modifies packaging metadata. The correctness can be verified by: 1. Installing verl via `pip install .` (non-editable) 2. Confirming that files exist: `python -c "import verl.experimental.fully_async_policy.config; print(verl.experimental.fully_async_policy.config.__file__)"` 3. Running an experimental entrypoint ### API and Usage Example No API changes. This fix enables existing experimental entrypoints to work when installed via pip. ### Design & Code Changes **Changes:** - `pyproject.toml`: Add `experimental/*/config/*.yaml` pattern - `setup.py`: Add both `trainer/config/*/*.yaml` (fix existing bug) and `experimental/*/config/*.yaml` **Why both files?** Python packaging uses different files depending on the build backend, so both need to be consistent. ### Checklist Before Submitting - [x] Read the [Contribute Guide](https://github.com/volcengine/verl/blob/main/CONTRIBUTING.md). - [x] Apply [pre-commit checks](https://github.com/volcengine/verl/blob/main/CONTRIBUTING.md#code-linting-and-formatting): All checks passed ✓ - [x] Add / Update [the documentation](https://github.com/volcengine/verl/tree/main/docs) - Not needed (internal packaging fix) - [x] Add unit or end-to-end test(s) - This is packaging metadata that only affects pip-installed packages, not editable installs used in CI. - [ ] CI request - [x] Recipe submodule - Not applicable
…age data (verl-project#5343) ### What does this PR do? Adds config files in `verl/experimental/` to package data in both `pyproject.toml` and `setup.py`. This ensures that config files for experimental entrypoints are included when verl is installed via pip (non-editable mode). This PR, together with verl-project#5209, is necessary to run the experimental entrypoints when verl is installed in non-edit mode. **Additional fix:** Also adds `trainer/config/*/*.yaml` pattern to `setup.py` to match what's already in `pyproject.toml`, ensuring nested trainer config files (in subdirectories like `actor/`, `critic/`, etc.) are included. This fixes an existing inconsistency between the two files. ### Checklist Before Starting - [x] Search for similar PRs: https://github.com/volcengine/verl/pulls?q=is%3Apr+package+data https://github.com/volcengine/verl/pulls?q=is%3Apr+experimental - [x] Format the PR title as `[{modules}] {type}: {description}` ✓ ### Test No tests needed - this only modifies packaging metadata. The correctness can be verified by: 1. Installing verl via `pip install .` (non-editable) 2. Confirming that files exist: `python -c "import verl.experimental.fully_async_policy.config; print(verl.experimental.fully_async_policy.config.__file__)"` 3. Running an experimental entrypoint ### API and Usage Example No API changes. This fix enables existing experimental entrypoints to work when installed via pip. ### Design & Code Changes **Changes:** - `pyproject.toml`: Add `experimental/*/config/*.yaml` pattern - `setup.py`: Add both `trainer/config/*/*.yaml` (fix existing bug) and `experimental/*/config/*.yaml` **Why both files?** Python packaging uses different files depending on the build backend, so both need to be consistent. ### Checklist Before Submitting - [x] Read the [Contribute Guide](https://github.com/volcengine/verl/blob/main/CONTRIBUTING.md). - [x] Apply [pre-commit checks](https://github.com/volcengine/verl/blob/main/CONTRIBUTING.md#code-linting-and-formatting): All checks passed ✓ - [x] Add / Update [the documentation](https://github.com/volcengine/verl/tree/main/docs) - Not needed (internal packaging fix) - [x] Add unit or end-to-end test(s) - This is packaging metadata that only affects pip-installed packages, not editable installs used in CI. - [ ] CI request - [x] Recipe submodule - Not applicable
…age data (verl-project#5343) ### What does this PR do? Adds config files in `verl/experimental/` to package data in both `pyproject.toml` and `setup.py`. This ensures that config files for experimental entrypoints are included when verl is installed via pip (non-editable mode). This PR, together with verl-project#5209, is necessary to run the experimental entrypoints when verl is installed in non-edit mode. **Additional fix:** Also adds `trainer/config/*/*.yaml` pattern to `setup.py` to match what's already in `pyproject.toml`, ensuring nested trainer config files (in subdirectories like `actor/`, `critic/`, etc.) are included. This fixes an existing inconsistency between the two files. ### Checklist Before Starting - [x] Search for similar PRs: https://github.com/volcengine/verl/pulls?q=is%3Apr+package+data https://github.com/volcengine/verl/pulls?q=is%3Apr+experimental - [x] Format the PR title as `[{modules}] {type}: {description}` ✓ ### Test No tests needed - this only modifies packaging metadata. The correctness can be verified by: 1. Installing verl via `pip install .` (non-editable) 2. Confirming that files exist: `python -c "import verl.experimental.fully_async_policy.config; print(verl.experimental.fully_async_policy.config.__file__)"` 3. Running an experimental entrypoint ### API and Usage Example No API changes. This fix enables existing experimental entrypoints to work when installed via pip. ### Design & Code Changes **Changes:** - `pyproject.toml`: Add `experimental/*/config/*.yaml` pattern - `setup.py`: Add both `trainer/config/*/*.yaml` (fix existing bug) and `experimental/*/config/*.yaml` **Why both files?** Python packaging uses different files depending on the build backend, so both need to be consistent. ### Checklist Before Submitting - [x] Read the [Contribute Guide](https://github.com/volcengine/verl/blob/main/CONTRIBUTING.md). - [x] Apply [pre-commit checks](https://github.com/volcengine/verl/blob/main/CONTRIBUTING.md#code-linting-and-formatting): All checks passed ✓ - [x] Add / Update [the documentation](https://github.com/volcengine/verl/tree/main/docs) - Not needed (internal packaging fix) - [x] Add unit or end-to-end test(s) - This is packaging metadata that only affects pip-installed packages, not editable installs used in CI. - [ ] CI request - [x] Recipe submodule - Not applicable
69df06f to
099d989
Compare
…age data (verl-project#5343) ### What does this PR do? Adds config files in `verl/experimental/` to package data in both `pyproject.toml` and `setup.py`. This ensures that config files for experimental entrypoints are included when verl is installed via pip (non-editable mode). This PR, together with verl-project#5209, is necessary to run the experimental entrypoints when verl is installed in non-edit mode. **Additional fix:** Also adds `trainer/config/*/*.yaml` pattern to `setup.py` to match what's already in `pyproject.toml`, ensuring nested trainer config files (in subdirectories like `actor/`, `critic/`, etc.) are included. This fixes an existing inconsistency between the two files. ### Checklist Before Starting - [x] Search for similar PRs: https://github.com/volcengine/verl/pulls?q=is%3Apr+package+data https://github.com/volcengine/verl/pulls?q=is%3Apr+experimental - [x] Format the PR title as `[{modules}] {type}: {description}` ✓ ### Test No tests needed - this only modifies packaging metadata. The correctness can be verified by: 1. Installing verl via `pip install .` (non-editable) 2. Confirming that files exist: `python -c "import verl.experimental.fully_async_policy.config; print(verl.experimental.fully_async_policy.config.__file__)"` 3. Running an experimental entrypoint ### API and Usage Example No API changes. This fix enables existing experimental entrypoints to work when installed via pip. ### Design & Code Changes **Changes:** - `pyproject.toml`: Add `experimental/*/config/*.yaml` pattern - `setup.py`: Add both `trainer/config/*/*.yaml` (fix existing bug) and `experimental/*/config/*.yaml` **Why both files?** Python packaging uses different files depending on the build backend, so both need to be consistent. ### Checklist Before Submitting - [x] Read the [Contribute Guide](https://github.com/volcengine/verl/blob/main/CONTRIBUTING.md). - [x] Apply [pre-commit checks](https://github.com/volcengine/verl/blob/main/CONTRIBUTING.md#code-linting-and-formatting): All checks passed ✓ - [x] Add / Update [the documentation](https://github.com/volcengine/verl/tree/main/docs) - Not needed (internal packaging fix) - [x] Add unit or end-to-end test(s) - This is packaging metadata that only affects pip-installed packages, not editable installs used in CI. - [ ] CI request - [x] Recipe submodule - Not applicable
…age data (verl-project#5343) ### What does this PR do? Adds config files in `verl/experimental/` to package data in both `pyproject.toml` and `setup.py`. This ensures that config files for experimental entrypoints are included when verl is installed via pip (non-editable mode). This PR, together with verl-project#5209, is necessary to run the experimental entrypoints when verl is installed in non-edit mode. **Additional fix:** Also adds `trainer/config/*/*.yaml` pattern to `setup.py` to match what's already in `pyproject.toml`, ensuring nested trainer config files (in subdirectories like `actor/`, `critic/`, etc.) are included. This fixes an existing inconsistency between the two files. ### Checklist Before Starting - [x] Search for similar PRs: https://github.com/volcengine/verl/pulls?q=is%3Apr+package+data https://github.com/volcengine/verl/pulls?q=is%3Apr+experimental - [x] Format the PR title as `[{modules}] {type}: {description}` ✓ ### Test No tests needed - this only modifies packaging metadata. The correctness can be verified by: 1. Installing verl via `pip install .` (non-editable) 2. Confirming that files exist: `python -c "import verl.experimental.fully_async_policy.config; print(verl.experimental.fully_async_policy.config.__file__)"` 3. Running an experimental entrypoint ### API and Usage Example No API changes. This fix enables existing experimental entrypoints to work when installed via pip. ### Design & Code Changes **Changes:** - `pyproject.toml`: Add `experimental/*/config/*.yaml` pattern - `setup.py`: Add both `trainer/config/*/*.yaml` (fix existing bug) and `experimental/*/config/*.yaml` **Why both files?** Python packaging uses different files depending on the build backend, so both need to be consistent. ### Checklist Before Submitting - [x] Read the [Contribute Guide](https://github.com/volcengine/verl/blob/main/CONTRIBUTING.md). - [x] Apply [pre-commit checks](https://github.com/volcengine/verl/blob/main/CONTRIBUTING.md#code-linting-and-formatting): All checks passed ✓ - [x] Add / Update [the documentation](https://github.com/volcengine/verl/tree/main/docs) - Not needed (internal packaging fix) - [x] Add unit or end-to-end test(s) - This is packaging metadata that only affects pip-installed packages, not editable installs used in CI. - [ ] CI request - [x] Recipe submodule - Not applicable
|
Is this something that is ready to be merged? we currently have a workaround in place to leverage fully_async_policy that we'd love to remove. |
099d989 to
2f6cd1b
Compare
|
@ntenenz it is ready from my side. I've added a couple more missing files too. |
|
@vermouth1992 @wuxibin89 @ArronHZG Thoughts? |
…age data (verl-project#5343) ### What does this PR do? Adds config files in `verl/experimental/` to package data in both `pyproject.toml` and `setup.py`. This ensures that config files for experimental entrypoints are included when verl is installed via pip (non-editable mode). This PR, together with verl-project#5209, is necessary to run the experimental entrypoints when verl is installed in non-edit mode. **Additional fix:** Also adds `trainer/config/*/*.yaml` pattern to `setup.py` to match what's already in `pyproject.toml`, ensuring nested trainer config files (in subdirectories like `actor/`, `critic/`, etc.) are included. This fixes an existing inconsistency between the two files. ### Checklist Before Starting - [x] Search for similar PRs: https://github.com/volcengine/verl/pulls?q=is%3Apr+package+data https://github.com/volcengine/verl/pulls?q=is%3Apr+experimental - [x] Format the PR title as `[{modules}] {type}: {description}` ✓ ### Test No tests needed - this only modifies packaging metadata. The correctness can be verified by: 1. Installing verl via `pip install .` (non-editable) 2. Confirming that files exist: `python -c "import verl.experimental.fully_async_policy.config; print(verl.experimental.fully_async_policy.config.__file__)"` 3. Running an experimental entrypoint ### API and Usage Example No API changes. This fix enables existing experimental entrypoints to work when installed via pip. ### Design & Code Changes **Changes:** - `pyproject.toml`: Add `experimental/*/config/*.yaml` pattern - `setup.py`: Add both `trainer/config/*/*.yaml` (fix existing bug) and `experimental/*/config/*.yaml` **Why both files?** Python packaging uses different files depending on the build backend, so both need to be consistent. ### Checklist Before Submitting - [x] Read the [Contribute Guide](https://github.com/volcengine/verl/blob/main/CONTRIBUTING.md). - [x] Apply [pre-commit checks](https://github.com/volcengine/verl/blob/main/CONTRIBUTING.md#code-linting-and-formatting): All checks passed ✓ - [x] Add / Update [the documentation](https://github.com/volcengine/verl/tree/main/docs) - Not needed (internal packaging fix) - [x] Add unit or end-to-end test(s) - This is packaging metadata that only affects pip-installed packages, not editable installs used in CI. - [ ] CI request - [x] Recipe submodule - Not applicable
|
Is there anything else you'd like to see here before this can be merged? On the other hand, if you'd like things to remain as is, could you please communicate such? |
|
This PR also help fixed the import error in verl-omni when upgrading verl. When @wuxibin89 PTAL, thanks. |
|
Could you merge main as there is significant changes to the folder structure |
It'd be convenient if we support "merge main branch" in git page :) |
2f6cd1b to
8043088
Compare
I mean folders like vla have been moved to verl-vla. |
|
@vermouth1992 I've removed the extra files and added a couple newly missing ones |
Thank you for fixing! |
…ckaging bug Replace the post-install curl-and-touch workaround with a cleaner fix: install verl in editable mode from a clone pinned at the same commit (a512e90). An editable install exposes the source tree directly, so the verl/experimental/reward_loop/router/ directory is picked up as a PEP 420 implicit namespace package and the FlowGRPO import path resolves without any per-venv patching. The previous Known-issue section is no longer needed and is removed; a short Notes bullet records why the editable install is required and points at verl-project/verl#5209 so the install can be flipped back to a wheel-style "uv pip install git+..." once the upstream fix lands.
Bump the pinned verl SHA from a512e90 to a4351480 (the merge commit of verl-project/verl#5209) in docs/start/install.md and the three CI workflows that pin verl explicitly. The previous pin shipped a wheel without verl/experimental/reward_loop/router/ because the upstream directory had no __init__.py and setuptools' default package discovery silently dropped it, breaking the FlowGRPO trainer at runtime with "ModuleNotFoundError: No module named 'verl.experimental.reward_loop.router'". The merge commit adds the missing __init__.py, so the wheel now includes the directory and the FlowGRPO trainer imports cleanly.
…ckaging bug The pinned verl commit (a512e90) ships a wheel that is missing verl/experimental/reward_loop/router/ because the upstream directory had no __init__.py at that commit and setuptools' default package discovery silently drops it. This breaks the FlowGRPO trainer at runtime with "ModuleNotFoundError: No module named 'verl.experimental.reward_loop.router'". Switch the verl install in docs/start/install.md from a wheel install (uv pip install git+…@<commit>) to a clone-and-editable install pinned at the same commit. An editable install exposes the source tree on sys.path, so router/ is picked up as a PEP 420 implicit namespace package and the import works without any per-venv patching. CI workflows are intentionally not touched because they don't exercise the broken codepath. The pin will be bumped past verl-project/verl#5209 once verl-omni is also adapted to the breaking LLMServerClient refactor in verl-project/verl#6129 (tracked separately).
What does this PR do?
Adds missing
__init__.pyfiles to 11 package directories that contained Python modules but were not properly configured as packages. This ensures these directories are recognized as importable Python packages.Affected directories:
experimental/(fully_async_policy, one_step_off_policy, vla/*, reward_loop/router, transfer_queue)tools/utils/mcp_clients/utils/sglang/workers/rollout/trtllm_rollout/All files include proper Apache 2.0 license headers consistent with the project.
Checklist Before Starting
[{modules}] {type}: {description}Test
Confirmed that affected modules can be imported after the change.
No functional changes - only adds empty files with license headers. Existing tests should continue to pass.
Checklist Before Submitting