Skip to main content

Definition

The duplicate rows test checks if there are rows that are identical to each other in the dataset.

Taxonomy

  • Task types: LLM, tabular classification, tabular regression, text classification.
  • Availability: and .

Why it matters

  • Duplicate rows on the training set can lead the model to overfit on the duplicated examples.
  • Duplicate rows on the validation set can distort the aggregate metrics, making them overly optimistic or pessimistic.

Test configuration examples

If you are writing a tests.json, here are a few valid configurations for the character length test:
[
  {
    "name": "No duplicate rows",
    "description": "Asserts that there are no duplicate rows",
    "type": "integrity",
    "subtype": "duplicateRowCount",
    "thresholds": [
      {
        "insightName": "duplicateRowCount",
        "measurement": "duplicateRowCount",
        "operator": "<=",
        "value": 0
      }
    ],
    "subpopulationFilters": null,
    "mode": "development",
    "usesValidationDataset": true,
    "usesTrainingDataset": false,
    "usesMlModel": false,
    "syncId": "b4dee7dc-4f15-48ca-a282-63e2c04e0689"
  },
  {
    "name": "No duplicate rows",
    "description": "Asserts that there are no duplicate rows",
    "type": "integrity",
    "subtype": "duplicateRowCount",
    "thresholds": [
      {
        "insightName": "duplicateRowCount",
        "measurement": "duplicateRowPercentage",
        "operator": "<=",
        "value": 0.0
      }
    ],
    "subpopulationFilters": null,
    "mode": "development",
    "usesValidationDataset": true,
    "usesTrainingDataset": false,
    "usesMlModel": false,
    "syncId": "96622fba-ea00-4e42-8f42-5e8f5f60805f"
  }
]
[
  {
    "name": "No duplicate rows",
    "description": "Asserts that there are no duplicate rows",
    "type": "integrity",
    "subtype": "duplicateRowCount",
    "thresholds": [
      {
        "insightName": "duplicateRowCount",
        "measurement": "duplicateRowCount",
        "operator": "<=",
        "value": 0
      }
    ],
    "subpopulationFilters": null,
    "mode": "monitoring",
    "usesProductionData": true,
    "evaluationWindow": 3600,
    "delayWindow": 0,
    "syncId": "b4dee7dc-4f15-48ca-a282-63e2c04e0689"
  },
  {
    "name": "No duplicate rows",
    "description": "Asserts that there are no duplicate rows",
    "type": "integrity",
    "subtype": "duplicateRowCount",
    "thresholds": [
      {
        "insightName": "duplicateRowCount",
        "measurement": "duplicateRowPercentage",
        "operator": "<=",
        "value": 0.0
      }
    ],
    "subpopulationFilters": null,
    "mode": "monitoring",
    "usesProductionData": true,
    "evaluationWindow": 3600,
    "delayWindow": 0,
    "syncId": "96622fba-ea00-4e42-8f42-5e8f5f60805f"
  }
]