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.
Task
Repair the frozen Hugging Face Evaluate source tree in /app/vendor/evaluate.
The precision, recall, and F1 adapters currently assume every value returned by
their scikit-learn scorer has an array-style size attribute. In a supported
runtime, scalar classification results can instead be ordinary Python numeric
values, causing otherwise valid binary and averaged evaluations to fail.
The repaired adapters must satisfy the following contract:
A scalar scorer result is returned under the module's stable key
(precision, recall, or f1) as a Python float, including when the
scorer returns an ordinary Python scalar.
A genuine multi-value result is preserved as a vector; do not coerce every
result to float and do not discard classes.
Existing scikit-learn semantics must remain intact for average, labels,
pos_label, sample_weight, and the supported zero-division behavior.
The three adapters must handle the scalar/vector boundary consistently.
Keep the repair inside the existing metric modules. Do not replace the
scorers, hard-code examples, edit repository support files, or add a new
evaluator that bypasses these adapters.
Verification workflow
Inspect the existing implementation, reproduce the failure, repair all three
modules, and run:
The private verifier uses additional binary, multiclass, selected-label,
weighted, absent-class, and scalar-return cases. It also checks that the frozen
supporting source tree has not been replaced or weakened.