{"record":{"id":"44b0297e09edab0c","repo":"tensorflow/models","slug":"duplicate-augmentation-augmentation-r-in-contex","errorCode":null,"errorMessage":"Duplicate augmentation {augmentation!r} in {context}.","messagePattern":"Duplicate augmentation (.+?) in (.+?)\\.","errorType":"exception","errorClass":"ConfigError","httpStatus":null,"severity":"error","filePath":"official/projects/waste_identification_ml/data_generation/auto_labeler_pipeline/config_loader.py","lineNumber":506,"sourceCode":"  Raises:\n      ConfigError: If the sequence is empty, not a list, or contains an\n          unknown or duplicate augmentation name.\n  \"\"\"\n  context = f\"prompts.{prompt_name!r}.augmentations\"\n  if not isinstance(raw_augmentations, (list, tuple)) or not raw_augmentations:\n    raise ConfigError(\n        f\"{context} must be a non-empty list. \"\n        f\"Allowed values: {list(CANONICAL_AUGMENTATION_ORDER)}.\"\n    )\n  seen = set()\n  for augmentation in raw_augmentations:\n    if augmentation not in CANONICAL_AUGMENTATION_ORDER:\n      raise ConfigError(\n          f\"Unknown augmentation {augmentation!r} in {context}. \"\n          f\"Allowed values: {list(CANONICAL_AUGMENTATION_ORDER)}.\"\n      )\n    if augmentation in seen:\n      raise ConfigError(\n          f\"Duplicate augmentation {augmentation!r} in {context}.\"\n      )\n    seen.add(augmentation)\n  return tuple(\n      augmentation\n      for augmentation in CANONICAL_AUGMENTATION_ORDER\n      if augmentation in seen\n  )\n\n\ndef _validate_detection(\n    raw_detection: Any, prompt_name: str\n) -> DetectionConfig:\n  \"\"\"Validates one prompt's detection block into a DetectionConfig.\n\n  Args:\n      raw_detection: The ``detection`` mapping read from YAML.\n      prompt_name: Prompt name used in error messages.","sourceCodeStart":488,"sourceCodeEnd":524,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/projects/waste_identification_ml/data_generation/auto_labeler_pipeline/config_loader.py#L488-L524","documentation":"Error \"Duplicate augmentation {augmentation!r} in {context}.\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/projects/waste_identification_ml/data_generation/auto_labeler_pipeline/config_loader.py:506 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e006f5f0d534913e49c1f1dae87364039fa607e2","analyzedAt":"2026-08-24T14:09:15.576Z","schemaVersion":2},"datasetVersion":"2026-08-24T17:17:21.512Z"}