From 0979e62c1015fce35886b7cfb77eaac7fa37a0d6 Mon Sep 17 00:00:00 2001 From: wayrise Date: Wed, 9 Sep 2026 00:56:11 +0800 Subject: [PATCH] fix(tests): repair the joint_cross_attn real-Cosmos GPU test test_joint_cross_attn_forward_on_real_cosmos has not run since the config rename in 4d8df56, which replaced configs/model/video_backbone/cosmos_predict25.yaml with cosmos_predict25_2b.yaml. The override was missed, so Hydra raised MissingConfigException before any model code ran. It is the only stale reference left -- the usage docs and the openwam-serve --help text already use the new name. The failure is invisible unless the Cosmos-Predict2.5-2B checkpoint is mounted, so CI skips it and it surfaced only on a box that had the weights. With the config resolving, the test then hit FileNotFoundError from the live Reason1 text encoder: it was the one real-Cosmos GPU test not requesting the stub_reason1 fixture, which exists so these tests skip the 16 GB Qwen load. Its closest sibling, test_tri_system_forward_on_real_cosmos, uses it. The test never needed the encoder anyway -- it passes `context` to forward() directly. Verified against real Cosmos-Predict2.5-2B weights on an H200: the file now runs 5 passed, and the GPU case genuinely exercises the DiT rather than skipping. Co-Authored-By: Claude Opus 5 --- tests/test_cosmos_predict25_joint_cross_attn.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_cosmos_predict25_joint_cross_attn.py b/tests/test_cosmos_predict25_joint_cross_attn.py index 2af03e92..7c51bbe2 100644 --- a/tests/test_cosmos_predict25_joint_cross_attn.py +++ b/tests/test_cosmos_predict25_joint_cross_attn.py @@ -176,7 +176,7 @@ def test_video_only_path_matches_full_forward_video(): @pytest.mark.gpu -def test_joint_cross_attn_forward_on_real_cosmos(): +def test_joint_cross_attn_forward_on_real_cosmos(stub_reason1): """joint_cross_attn + real Cosmos-Predict2.5-2B: one forward restores 5D video, yields a finite action prediction, and preserves the cross-attn isolation invariant (video independent of the action input).""" @@ -205,7 +205,7 @@ def test_joint_cross_attn_forward_on_real_cosmos(): overrides=[ "model=dual_system", "model.architecture.variant=joint_cross_attn", - "model/video_backbone=cosmos_predict25", + "model/video_backbone=cosmos_predict25_2b", f"model.video_backbone.model_path={COSMOS25_2B}", ], )