tensorflow/models · error · FileExistsError
Augmented files already exist in the following class folders
Error message
Augmented files already exist in the following class folders:
{details}
Remove them before re-running, or run on a fresh classifier dataset. What it means
Error "Augmented files already exist in the following class folders: {details} Remove them before re-running, or run on a fresh classifier dataset." thrown in tensorflow/models.
Source
Thrown at official/projects/waste_identification_ml/data_generation/auto_labeler_pipeline/augment_train_split.py:408
FileExistsError: If any class folder contains augmented files.
"""
folders_with_augmentations = []
for class_name, class_path in class_folders:
existing_augmented_files = find_pre_existing_augmentations(class_path)
if existing_augmented_files:
sample = existing_augmented_files[:5]
extra = len(existing_augmented_files) - len(sample)
sample_text = ", ".join(sample)
if extra > 0:
sample_text += f", ... (+{extra} more)"
folders_with_augmentations.append(
f" - {class_name}: {len(existing_augmented_files)} files "
f"({sample_text})"
)
if folders_with_augmentations:
details = "\n".join(folders_with_augmentations)
raise FileExistsError(
"Augmented files already exist in the following class folders:\n"
f"{details}\n"
"Remove them before re-running, or run on a fresh classifier dataset."
)
# ── Per-folder pipeline ──────────────────────────────────────────────────────
def process_class_folder(
class_name: str,
class_folder: str,
augmentations_to_apply: tuple[str, ...],
rotation_fill_color: tuple[int, int, int],
) -> None:
"""Applies augmentations to all images in a class folder.
Args:View on GitHub (pinned to e006f5f0d5)
When it happens
Trigger: Thrown at official/projects/waste_identification_ml/data_generation/auto_labeler_pipeline/augment_train_split.py:408 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of tensorflow/models@e006f5f0d5 (2026-08-24).
Data as JSON: /api/errors/b7e3ff2e244c29d4.
Report an issue: GitHub.