test_wan_finetune
¶
Per-method GPU smoke test: WanModel + FineTuneMethod.
Establishes the per-method test pattern for fastvideo/train:
- Instantiate the model + method via their public constructors
(no
Trainersetup, no FSDP wrapping). - Feed a synthetic
raw_batchdict throughmethod.single_train_step()+method.backward(). - Assert that the loss is finite and that the first transformer block received a finite, non-zero gradient.
The first block's gradient is the last one computed during backprop, so a healthy grad there implies the full forward + chain-rule path is intact. Keeping the assertion to a single block keeps the reference surface tiny — a later PR layers a device-keyed grad-norm regression on top of this same harness.