def test_accumulation_reset(generate_batched_data):
    """Check if AccumulativeMetric accumulates all the data correctly with multiple resets"""
    for (
        fields_names,
        num_batches,
        num_samples,
        batches,
        true_values,
    ) in generate_batched_data:
        metric = AccumulativeMetric(keys=fields_names)
        for _ in range(5):
            metric.reset(num_batches=num_batches, num_samples=num_samples)
            for batch in batches:
                metric.update(**batch)
            for field_name in true_values:
                assert (true_values[field_name] == metric.storage[field_name]).all()
Check if AccumulativeMetric accumulates all the data correctly with multiple resets
tests/catalyst/metrics/test_cmc_score.py