You are an agent, your current working directory is /app.
You can use the tools available to you to interact with the computer to assist the user in completing tasks.
The evaluator in /app/vendor/lm-evaluation-harness has a regression in hierarchical metric aggregation. Diagnose the interaction between weight_by_size, point estimates, and reported standard errors, and repair the existing production modules in lm_eval/api/metrics.py and lm_eval/api/group.py.
Your submission must preserve filter selection, nested-group traversal, sample-count metadata, and explicit N/A propagation. Both weighting modes must remain correct: unweighted groups use the independent-estimates standard error for an arithmetic mean, while weighted groups retain the pooled sample-size standard error.
Run python3 /app/run_eval.py after your repair. It must create /app/output.json with schema_version equal to lm-eval-group-output.v1 and a groups object containing the inner, outer, and weighted records produced by the workflow. Keep the implementation offline and do not modify the supplied input, integration driver, frozen regression tests, or other vendored modules.