def test_update_multiple_batches() -> None:
    """Test updating the metric with multiple batches."""
    metric = _MinMax()
    batch1 = torch.tensor([0.5, 1.5, 3.0])
    batch2 = torch.tensor([-0.5, 0.0, 2.5])

    metric.update(batch1)
    metric.update(batch2)

    assert metric.min.item() == -0.5, "Min should be -0.5 after multiple batch updates."
    assert metric.max.item() == 3.0, "Max should be 3.0 after multiple batch updates."
Test updating the metric with multiple batches.
tests/unit/metrics/test_min_max.py