unslothai/unsloth · error · ValueError
item_types must not be empty
Error message
item_types must not be empty
What it means
Field validator _validate_item_types on GitHubRepoSeedSource requiring a non-empty item_types list. After the emptiness check the values are de-duplicated preserving order. An empty list means the scraper has nothing to fetch (issues, PRs, comments...), so it is rejected at config validation time.
Source
Thrown at studio/backend/plugins/data-designer-github-repo-seed/src/data_designer_github_repo_seed/config.py:57
@field_validator("repos")
@classmethod
def _validate_repos(cls, v: list[str]) -> list[str]:
out: list[str] = []
for r in v or []:
r = r.strip()
if not r:
continue
if r.count("/") != 1 or not all(r.split("/")):
raise ValueError(f"Each repo must be `owner/name`; got {r!r}")
out.append(r)
return out
@field_validator("item_types")
@classmethod
def _validate_item_types(cls, v: list[str]) -> list[str]:
if not v:
raise ValueError("item_types must not be empty")
return list(dict.fromkeys(v))
@model_validator(mode = "after")
def _ensure_repos(self) -> "GitHubRepoSeedSource":
if not self.repos:
raise ValueError("At least one repo is required")
return self
View on GitHub (pinned to 203007d190)
Solutions
- Set item_types to at least one supported type, e.g. ['issues'] or ['issues', 'pull_requests', 'comments'].
- Check for accidental filtering/merging logic upstream that empties the list before validation.
- If generating config from a template, ensure the item_types key is actually populated.
Example fix
# before item_types = [] # after item_types = ["issues", "pull_requests"]
Defensive patterns
Strategy: validation
Validate before calling
def item_types_valid(item_types: list[str] | None) -> bool:
return bool(item_types) Prevention
- Default item_types in your config template to a known-good value like ['issues'].
- Fail fast in your config loader if a required list is empty after parsing.
When it happens
Trigger: Supplying item_types: [] (or omitting it entirely if no default exists) in the data-designer-github-repo-seed recipe config.
Common situations: A YAML recipe template with a commented-out item_types block that parses to empty; tooling that filters item_types down to nothing; forgetting the field when hand-writing the config.
Related errors
- Each repo must be `owner/name`; got {r!r}
- At least one repo is required
- transformer_quant '{requested_scheme}' is unavailable for '{
- '{Path(gguf_filename or '').name}' is the {picked} partition
- base_precision={base_precision!r} trains in bf16 compute; se
AI-assisted analysis of unslothai/unsloth@203007d190 (2026-08-15).
Data as JSON: /api/errors/036cee9eb6a66e0d.
Report an issue: GitHub.