{"record":{"id":"1d5fbfc3de2b9dfa","repo":"NousResearch/hermes-agent","slug":"unknown-distribution-distribution-available","errorCode":null,"errorMessage":"Unknown distribution: {distribution}. Available: {list(list_distributions().keys())}","messagePattern":"Unknown distribution: (.+?)\\. Available: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"batch_runner.py","lineNumber":610,"sourceCode":"        self.api_key = api_key\n        self.model = model\n        self.num_workers = num_workers\n        self.verbose = verbose\n        self.ephemeral_system_prompt = ephemeral_system_prompt\n        self.log_prefix_chars = log_prefix_chars\n        self.providers_allowed = providers_allowed\n        self.providers_ignored = providers_ignored\n        self.providers_order = providers_order\n        self.provider_sort = provider_sort\n        self.openrouter_min_coding_score = openrouter_min_coding_score\n        self.max_tokens = max_tokens\n        self.reasoning_config = reasoning_config\n        self.prefill_messages = prefill_messages\n        self.max_samples = max_samples\n        \n        # Validate distribution\n        if not validate_distribution(distribution):\n            raise ValueError(f\"Unknown distribution: {distribution}. Available: {list(list_distributions().keys())}\")\n        \n        # Setup output directory\n        self.output_dir = Path(\"data\") / run_name\n        self.output_dir.mkdir(parents=True, exist_ok=True)\n        \n        # Checkpoint file\n        self.checkpoint_file = self.output_dir / \"checkpoint.json\"\n        \n        # Statistics file\n        self.stats_file = self.output_dir / \"statistics.json\"\n        \n        # Load dataset (and optionally truncate to max_samples)\n        self.dataset = self._load_dataset()\n        if self.max_samples and self.max_samples < len(self.dataset):\n            full_count = len(self.dataset)\n            self.dataset = self.dataset[:self.max_samples]\n            print(f\"✂️  Truncated dataset from {full_count} to {self.max_samples} samples (--max_samples)\")\n        ","sourceCodeStart":592,"sourceCodeEnd":628,"githubUrl":"https://github.com/NousResearch/hermes-agent/blob/c896c09c42910c584c4c7d2325b58c14713ea42c/batch_runner.py#L592-L628","documentation":"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.","triggerScenarios":"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'.","commonSituations":"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.","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."],"exampleFix":"# before\nrunner = BatchRunner(run_name=\"r1\", distribution=\"unform\", ...)\n\n# after\nfrom batch_runner import list_distributions  # or the distributions module\nvalid = list(list_distributions().keys())\nassert distribution in valid, f\"{distribution!r} not in {valid}\"\nrunner = BatchRunner(run_name=\"r1\", distribution=\"uniform\", ...)","handlingStrategy":"validation","validationCode":"from batch_runner import list_distributions, validate_distribution\n\nif not validate_distribution(distribution):\n    raise SystemExit(\n        f\"unknown distribution {distribution!r}; choose one of {sorted(list_distributions())}\"\n    )","typeGuard":null,"tryCatchPattern":"try:\n    runner = BatchRunner(run_name=r, distribution=distribution, ...)\nexcept ValueError as exc:\n    raise SystemExit(str(exc)) from exc  # message already lists valid names","preventionTips":["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."],"tags":["batch","validation","config","cli"],"backgroundTag":null,"analyzedSha":"c896c09c42910c584c4c7d2325b58c14713ea42c","analyzedAt":"2026-08-14T17:18:01.089Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}