Skip to content

Hf example test

TestHFExample #

Bases: LearningAlgorithmTests[HFExample]

Tests for the HF example.

test_overfit_batch #

test_overfit_batch(
    algorithm: HFExample,
    datamodule: HFDataModule,
    tmp_path: Path,
    num_steps: int = 3,
)

Test that the loss decreases on a single batch.

total_vram_gb #

total_vram_gb() -> float

Returns the total VRAM in GB.