tensorflow/models · error · FileNotFoundError

Source folder not found: {source_folder}

Error message

Source folder not found: {source_folder}

What it means

Error "Source folder not found: {source_folder}" thrown in tensorflow/models.

Source

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


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


def get_subfolder_names(source_folder: str) -> list[str]:
  """Returns a sorted list of subfolder names in the source folder.

  Args:
      source_folder: Path to the root source folder.

  Returns:
      A sorted list of subfolder names. Empty list if none found.

  Raises:
      FileNotFoundError: If the source folder does not exist.
  """
  if not os.path.isdir(source_folder):
    raise FileNotFoundError(f"Source folder not found: {source_folder}")

  return [
      name
      for name in sorted(os.listdir(source_folder))
      if os.path.isdir(os.path.join(source_folder, name))
  ]


def get_sorted_image_names(folder_path: str) -> list[str]:
  """Returns a naturally sorted list of image file names from a folder.

  Args:
      folder_path: Path to the folder containing images.

  Returns:
      A naturally sorted list of image file names.
  """
  image_names = [

View on GitHub (pinned to e006f5f0d5)

When it happens

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