Skip to content

test: remove tests directory - #267

Merged
leviking98z-rgb merged 1 commit into
Tencent-Hunyuan:mainfrom
celve:LIN-617/remove-tests-dir
Jul 27, 2026
Merged

test: remove tests directory#267
leviking98z-rgb merged 1 commit into
Tencent-Hunyuan:mainfrom
celve:LIN-617/remove-tests-dir

Conversation

@celve

@celve celve commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

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 testpaths in pyproject.toml, no conftest.py, and no CI workflow that invokes
pytest. The suite is therefore never executed by any automated gate — it only runs if
a contributor happens to type pytest locally, which makes it silent, unenforced
weight that drifts out of step with the code it nominally covers.

This follows the precedent set by #99 (remove tests directory) and the earlier
test: drop VeOmni/meta-init test suite (validate via e2e experiments): this repo
validates behaviour through end-to-end training and rollout experiments rather than an
unenforced unit-test tree.

Removed:

Related Issue

N/A

Test Plan

  • SKIP=no-commit-to-branch pre-commit run --all-files --show-diff-on-failure — all 16
    hooks pass (check-ast, ruff check, ruff format, check-recipe-targets, ...).
  • Verified no remaining references to the removed modules:
    grep -rn "test_advantages_gae\|test_prompt_seed\|test_geneval2_reproduction\|test_agent_sft" . — no hits.
  • Verified nothing imports from the package: no from tests/import tests anywhere,
    and no conftest.py in the tree.
  • No pytest invocation 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 dev extra still declares pytest/pytest-cov, which stays useful for ad-hoc local
testing and for the vendored unirl-reward-service/ sub-project, so pyproject.toml is
untouched.

Reviewer Notes

  • Interaction with open PRs. feat(algorithms): add AR PPO with GAE and value loss #259 (tests/algorithms/test_ppo_value_loss.py) and
    feat(agentic): add Sample-native multi-turn rollout and training #214 (7 files under tests/) each add new files under tests/. None of them touch
    the 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 the
    tree 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.
  • Pre-existing stale reference, deliberately left alone. pyproject.toml:87 says the
    VeOmni shim's import closure is audited by tests/test_compat_import.py. That file was
    already deleted earlier (test: drop VeOmni/meta-init test suite), so the comment was
    dangling 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.
  • AI assistance was used to prepare this change; the diff is a pure deletion and has been
    reviewed in full.
  • Duplicate-work check: no open PR removes tests/.

Checklist

  • I reviewed the changed code and removed unrelated/generated artifacts.
  • I updated tests, docs, and configs where needed, or explained why not.

Copilot AI review requested due to automatic review settings July 27, 2026 11:29
@github-actions github-actions Bot added the need review Ready and waiting for review label Jul 27, 2026
@celve
celve requested a review from leviking98z-rgb July 27, 2026 11:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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
leviking98z-rgb merged commit a4bc183 into Tencent-Hunyuan:main Jul 27, 2026
5 of 6 checks passed
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.
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.
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

need review Ready and waiting for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants