unslothai/unsloth · error · HTTPException
Unknown example dataset '{example_id}'.
Error message
Unknown example dataset '{example_id}'. What it means
HTTP 404 from _example_by_id: the requested example-dataset id does not match any entry in the curated _DATASET_EXAMPLES list. This is a pure lookup failure on a static, server-defined list — the id was never valid at this server version (or was removed/renamed).
Source
Thrown at studio/backend/routes/training.py:4023
"id": "pixel-nouns",
"label": "Nouns (pixel avatars)",
"repo": "m1guelpf/nouns",
"description": "100 captioned pixel-art avatars. A style set, no trigger needed.",
"license": "cc0-1.0",
"image_cap": 100,
"suggested_trigger": None,
"loader": "hf_dataset",
"caption_column": "text",
"no_checks": False,
},
]
def _example_by_id(example_id: str) -> dict:
for entry in _DATASET_EXAMPLES:
if entry["id"] == example_id:
return entry
raise HTTPException(status_code = 404, detail = f"Unknown example dataset '{example_id}'.")
@router.get("/diffusion/dataset-examples", response_model = DiffusionDatasetExamplesResponse)
async def list_diffusion_dataset_examples(current_subject: str = Depends(get_current_subject)):
"""List the curated example datasets available for one-click import."""
return DiffusionDatasetExamplesResponse(
examples = [
DiffusionDatasetExample(
id = e["id"],
label = e["label"],
repo = e["repo"],
description = e["description"],
license = e["license"],
image_cap = e["image_cap"],
suggested_trigger = e["suggested_trigger"],
)
for e in _DATASET_EXAMPLES
]View on GitHub (pinned to 203007d190)
Solutions
- List valid ids from GET /diffusion/dataset-examples and use one of those.
- Update hardcoded ids after server upgrades; prefer reading the list at runtime instead of hardcoding.
- Check release notes/changelog for renamed example datasets.
Example fix
// before
await api.importExample('pokemon-old');
// after
const examples = await api.listExamples();
await api.importExample(examples.find(e => e.label.includes('Pokemon')).id); Defensive patterns
Strategy: validation
Validate before calling
ids = {e['id'] for e in (await api.listExamples()).examples}
assert example_id in ids, f'unknown example {example_id}' Type guard
def is_unknown_example(exc: HTTPException) -> bool:
return exc.status_code == 404 and 'Unknown example dataset' in str(exc.detail) Try / catch
try:
await api.importExample(example_id)
except HTTPStatusError as e:
if e.response.status_code == 404 and 'Unknown example' in e.response.text:
example_id = await pick_from_live_list() # re-enumerate
else:
raise Prevention
- Never hardcode example ids; resolve them from the list endpoint at runtime.
- Re-fetch the examples list after every server upgrade.
When it happens
Trigger: POST/GET an example-dataset route with an unknown id: GET /diffusion/dataset-examples/{id} or an import request referencing e.g. 'old-example' after an upgrade that renamed ids; client hardcodes an id from an older release.
Common situations: Client shipped with a hardcoded example id; server upgraded and the curated list changed names; user manually types an id from stale docs; typos in automation scripts.
Related errors
- Dataset '{cleaned}' not found.
- Image not found.
- lockfile not found: {path}
- MiniMax-H3 was trained on aspect ratios from 1:4 to 4:1; thi
- data_dir is not a directory: {data_dir}
AI-assisted analysis of unslothai/unsloth@203007d190 (2026-08-15).
Data as JSON: /api/errors/f4367c2103e06375.
Report an issue: GitHub.