{"record":{"id":"b63147d92459fcb2","repo":"p-e-w/heretic","slug":"no-scorers-configured-set-scorers-in-config-tom","errorCode":null,"errorMessage":"No scorers configured. Set 'scorers' in config.toml","messagePattern":"No scorers configured\\. Set 'scorers' in config\\.toml","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"critical","filePath":"src/heretic/evaluator.py","lineNumber":54,"sourceCode":"        self.model = model\n        self._scorer_entries: list[ScorerEntry] = []\n\n        print()\n        print(\"Loading and initializing scorers...\")\n        self._load_and_init_scorers()\n\n        # Establish baseline scores (pre-abliteration).\n        self.baseline_scores = self.get_baseline_scores()\n        self._print_baseline()\n\n    def _load_and_init_scorers(self) -> None:\n        \"\"\"\n        Load and instantiate all configured scorer plugins,\n        then runs their initialization hooks.\n        \"\"\"\n        scorer_configs = self.settings.scorers\n        if not scorer_configs:\n            raise ValueError(\"No scorers configured. Set 'scorers' in config.toml\")\n\n        scorer_keys: set[str] = set()\n\n        # Resolve plugin classes from names and validate.\n        for config in scorer_configs:\n            scorer_cls = load_plugin(name=config.plugin, base_class=Scorer)\n            scorer_cls.validate_contract()\n\n            print(\n                f\"* Loaded: [bold]{scorer_cls.__name__} {'- ' + config.instance_name if config.instance_name else ''}[/bold]\"\n            )\n\n            # Instantiate scorers.\n            instance_name = config.instance_name or None\n\n            raw_settings = self._get_scorer_settings_raw(\n                scorer_cls=scorer_cls, instance_name=instance_name\n            )","sourceCodeStart":36,"sourceCodeEnd":72,"githubUrl":"https://github.com/p-e-w/heretic/blob/bedb94ef117a271532ac2058447fbc165d5051bd/src/heretic/evaluator.py#L36-L72","documentation":"The Evaluator requires at least one scorer plugin to judge model outputs during evaluation. If settings.scorers is empty or missing, evaluation would be meaningless, so the constructor raises immediately with guidance to set the 'scorers' table in config.toml.","triggerScenarios":"Constructing Evaluator(settings) where settings.scorers is None or an empty list — e.g. config.toml has no [scorers] section, or scorers was explicitly set to [].","commonSituations":"New projects started from a minimal config.toml, config files where the [scorers] section was commented out, or programmatic Settings() construction that omitted the scorers field.","solutions":["Add a [scorers] section to config.toml with at least one scorer entry specifying its plugin","If using Settings programmatically, pass scorers=[ScorerConfig(plugin=\"...\")].","Verify you are loading the intended config file (check config path/working directory)"],"exampleFix":"// before (config.toml)\n# no [scorers] section\n// after (config.toml)\n[[scorers]]\nplugin = \"refusal\"\n","handlingStrategy":"validation","validationCode":"if not getattr(settings, \"scorers\", None):\n    raise ValueError(\"Configure at least one [[scorers]] entry in config.toml before creating an Evaluator\")","typeGuard":null,"tryCatchPattern":"try:\n    evaluator = Evaluator(settings)\nexcept ValueError as e:\n    if \"No scorers configured\" in str(e):\n        settings.scorers = [ScorerConfig(plugin=\"refusal\")]\n        evaluator = Evaluator(settings)\n    else:\n        raise","preventionTips":["Start from a config.toml template that includes [scorers]","Validate config completeness at startup before heavy setup","Log which config file was loaded to catch wrong-path mistakes"],"tags":["config","missing-config","evaluation"],"backgroundTag":"missing-required-config","analyzedSha":"bedb94ef117a271532ac2058447fbc165d5051bd","analyzedAt":"2026-08-29T08:38:06.692Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}