tensorflow/models · error · ValueError

No dataset subfolders found under: {root_dir}

Error message

No dataset subfolders found under: {root_dir}

What it means

Error "No dataset subfolders found under: {root_dir}" thrown in tensorflow/models.

Source

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

      root_dir: Path to the root directory containing dataset subfolders.

  Returns:
      A sorted list of ``(dataset_name, dataset_path)`` tuples.

  Raises:
      FileNotFoundError: If ``root_dir`` does not exist.
      ValueError: If ``root_dir`` contains no subdirectories.
  """
  if not os.path.isdir(root_dir):
    raise FileNotFoundError(f"Root directory does not exist: {root_dir}")

  dataset_entries = sorted(
      [entry for entry in os.scandir(root_dir) if entry.is_dir()],
      key=lambda entry: entry.name,
  )

  if not dataset_entries:
    raise ValueError(f"No dataset subfolders found under: {root_dir}")

  return [(entry.name, entry.path) for entry in dataset_entries]


def validate_dataset_paths(
    dataset_directories: list[tuple[str, str]],
    input_images_folder_name: str,
    train_val_folder_name: str,
) -> list[tuple[str, str, str]]:
  """Validates that each dataset has the expected input/output layout.

  Performs all checks upfront before any copying starts, so misconfigured
  datasets are reported immediately.

  Args:
      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.

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:88 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/69d639e602d3fabb. Report an issue: GitHub.