Class: SkillBench::Services::BatchRunnerService
- Inherits:
-
Object
- Object
- SkillBench::Services::BatchRunnerService
- Defined in:
- lib/skill_bench/services/batch_runner_service.rb
Overview
Orchestrates running many evals in a single batch.
Discovers every eval under a target directory and runs RunnerService over each, returning an aggregate envelope with per-eval results and a pass/fail summary.
Discovery reuses Runner.discover_task_dirs but never routes through the deprecated Task::Evaluator: each eval is executed by the supported RunnerService.
Constant Summary collapse
- DEFAULT_EVALS_DIR =
Default directory scanned for evals when none is supplied.
'evals'- DEFAULT_THREADS =
Default batch-level thread count.
Each RunnerService.call already runs its baseline and context agents concurrently (#26), so this is kept modest to bound nested thread usage (batch threads x per-eval threads).
2
Class Method Summary collapse
-
.call(skill_names:, evals_dir: DEFAULT_EVALS_DIR, pack: nil, registry_manifest: nil, threads: DEFAULT_THREADS) ⇒ Hash
Runs every eval discovered under
evals_dir.
Instance Method Summary collapse
-
#call ⇒ Hash
Discovers the target evals and runs each through RunnerService.
-
#initialize(skill_names:, evals_dir:, pack:, registry_manifest:, threads:) ⇒ BatchRunnerService
constructor
A new instance of BatchRunnerService.
Constructor Details
#initialize(skill_names:, evals_dir:, pack:, registry_manifest:, threads:) ⇒ BatchRunnerService
Returns a new instance of BatchRunnerService.
55 56 57 58 59 60 61 |
# File 'lib/skill_bench/services/batch_runner_service.rb', line 55 def initialize(skill_names:, evals_dir:, pack:, registry_manifest:, threads:) @skill_names = skill_names @evals_dir = evals_dir @pack = pack @registry_manifest = registry_manifest @threads = threads end |
Class Method Details
.call(skill_names:, evals_dir: DEFAULT_EVALS_DIR, pack: nil, registry_manifest: nil, threads: DEFAULT_THREADS) ⇒ Hash
Runs every eval discovered under evals_dir.
40 41 42 43 44 45 46 47 48 |
# File 'lib/skill_bench/services/batch_runner_service.rb', line 40 def self.call(skill_names:, evals_dir: DEFAULT_EVALS_DIR, pack: nil, registry_manifest: nil, threads: DEFAULT_THREADS) new( skill_names: skill_names, evals_dir: evals_dir, pack: pack, registry_manifest: registry_manifest, threads: threads ).call end |
Instance Method Details
#call ⇒ Hash
Discovers the target evals and runs each through RunnerService.
67 68 69 70 71 72 73 |
# File 'lib/skill_bench/services/batch_runner_service.rb', line 67 def call eval_dirs = discover_eval_dirs raise ArgumentError, "No evals found under #{evals_dir}" if eval_dirs.empty? results = run_all(eval_dirs) { results: results, summary: summarize(results) } end |