tensorflow/models · error · FileNotFoundError

Dataset is missing required input folder

Error message

Dataset {dataset_name!r} is missing required input folder: {source_folder}

What it means

Raised in validate_dataset_paths when a dataset is missing its input images folder; the split cannot be generated without source images.

Solutions

  1. Create the input folder at the shown path or move images into it.
  2. Match the configured input images folder name to the on-disk name.
  3. Run the upstream stage that produces the input images folder.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at official/projects/waste_identification_ml/data_generation/auto_labeler_pipeline/split_train_val.py:122 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/a648989aa86df3d9. Report an issue: GitHub.

Appendix: source

Thrown at official/projects/waste_identification_ml/data_generation/auto_labeler_pipeline/split_train_val.py:122

      dataset_directories: List of ``(dataset_name, dataset_path)`` tuples.
      input_images_folder_name: Name of the input images subfolder.
      train_val_folder_name: Name of the train/val output subfolder.

  Returns:
      A list of ``(dataset_name, source_folder, output_folder)`` tuples ready
      for processing.

  Raises:
      FileNotFoundError: If a dataset is missing its input folder.
      FileExistsError: If a dataset's output folder already exists.
  """
  validated = []
  for dataset_name, dataset_path in dataset_directories:
    source_folder = os.path.join(dataset_path, input_images_folder_name)
    output_folder = os.path.join(dataset_path, train_val_folder_name)

    if not os.path.isdir(source_folder):
      raise FileNotFoundError(
          f"Dataset {dataset_name!r} is missing required input folder: "
          f"{source_folder}"
      )

    if os.path.exists(output_folder):
      raise FileExistsError(
          f"Dataset {dataset_name!r} already has an output folder: "
          f"{output_folder}. Remove or rename it before re-running."
      )

    validated.append((dataset_name, source_folder, output_folder))

  return validated


# ── Image discovery and filtering ───────────────────────────────────────────

View on GitHub (pinned to e006f5f0d5)