NousResearch/hermes-agent · error · ValueError
Unknown distribution: {distribution}. Available: {list(list_
Error message
Unknown distribution: {distribution}. Available: {list(list_distributions().keys())} What it means
ValueError from the BatchRunner constructor (batch_runner.py:610): validate_distribution(distribution) rejected the requested sampling distribution, and the message enumerates the valid names via list_distributions(). It fails at construction time so an invalid run never starts.
Source
Thrown at batch_runner.py:610
self.api_key = api_key
self.model = model
self.num_workers = num_workers
self.verbose = verbose
self.ephemeral_system_prompt = ephemeral_system_prompt
self.log_prefix_chars = log_prefix_chars
self.providers_allowed = providers_allowed
self.providers_ignored = providers_ignored
self.providers_order = providers_order
self.provider_sort = provider_sort
self.openrouter_min_coding_score = openrouter_min_coding_score
self.max_tokens = max_tokens
self.reasoning_config = reasoning_config
self.prefill_messages = prefill_messages
self.max_samples = max_samples
# Validate distribution
if not validate_distribution(distribution):
raise ValueError(f"Unknown distribution: {distribution}. Available: {list(list_distributions().keys())}")
# Setup output directory
self.output_dir = Path("data") / run_name
self.output_dir.mkdir(parents=True, exist_ok=True)
# Checkpoint file
self.checkpoint_file = self.output_dir / "checkpoint.json"
# Statistics file
self.stats_file = self.output_dir / "statistics.json"
# Load dataset (and optionally truncate to max_samples)
self.dataset = self._load_dataset()
if self.max_samples and self.max_samples < len(self.dataset):
full_count = len(self.dataset)
self.dataset = self.dataset[:self.max_samples]
print(f"✂️ Truncated dataset from {full_count} to {self.max_samples} samples (--max_samples)")
View on GitHub (pinned to c896c09c42)
Solutions
- Call list_distributions() (its keys are printed in the message) and use one of those exact names.
- Check for stray whitespace/case in the value coming from config or argv before constructing BatchRunner.
- If you need a new distribution, register it with the distribution module so validate_distribution accepts it.
Example fix
# before
runner = BatchRunner(run_name="r1", distribution="unform", ...)
# after
from batch_runner import list_distributions # or the distributions module
valid = list(list_distributions().keys())
assert distribution in valid, f"{distribution!r} not in {valid}"
runner = BatchRunner(run_name="r1", distribution="uniform", ...) Defensive patterns
Strategy: validation
Validate before calling
from batch_runner import list_distributions, validate_distribution
if not validate_distribution(distribution):
raise SystemExit(
f"unknown distribution {distribution!r}; choose one of {sorted(list_distributions())}"
) Try / catch
try:
runner = BatchRunner(run_name=r, distribution=distribution, ...)
except ValueError as exc:
raise SystemExit(str(exc)) from exc # message already lists valid names Prevention
- Validate free-text distribution names against list_distributions() at the CLI boundary.
- Strip/normalize user input before constructing BatchRunner.
- When upgrading versions, re-check the distribution vocabulary your scripts rely on.
When it happens
Trigger: Instantiating BatchRunner with a distribution string that is misspelled, has wrong casing/whitespace, or is from an older/newer version's vocabulary — e.g. 'unform' instead of 'uniform'.
Common situations: CLI args or config files carrying a typo; scripts written against a different hermes version whose distribution names changed; copying an example that references a distribution that was renamed.
Related errors
- Invalid profile name: ${value}
- SSH host is required.
- Model {agent.model} has a context window of {_ctx:,} tokens,
- Malformed custom endpoint URL: {candidate!r}. Run `hermes se
- iron-proxy rejected the new config (validation failed; the r
AI-assisted analysis of NousResearch/hermes-agent@c896c09c42 (2026-08-14).
Data as JSON: /api/errors/1d5fbfc3de2b9dfa.
Report an issue: GitHub.