test: remove tests directory - #267
Merged
leviking98z-rgb merged 1 commit intoJul 27, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR removes the top-level tests/ directory, aligning the repo with its current validation approach (CI runs pre-commit only, with no pytest execution wired in) and matching the earlier precedent of eliminating an unenforced root test tree.
Changes:
- Delete CPU unit tests for
compute_gae_advantages(GAE). - Delete unit tests covering GenEval2 reproduction helpers and prompt-seed determinism.
- Delete unit tests covering agent SFT preparation/tokenization behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
tests/types/test_advantages_gae.py |
Removes GAE advantage computation unit tests. |
tests/benchmarks/test_geneval2_reproduction.py |
Removes GenEval2 reproduction helper unit tests. |
tests/sft/test_agent_sft.py |
Removes agent SFT preparation/tokenization unit tests. |
tests/sde/test_prompt_seed.py |
Removes prompt-seed determinism unit test. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
leviking98z-rgb
approved these changes
Jul 27, 2026
2 tasks
haonan3
added a commit
to YSunLIN/UniRL
that referenced
this pull request
Jul 30, 2026
Regression verification for the P1 review finding: the original per-shard scalar shared_field KL collapsed to rank 0 on DP collect and only lined up on the batch_size == actor_dp == 8 topology. kl_loss is now a per-sample [B] concat column; scripts/verify_refl_kl_batching.py pins chunk/cat round-trips, rewards/KL payload lockstep, per-shard backward grad shapes, unequal actor/reward dp re-chunking, and numeric equivalence with the legacy scalar mean at the pytree wire layer (CPU, no Ray). Shipped as a standalone runnable script rather than a tests/ tree per the Tencent-Hunyuan#99/Tencent-Hunyuan#267 no-unenforced-test-suite policy.
This was referenced Jul 30, 2026
celve
added a commit
to celve/unirl
that referenced
this pull request
Jul 31, 2026
… contracts Replace the layered async_runtime (AsyncRolloutScheduler + GenerationDispatcher protocol + RayGenerationDispatcher + VersionedGroupBuffer) and the agentic trainers' duplicated producer plumbing (_GroupAssembler/_GroupBuffer/ _ingest_completed/_pump/_drain_buffer) with two driver-side engines built on two mechanism classes, all under unirl/rollout/engine/: - synchronous.py (was base.py): the worker-side sync contracts, unchanged in substance; BaseSingleTurnRolloutEngine is renamed SyncRolloutEngine and chunked_engine_generate moves in from the package __init__. - asynchronous.py (new): VersionedBuffer + InflightPool (ray-free mechanisms over Handle.launch_nowait), the AsyncRolloutEngine protocol (poll / drain_freshest / pop_evicted / quiesce + engine-owned weight_version), and its two concretes: AsyncBatchRolloutEngine (launch-time version stamps; used by AsyncARTrainer/AsyncDiffusionTrainer) and AsyncAgenticRolloutEngine (facade over the agentic rank-0 coordinator: [0] unwraps, PendingGroups sibling assembly, completion-time stamps, quiesce = abort + final poll; used by the partial/async agentic trainers). - engine/__init__.py becomes a lazy re-export shim so the driver-side module imports ray/torch-free. Trainers keep the policy (launch ceiling, reap-vs-launch order as statement order, quiesce points, tail carry/drop) as explicit loops; the reap_before_launch flag, dead drained()/pending_roots()/_pending_carried, and the trainer-side _weight_version counters are removed. Import paths change with no aliases: unirl.rollout.async_runtime and the names it exported (AsyncRolloutScheduler, RayGenerationDispatcher, VersionedGroupBuffer, GenerationDispatcher, InflightGeneration) are gone, and unirl.rollout.engine.base is now unirl.rollout.engine.synchronous. All in-repo consumers are migrated; out-of-tree code importing these must update. Verified on GPU (1x8 H20): the async AR recipe trains end-to-end with the PPO ratio pinned at 0.99-1.00 across every weight-sync cycle, and the BAGEL vllm-omni async recipe replays at ratio=1.0000+/-0.0000. CPU-only harnesses pinning the buffer/pool invariants were run but not committed, per the tests-tree policy (Tencent-Hunyuan#99/Tencent-Hunyuan#267); commands and results are in the PR Test Plan.
2 tasks
haonan3
pushed a commit
that referenced
this pull request
Aug 2, 2026
… contracts Replace the layered async_runtime (AsyncRolloutScheduler + GenerationDispatcher protocol + RayGenerationDispatcher + VersionedGroupBuffer) and the agentic trainers' duplicated producer plumbing (_GroupAssembler/_GroupBuffer/ _ingest_completed/_pump/_drain_buffer) with two driver-side engines built on two mechanism classes, all under unirl/rollout/engine/: - synchronous.py (was base.py): the worker-side sync contracts, unchanged in substance; BaseSingleTurnRolloutEngine is renamed SyncRolloutEngine and chunked_engine_generate moves in from the package __init__. - asynchronous.py (new): VersionedBuffer + InflightPool (ray-free mechanisms over Handle.launch_nowait), the AsyncRolloutEngine protocol (poll / drain_freshest / pop_evicted / quiesce + engine-owned weight_version), and its two concretes: AsyncBatchRolloutEngine (launch-time version stamps; used by AsyncARTrainer/AsyncDiffusionTrainer) and AsyncAgenticRolloutEngine (facade over the agentic rank-0 coordinator: [0] unwraps, PendingGroups sibling assembly, completion-time stamps, quiesce = abort + final poll; used by the partial/async agentic trainers). - engine/__init__.py becomes a lazy re-export shim so the driver-side module imports ray/torch-free. Trainers keep the policy (launch ceiling, reap-vs-launch order as statement order, quiesce points, tail carry/drop) as explicit loops; the reap_before_launch flag, dead drained()/pending_roots()/_pending_carried, and the trainer-side _weight_version counters are removed. Import paths change with no aliases: unirl.rollout.async_runtime and the names it exported (AsyncRolloutScheduler, RayGenerationDispatcher, VersionedGroupBuffer, GenerationDispatcher, InflightGeneration) are gone, and unirl.rollout.engine.base is now unirl.rollout.engine.synchronous. All in-repo consumers are migrated; out-of-tree code importing these must update. Verified on GPU (1x8 H20): the async AR recipe trains end-to-end with the PPO ratio pinned at 0.99-1.00 across every weight-sync cycle, and the BAGEL vllm-omni async recipe replays at ratio=1.0000+/-0.0000. CPU-only harnesses pinning the buffer/pool invariants were run but not committed, per the tests-tree policy (#99/#267); commands and results are in the PR Test Plan.
haonan3
pushed a commit
that referenced
this pull request
Aug 2, 2026
… contracts Replace the layered async_runtime (AsyncRolloutScheduler + GenerationDispatcher protocol + RayGenerationDispatcher + VersionedGroupBuffer) and the agentic trainers' duplicated producer plumbing (_GroupAssembler/_GroupBuffer/ _ingest_completed/_pump/_drain_buffer) with two driver-side engines built on two mechanism classes, all under unirl/rollout/engine/: - synchronous.py (was base.py): the worker-side sync contracts, unchanged in substance; BaseSingleTurnRolloutEngine is renamed SyncRolloutEngine and chunked_engine_generate moves in from the package __init__. - asynchronous.py (new): VersionedBuffer + InflightPool (ray-free mechanisms over Handle.launch_nowait), the AsyncRolloutEngine protocol (poll / drain_freshest / pop_evicted / quiesce + engine-owned weight_version), and its two concretes: AsyncBatchRolloutEngine (launch-time version stamps; used by AsyncARTrainer/AsyncDiffusionTrainer) and AsyncAgenticRolloutEngine (facade over the agentic rank-0 coordinator: [0] unwraps, PendingGroups sibling assembly, completion-time stamps, quiesce = abort + final poll; used by the partial/async agentic trainers). - engine/__init__.py becomes a lazy re-export shim so the driver-side module imports ray/torch-free. Trainers keep the policy (launch ceiling, reap-vs-launch order as statement order, quiesce points, tail carry/drop) as explicit loops; the reap_before_launch flag, dead drained()/pending_roots()/_pending_carried, and the trainer-side _weight_version counters are removed. Import paths change with no aliases: unirl.rollout.async_runtime and the names it exported (AsyncRolloutScheduler, RayGenerationDispatcher, VersionedGroupBuffer, GenerationDispatcher, InflightGeneration) are gone, and unirl.rollout.engine.base is now unirl.rollout.engine.synchronous. All in-repo consumers are migrated; out-of-tree code importing these must update. Verified on GPU (1x8 H20): the async AR recipe trains end-to-end with the PPO ratio pinned at 0.99-1.00 across every weight-sync cycle, and the BAGEL vllm-omni async recipe replays at ratio=1.0000+/-0.0000. CPU-only harnesses pinning the buffer/pool invariants were run but not committed, per the tests-tree policy (#99/#267); commands and results are in the PR Test Plan.
Draft
2 tasks
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.
Summary
Removes the top-level
tests/directory (4 files, 330 lines).Nothing in the repo wires this directory up: there is no
[tool.pytest.ini_options]or
testpathsinpyproject.toml, noconftest.py, and no CI workflow that invokespytest. The suite is therefore never executed by any automated gate — it only runs ifa contributor happens to type
pytestlocally, which makes it silent, unenforcedweight that drifts out of step with the code it nominally covers.
This follows the precedent set by #99 (
remove tests directory) and the earliertest: drop VeOmni/meta-init test suite (validate via e2e experiments): this repovalidates behaviour through end-to-end training and rollout experiments rather than an
unenforced unit-test tree.
Removed:
tests/types/test_advantages_gae.py(from feat(types): add GAE advantage computation #254)tests/benchmarks/test_geneval2_reproduction.py(from feat(benchmark/eval): GenEval2 DPPO reproduction (SD3.5) #236)tests/sft/test_agent_sft.py(from feat(sft): support agent conversation fine-tuning #234)tests/sde/test_prompt_seed.pyRelated Issue
N/A
Test Plan
SKIP=no-commit-to-branch pre-commit run --all-files --show-diff-on-failure— all 16hooks pass (
check-ast,ruff check,ruff format,check-recipe-targets, ...).grep -rn "test_advantages_gae\|test_prompt_seed\|test_geneval2_reproduction\|test_agent_sft" .— no hits.from tests/import testsanywhere,and no
conftest.pyin the tree.pytestinvocation exists in.github/workflows/, so no CI job changes behaviour.Compatibility / Risk
Low. Deletion only — no source, config, recipe, checkpoint, data format, or API change.
The
devextra still declarespytest/pytest-cov, which stays useful for ad-hoc localtesting and for the vendored
unirl-reward-service/sub-project, sopyproject.tomlisuntouched.
Reviewer Notes
tests/algorithms/test_ppo_value_loss.py) andfeat(agentic): add Sample-native multi-turn rollout and training #214 (7 files under
tests/) each add new files undertests/. None of them touchthe 4 files removed here, so there is no merge conflict either way — but whichever of
those lands after this PR will recreate a
tests/directory. If the intent is for thetree to stay absent, those authors should be asked to drop their test files as part of
their own review, otherwise the directory returns exactly as it did after test: remove tests directory #99.
pyproject.toml:87says theVeOmni shim's import closure is audited by
tests/test_compat_import.py. That file wasalready deleted earlier (
test: drop VeOmni/meta-init test suite), so the comment wasdangling before this change and is equally dangling after. Flagging rather than fixing
it, to keep this diff purely a deletion — happy to correct the comment here if you'd
prefer it bundled.
reviewed in full.
tests/.Checklist