{"record":{"id":"3a68398a8f9f4eaf","repo":"tensorflow/models","slug":"no-dataset-subfolders-found-under-root-dir","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/filter_sparse_images.py","lineNumber":168,"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]], input_images_folder_name: str\n) -> list[tuple[str, str]]:\n  \"\"\"Validates that each dataset has the expected input images folder.\n\n  Args:\n      dataset_directories: List of ``(dataset_name, dataset_path)`` tuples.\n      input_images_folder_name: Name of the input images subfolder.\n\n  Returns:\n      A list of ``(dataset_name, images_dir)`` tuples ready for processing.\n\n  Raises:\n      FileNotFoundError: If any dataset is missing its images folder.","sourceCodeStart":150,"sourceCodeEnd":186,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/projects/waste_identification_ml/data_generation/auto_labeler_pipeline/filter_sparse_images.py#L150-L186","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/filter_sparse_images.py:168 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"}