{"record":{"id":"29deb28bb574b341","repo":"tensorflow/models","slug":"no-dataset-subfolders-found-under-root-dir-29deb2","errorCode":null,"errorMessage":"No dataset subfolders found under: {root_dir}","messagePattern":"No dataset subfolders found under: (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/projects/waste_identification_ml/data_generation/auto_labeler_pipeline/segmentation.py","lineNumber":167,"sourceCode":"      root_dir: Path to the root directory containing dataset subfolders.\n\n  Returns:\n      A sorted list of ``(dataset_name, dataset_path)`` tuples.\n\n  Raises:\n      FileNotFoundError: If ``root_dir`` does not exist.\n      ValueError: If ``root_dir`` contains no subdirectories.\n  \"\"\"\n  if not os.path.isdir(root_dir):\n    raise FileNotFoundError(f\"Root directory does not exist: {root_dir}\")\n\n  dataset_entries = sorted(\n      [entry for entry in os.scandir(root_dir) if entry.is_dir()],\n      key=lambda entry: entry.name,\n  )\n\n  if not dataset_entries:\n    raise ValueError(f\"No dataset subfolders found under: {root_dir}\")\n\n  return [(entry.name, entry.path) for entry in dataset_entries]\n\n\ndef validate_dataset_paths(\n    dataset_directories: list[tuple[str, str]], train_val_folder_name: str\n) -> list[tuple[str, str]]:\n  \"\"\"Validates that each dataset has the expected input layout.\n\n  Args:\n      dataset_directories: List of ``(dataset_name, dataset_path)`` tuples.\n      train_val_folder_name: Name of the train/val input subfolder.\n\n  Returns:\n      A list of ``(dataset_name, input_dir)`` tuples ready for processing.\n\n  Raises:\n      FileNotFoundError: If a dataset is missing its input folder.","sourceCodeStart":149,"sourceCodeEnd":185,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/projects/waste_identification_ml/data_generation/auto_labeler_pipeline/segmentation.py#L149-L185","documentation":"Error \"No dataset subfolders found under: {root_dir}\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/projects/waste_identification_ml/data_generation/auto_labeler_pipeline/segmentation.py:167 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"}