Repository navigation
test: validate precision, recall and F1 against scikit-learn (SKEEP-009 phases 1 and 2) - #1562
Merged
Merged
Conversation
GroundTruthMetricCase, toMetricCase() and a MetricExecutor with Accuracy registered. GroundTruthLoader keeps string op.* values. New TS-008 integration test compares with scikit-learn fixtures; hand-built cases test the path without Docker. Refs #1223 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…09 phases 1 and 2) MetricExecutor registers precision, recall and f1 (op.average) and gains validate(): value against the reference plus the reset() contract. GroundTruthValidator.validateMetric; validate() points a metric case to it. The TS-008 test runs every case and requires a multi-batch case per metric. The ground-truth workflow also starts on changes under nn/metrics/. The metrics how-to no longer says ground truth is pending. Refs #1223 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
📖 Documentation Preview The documentation has been built successfully for this PR. Generated Files:
Artifacts:
This comment will be updated automatically when the PR is updated. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Phases 1 and 2 of SKEEP-009. This branch is stacked on #1561 (the spike) and contains its commit; merging this PR alone delivers both.
MetricExecutor:precision,recallandf1registered (op.average=macro/micro/binary, required for them), plusvalidate(case, tolerance = 1e-6). It compares the value with the reference and checks the stateful contract: afterreset()the metric returns what a new instance returns, and the same batches give the same value again.GroundTruthValidator.validateMetric(testCase, ctx, tolerance);validate()on a metric case fails with a message that points to it.TS-008integration test: every case goes throughvalidateMetric, and each of accuracy, precision, recall and f1 must have a multi-batch case.ground-truth.yml: a change undernn/metrics/starts the workflow.Status: Draftis left for a maintainer to change.MetricExecutorTest: 14 hand-built cases, no Docker needed.One difference from the SKEEP sketch:
GroundTruthValidatorhas no execution context, sovalidateMetrictakes one.Depends on
SKaiNET-developers/skainet-ground-truth#5 (the 30 precision / recall / F1 fixtures). Merge that first; the
Ground Truth Validationjob here is red until then, because the test requires a multi-batch case for every metric.Test
With fixtures generated locally from that branch: 32 of 32
TS-008cases pass (largest difference about3e-8, from the F32 expected value);MetricExecutorTest14 of 14;GroundTruthValidationTest13 of 13. The older suites were run against the spike image before (TS-001, TS-003, TS-006 pass). The docs site builds with no new warning.Refs #1223
🤖 Generated with Claude Code