Skip to content

ci: honest CPU job (S0.3) - #8

Merged
Mattral merged 2 commits into
docs/S0.2-readme-truthfrom
ci/S0.3-honest-ci
Oct 30, 2026
Merged

Mattral merged 2 commits into
docs/S0.2-readme-truthfrom
ci/S0.3-honest-ci

Conversation

@Mattral

@Mattral Mattral commented Oct 30, 2026

Copy link
Copy Markdown
Owner

What changed

The old CI workflow is gone. It ran integration tests and benchmarks against directories that do not exist, and two steps ended in || true.

The new workflow is .github/workflows/ci.yml. One job:

  1. Python 3.11
  2. requirements-cpu.txt (torch 2.15.0+cpu, pytest 9.2.0, ruff 0.17.3, and the other pins in that file)
  3. pip install -e . --no-deps so the old pins in pyproject.toml are not installed
  4. ruff check . and ruff format --check .
  5. pytest -q -m "not slow and not gpu"

Ruff is limited to pycodestyle, pyflakes, and isort. Line length is the formatter's job. docs/ is excluded so ruff does not rewrite markdown.

Two import bugs that stopped the suite from starting are fixed in this PR:

  • comm_hooks.py imported ddp_comm_hook, which torch 2.15 does not export, and never used the name. The import is removed.
  • telemetry.py called torch.tensor without importing torch.

How it works

A green CI run used to be possible while the tests were red, because the benchmark step ignored its own failure and the integration job targeted a missing folder. This job fails when ruff fails or when pytest fails. There is no continue-on-error.

pyproject.toml still declares transformers==4.32.0, trl==0.5.0, triton, and bitsandbytes. That stack is not what this job installs. The CPU file is the environment the tests were run in.

How to verify

ruff check .
ruff format --check .
PYTHONPATH=src pytest -q -m "not slow and not gpu"

Local result on Python 3.12, torch 2.15.0+cpu: ruff passes. Pytest collects 82 tests, 69 passed, 13 failed. The GitHub job should go red on those 13. That is the result this PR is shipping.

What is still not proven

The 13 failures are unchanged algorithm bugs, now visible because the package imports:

  • DPO margin, beta, and AlignmentConfig.dpo_beta
  • PPO losses that do not require grad, and train_step gathering log-probs at the wrong rank
  • RolloutBuffer.add calls pin_memory() and raises on CPU when no accelerator is present
  • RolloutGenerator.generate_rollout hits IndexError on torch.cat(..., dim=1)

tests/run_benchmark_comparison.py still returns hardcoded throughput and VRAM. Pytest does not collect that file. Those numbers are not measurements.

No GPU run. The Quadro P2000 was not used.

Replace the old workflow, which called missing test directories and
swallowed errors. Ruff passes. Pytest is red on 13 existing failures,
and the job is supposed to show that.
@Mattral
Mattral merged commit 472a3a7 into docs/S0.2-readme-truth Oct 30, 2026
1 check failed
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.

1 participant