unslothai/unsloth · error · ValueError
At least one repo is required
Error message
At least one repo is required
What it means
Model validator _ensure_repos on GitHubRepoSeedSource requiring at least one valid repo after field validation. Because the repos field validator skips blank/whitespace entries, a list of empty strings (or a list that trims down to nothing) passes field validation but fails here — the seed source must point at some repository.
Source
Thrown at studio/backend/plugins/data-designer-github-repo-seed/src/data_designer_github_repo_seed/config.py:63
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
- Provide at least one non-empty 'owner/name' entry in repos.
- If the value comes from an env var or template, check it actually renders (e.g. echo "${REPO_SLUG}") before running the seed job.
- Remove placeholder empty strings from the list.
Example fix
# before repos = [""] # after repos = ["owner/name"]
Defensive patterns
Strategy: validation
Validate before calling
def has_real_repos(repos: list[str] | None) -> bool:
return bool([r for r in (repos or []) if r.strip()]) Prevention
- Remember blank entries are silently skipped by field validation — the model-level check is what catches all-blank lists.
- Render then inspect generated configs (e.g. yq '.repos') before submitting scrape jobs.
When it happens
Trigger: Passing repos = [''], repos = [' '], or repos = [] in the recipe config. Each blank entry is skipped by _validate_repos, leaving self.repos empty, which trips this model-level check.
Common situations: YAML config where the repos entry was commented out but the list syntax remains; environment-driven configs where the repo variable is empty; templating that renders a placeholder into an empty string.
Related errors
- Each repo must be `owner/name`; got {r!r}
- item_types must not be empty
- 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/4b0c122b958692e3.
Report an issue: GitHub.