Skip to content

[misc] fix: add missing __init__.py files to package directories#5209

Merged
vermouth1992 merged 6 commits intoverl-project:mainfrom
guillemgt:add-missing-init-files
Apr 30, 2026
Merged

[misc] fix: add missing __init__.py files to package directories#5209
vermouth1992 merged 6 commits intoverl-project:mainfrom
guillemgt:add-missing-init-files

Conversation

@guillemgt
Copy link
Copy Markdown
Contributor

What does this PR do?

Adds missing __init__.py files 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:

  • Several directories in 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

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

  • Read the Contribute Guide
  • Applied pre-commit checks (all relevant checks passed)
  • Documentation not needed (no user-facing changes)
  • No tests needed (structural fix only, no functional changes)

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is contributed by Nvidia

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. I've updated the license to match the other files in the directory, however they also don't list Nvidia

Comment thread verl/experimental/vla/__init__.py Outdated
@@ -0,0 +1,14 @@
# Copyright 2025 Bytedance Ltd. and/or its affiliates
# Copyright 2025 Meituan Ltd. and/or its affiliates
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is VLA contributed by Meituan?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, sorry, fixed this now

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Feb 6, 2026

CLA assistant check
All committers have signed the CLA.

@guillemgt guillemgt force-pushed the add-missing-init-files branch from 20d6eb1 to 69df06f Compare February 6, 2026 11:52
vermouth1992 pushed a commit that referenced this pull request Feb 18, 2026
…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
Superjomn pushed a commit to Superjomn/verl that referenced this pull request Mar 2, 2026
…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
SchumiDing pushed a commit to SchumiDing/verl that referenced this pull request Mar 2, 2026
…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
guillemgt added a commit to guillemgt/verl that referenced this pull request Mar 9, 2026
…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
@guillemgt guillemgt force-pushed the add-missing-init-files branch from 69df06f to 099d989 Compare March 9, 2026 09:18
guillemgt added a commit to guillemgt/verl that referenced this pull request Mar 9, 2026
…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
sijyang pushed a commit to sijyang/verl that referenced this pull request Apr 1, 2026
…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
@ntenenz
Copy link
Copy Markdown

ntenenz commented Apr 10, 2026

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.

@vermouth1992 @guillemgt

@guillemgt guillemgt force-pushed the add-missing-init-files branch from 099d989 to 2f6cd1b Compare April 10, 2026 13:59
@guillemgt
Copy link
Copy Markdown
Contributor Author

@ntenenz it is ready from my side. I've added a couple more missing files too.

@ntenenz
Copy link
Copy Markdown

ntenenz commented Apr 16, 2026

@vermouth1992 @wuxibin89 @ArronHZG Thoughts?

DaizeDong pushed a commit to DaizeDong/verl that referenced this pull request Apr 19, 2026
…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
@ntenenz
Copy link
Copy Markdown

ntenenz commented Apr 20, 2026

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?

@vermouth1992 @wuxibin89 @ArronHZG

@SamitHuang
Copy link
Copy Markdown
Collaborator

SamitHuang commented Apr 30, 2026

This PR also help fixed the import error in verl-omni when upgrading verl. When RewardLoopManager initializes a RewardModelManager:
File ".../verl/experimental/reward_loop/reward_model.py", line 96, in _initialize_router
from .router.naive_router import launch_router_process
ModuleNotFoundError: No module named 'verl.experimental.reward_loop.router'
Adding the empty __init__.py from this PR is sufficient to make the import succeed.

@wuxibin89 PTAL, thanks.

@vermouth1992
Copy link
Copy Markdown
Collaborator

Could you merge main as there is significant changes to the folder structure

@SamitHuang
Copy link
Copy Markdown
Collaborator

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 :)

@vermouth1992
Copy link
Copy Markdown
Collaborator

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 :)

I mean folders like vla have been moved to verl-vla.

@guillemgt
Copy link
Copy Markdown
Contributor Author

@vermouth1992 I've removed the extra files and added a couple newly missing ones

@vermouth1992 vermouth1992 merged commit a435148 into verl-project:main Apr 30, 2026
@vermouth1992
Copy link
Copy Markdown
Collaborator

@vermouth1992 I've removed the extra files and added a couple newly missing ones

Thank you for fixing!

SamitHuang added a commit to SamitHuang/verl-omni that referenced this pull request Apr 30, 2026
…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.
SamitHuang added a commit to SamitHuang/verl-omni that referenced this pull request Apr 30, 2026
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.
SamitHuang added a commit to SamitHuang/verl-omni that referenced this pull request Apr 30, 2026
…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).
@guillemgt guillemgt deleted the add-missing-init-files branch May 8, 2026 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants