{"record":{"id":"2eca13fb7f73e632","repo":"unslothai/unsloth","slug":"dataset-appears-empty-or-unreadable","errorCode":null,"errorMessage":"dataset appears empty or unreadable","messagePattern":"dataset appears empty or unreadable","errorType":"http","errorClass":"HTTPException","httpStatus":422,"severity":"error","filePath":"studio/backend/routes/data_recipe/seed.py","lineNumber":379,"sourceCode":"                subset = subset,\n                token = token,\n            )\n            preview_rows = _load_preview_rows(\n                load_dataset_fn = load_dataset,\n                load_kwargs = split_kwargs,\n                preview_size = preview_size,\n            )\n        except (ValueError, OSError, RuntimeError) as exc:\n            raise log_and_http_error(\n                exc,\n                422,\n                \"seed inspect failed\",\n                event = \"data_recipe.seed.hf_preview_failed\",\n                log = logger,\n            ) from exc\n\n    if not preview_rows:\n        raise HTTPException(status_code = 422, detail = \"dataset appears empty or unreadable\")\n    preview_rows = _serialize_preview_rows(preview_rows)\n    columns = _extract_columns(preview_rows)\n\n    if not data_files:\n        resolved_path = f\"datasets/{dataset_name}/**/*.parquet\"\n    else:\n        resolved_path = _resolve_seed_hf_path(dataset_name, data_files, split)\n        if not resolved_path:\n            raise HTTPException(status_code = 422, detail = \"unable to resolve seed dataset path\")\n\n    return SeedInspectResponse(\n        dataset_name = dataset_name,\n        resolved_path = resolved_path,\n        columns = columns,\n        preview_rows = preview_rows,\n        split = split,\n        subset = subset,\n    )","sourceCodeStart":361,"sourceCodeEnd":397,"githubUrl":"https://github.com/unslothai/unsloth/blob/203007d19051dcd2ae33876786d117c99f6b0368/studio/backend/routes/data_recipe/seed.py#L361-L397","documentation":"HTTP 422 raised near the end of POST /seed/inspect when preview_rows is empty after all preview paths ran — the dataset resolved and loaded but yielded zero rows for the requested split/subset/data_files combination, or rows could not be read into records.","triggerScenarios":"POST /seed/inspect with a split that does not exist or is empty (e.g. split='validation' on a train-only dataset), a subset/config name mismatch, or data_files glob matching only empty files.","commonSituations":"Dataset's split naming differs from expectation ('test' vs 'eval', 'train_small'); gated/empty dataset revision; user guesses subset names; non-tabular data where row extraction returns nothing.","solutions":["Check the dataset card on Hugging Face for the actual split and config names and retry with those exact values.","Retry without data_files/subset filters to confirm the dataset has data at all.","If the split is genuinely tiny/empty, pick another split for the preview."],"exampleFix":"# before\ninspect(dataset_name='org/repo', split='val')\n\n# after\ninspect(dataset_name='org/repo', split='validation')  # name from dataset card","handlingStrategy":"validation","validationCode":"// Pre-check splits/subsets via the HF datasets-server API before inspect\nconst info = await fetch(`https://datasets-server.huggingface.co/splits?dataset=${encodeURIComponent(name)}`).then(r => r.json());\nconst okSplit = info.splits?.some(s => s.config === subset && s.split === split);\nif (!okSplit) throw new Error(`split '${split}' not available; check ${name} splits`);","typeGuard":null,"tryCatchPattern":"On 422 'dataset appears empty or unreadable', re-query the dataset's available splits and prompt the user to choose one; do not retry the same split.","preventionTips":["Fetch split/config metadata from Hugging Face before calling inspect.","Default to no data_files filter and add filters only after a plain inspect succeeds."],"tags":["huggingface","dataset","http-422","empty-data"],"backgroundTag":null,"analyzedSha":"203007d19051dcd2ae33876786d117c99f6b0368","analyzedAt":"2026-08-15T02:48:39.846Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}