Skip to content

fix(tests): repair the joint_cross_attn real-Cosmos GPU test - #16

Merged
wayrise merged 1 commit into
mainfrom
fix/cosmos-config-name
Sep 8, 2026
Merged

fix(tests): repair the joint_cross_attn real-Cosmos GPU test#16
wayrise merged 1 commit into
mainfrom
fix/cosmos-config-name

Conversation

@wayrise

@wayrise wayrise commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

test_joint_cross_attn_forward_on_real_cosmos has not actually run since commit 4d8df56 ("Document OpenWAM usage and unify component keys"), which replaced configs/model/video_backbone/cosmos_predict25.yaml with cosmos_predict25_2b.yaml. The test's Hydra override was missed, so it raised MissingConfigException before any model code ran:

$ pytest tests/test_cosmos_predict25_joint_cross_attn.py
hydra.errors.MissingConfigException: In 'model/video_backbone': Could not find 'model/video_backbone/cosmos_predict25'

It is the only stale reference left — assets/openwam_usage_docs/train-and-deploy.md and the openwam-serve --help text already use cosmos_predict25_2b, and model_loader.py gates on the cosmos_predict25_ prefix.

The failure is invisible without the Cosmos-Predict2.5-2B checkpoint mounted, so CI skips it and it only surfaces on a box that has the weights — which is how it went unnoticed.

Two lines

1. The config name. model/video_backbone=cosmos_predict25cosmos_predict25_2b.

2. The stub_reason1 fixture. With Hydra resolving, the test then hit FileNotFoundError from the live Reason1 text encoder, against the config's /path/to/Cosmos-Reason1-7B placeholder. This was the one real-Cosmos GPU test not requesting stub_reason1, the fixture that exists precisely 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 a real encoder anyway: it passes context to forward() directly.

Verification

Run against real Cosmos-Predict2.5-2B weights on an H200 (OPENWAM_COSMOS25_2B pointed at the checkpoint):

tests/test_cosmos_predict25_joint_cross_attn.py   5 passed in 47s

The GPU case now genuinely loads the DiT and exercises the forward, rather than erroring or skipping. Full suite with the checkpoint visible:

1981 passed, 12 skipped

versus 1 failed, ... 20 skipped before — the 8 fewer skips are the Cosmos GPU tests the checkpoint unlocks. ruff check and ruff format --check clean.

🤖 Generated with Claude Code

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 <noreply@anthropic.com>
@xueminchi
xueminchi self-requested a review September 8, 2026 17:07

@xueminchi xueminchi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed the two-line test repair and the related config, fixture, and model-loading/forward paths. The Hydra override matches the current cosmos_predict25_2b config. Reusing stub_reason1 is appropriate here: context is supplied directly to forward, and the fixture replaces only the text encoder, leaving the real Cosmos DiT load and the existing assertions intact. No blocking issues found. CI lint and tests passed; I did not independently rerun the checkpoint-backed GPU test.

@wayrise
wayrise merged commit f52afae into main Sep 8, 2026
2 checks passed
@wayrise
wayrise deleted the fix/cosmos-config-name branch September 8, 2026 17:12
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.

2 participants