Repository navigation
fix(ci): skip the fused encoder where triton is absent - #13
Merged
Merged
Conversation
6 of 16 tasks
The shipped puffer_drive.yaml sets policy.fused_slot_encoder=true, and DriveBackbone raises ImportError when that is set without triton. Two CI jobs build a policy straight from the shipped config, so Unit Tests and Notebook Execution have been failing on every pull request: ImportError: fused_slot_encoder=true requires triton The smoke and eval suites already pin the flag off for exactly this reason; these two call sites were simply missed. test_action_selection only exercises the discrete-to-continuous action table, which the fused kernel has no part in, so it pins the flag off outright. The inference notebook keeps the kernel whenever it has a CUDA device and drops it otherwise, which is also what a reader running the notebook on a laptop needs. Neither change touches the training path or the kernel itself: with triton and a GPU present, both call sites behave exactly as before.
jdsika
force-pushed
the
fix/cpu-fused-slot-encoder
branch
from
November 11, 2026 12:14
c43f518 to
d233bb5
Compare
This was referenced Nov 11, 2026
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.
What
Pin
policy.fused_slot_encoderoff at the three call sites that build a Drive policy straight fromthe shipped config on machines without triton: the action-selection unit test, the released-driver
eval test, and the inference notebook.
Why
pufferlib/config/puffer_drive.yamlsetsfused_slot_encoder: true, andDriveBackbone.__init__raises when that is set without triton:
GitHub runners have no triton, so Unit Tests and Notebook Execution have been red on every
pull request, including PR #10, which touches nothing but fork-only documentation and tooling. Two
red required checks on every PR means Gate 1 can never be satisfied by anybody, so nothing can be
stacked until this is fixed.
The smoke suite already pins the flag off for exactly this reason
(
tests/smoke_tests/test_drive_train.py: "the CPU-only image has no triton"), and so does thehand-built policy in
tests/eval/test_eval.py. The three call sites fixed here were simply missed— note that
test_eval.pypins the flag in the test that builds policy kwargs by hand, but not intest_policy_builds_from_the_released_driver_env, which deliberately loads the shipped config.That asymmetry is why the flag survived to CI.
Not fork-specific:
fused_slot_encoder: truearrived in upstream Emerge-Lab#601 and is present on pureupstream/3.0, so upstream's own CI is red the same way.How tested
pre-commit run --all-filesmake rebuild(required if.c/.hchanged — zero new warnings)make test-unit/make test-evalmake test-c(C sim logic)make test-notebooks(notebooks touched)make test-docker-smoke(dynamics, rewards, observations, or training loop touched)make -C tests/drive perf(hot paths touched)make testbefore marking ready (unit + eval + c + notebooks — does not includedocker-smoke or perf; those are the two boxes above)
The eval call site was found by CI, not locally: the first revision of this PR fixed only the
notebook and the unit test, and the Unit Tests check stayed red on
tests/eval/test_eval.py::test_policy_builds_from_the_released_driver_envwith the identicalImportError(run 43017204299).That run is the fail-before evidence for the third call site; the local run above is the pass-after.
make test-notebookscould not run in this environment —nbclientis not installed in thecheckout's venv. The failing cell was instead reproduced directly: loading
puffer_drive, buildingthe notebook's env with the notebook's own overrides, and constructing
DrivePolicyexactly as05_inference.pydoes. Before the change that raisesImportError; after it printsOK: policy built on cpu. The Notebook Execution check on this PR is the authoritative run.Ran before the change on a clean tree to confirm the failures are pre-existing and not introduced
here: the same two tests fail identically on
integration/3.0without this commit.New behaviour is covered by a new test / the fix has a test that fails without it:
No new test. This change is a configuration fix to three existing test entry points; the tests that
prove it are
test_drive_mean_action_is_exact_in_physical_unitsandtest_policy_builds_from_the_released_driver_env, which fail onintegration/3.0and pass here.Stack hygiene
forkctl check-commitpasses (--choreon a fork-only branch)integration/3.0Merge gate
explicitly accepted in the thread
forkctl mirror <slug> --sha HEADpasses, i.e. thecommit cherry-picks onto pure
upstream/3.0and its diff is upstream-cleanGate 3 result:
Upstream disposition
Emerge-Lab/PufferDriverequested now — needs a human to verify the finaltitle, body and diff first, and the body must carry the authorship disclosure from
.github/fork/PROCESS.md→ Agent authorshipmirror candidate — upstream CI is red the same way — but opening an upstream PR needs
explicit human approval of the title, body and diff (§5). Flagging it rather than deciding.
chore(fork):change, Gate 3 exemptRisk / notes
Behaviour on a machine with triton and a GPU is unchanged at all three call sites: the notebook
keeps the kernel whenever
torch.cuda.is_available(), and neither test ever exercised the encoder— the unit test checks the discrete-to-continuous action table and the eval test checks that
load_policysurvives the driver env being released, and the fused kernel has no part in either.Nothing in the training path changes. The kernel itself is untouched.
Follow-up worth considering separately, not done here: the mismatch is structural, and this PR
needing a second round to find a third call site is the evidence. Any new test or notebook that
builds a policy from the shipped config will hit this again, because the shipped default is
GPU-only while CI is not. A shared test helper that yields CPU-safe policy kwargs would remove the
whole class, but that is a refactor with its own review surface.