Skip to content

Report held-out evaluation during training - #137

Merged
jeffhandley merged 15 commits into
mainfrom
matouskozak-held-out-evaluation-foundation
Oct 24, 2026
Merged

jeffhandley merged 15 commits into
mainfrom
matouskozak-held-out-evaluation-foundation

Conversation

@matouskozak

@matouskozak matouskozak commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Keep Test as a historical recheck and warn that its data may overlap with training. During training, report held-out accuracy and log loss plus thresholds, precision, coverage, and accepted counts for 60%, 70%, 80%, 90%, and 95% precision targets.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: b552cb76-4727-490c-85d7-461e7dda1392
Copilot AI balanced review requested due to automatic review settings October 19, 2026 15:24
@github-actions github-actions Bot added the area-Workflows Related to the issue-labeler reusable workflows label Oct 19, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

Static review identified no blocking issues; builds and tests were not executed.

No open issues 🎉

What changed in this PR

Adds saved held-out evaluation to the training and testing tools, enabling offline threshold replay while preserving historical testing.

Changes:

  • Saves label-free scores with model and dataset provenance.
  • Adds validated offline evaluation and separate score caches.
  • Adds regression tests and documents usage and limitations.
File Description
train/​action.yml Saves and verifies separate evaluation caches.
test/​action.yml Adds held-out evaluation mode.
README.md Documents offline evaluation and limitations.
IssueLabeler/​tests/​Evaluation.Tests/​TrainingEvaluationTests.cs Tests training integration and offline CLI behavior.
IssueLabeler/​tests/​Evaluation.Tests/​ThresholdEvaluationTests.cs Tests artifact validation and threshold metrics.
IssueLabeler/​tests/​Evaluation.Tests/​Evaluation.Tests.csproj Adds the evaluation test project.
IssueLabeler/​src/​Trainer/​Trainer.cs Saves held-out evidence after training.
IssueLabeler/​src/​Trainer/​HeldOutEvaluation.cs Collects label-free scores from reloaded models.
IssueLabeler/​src/​Tester/​Tester.cs Reports offline metrics and distinguishes historical testing.
IssueLabeler/​src/​Tester/​Args.cs Validates offline evaluation arguments.
IssueLabeler/​src/​Common/​ThresholdEvaluation.cs Computes threshold and per-label metrics.
IssueLabeler/​src/​Common/​EvaluationArtifact.cs Stores and validates scores and provenance.
IssueLabeler/​src/​Common/​ArgUtils.cs Adds reusable argument-parsing overloads.
IssueLabeler/​IssueLabeler.sln Registers evaluation tests.
IssueLabeler/​Directory.Packages.props Adjusts test SDK version handling for MSTest SDK.

Review effort: Balanced

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: b552cb76-4727-490c-85d7-461e7dda1392
Copilot AI balanced review requested due to automatic review settings October 19, 2026 16:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Concurrent training can publish mismatched model and score caches while reporting success.

1 open issue

Review effort: Balanced

Comment thread train/action.yml Outdated
Replace saved-score artifacts with the selected raw held-out dataset implementation and its regression coverage. Matches source tree from 55c63cc362c13bfd28721dd6cd795426332c7893.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: b552cb76-4727-490c-85d7-461e7dda1392
Copilot AI balanced review requested due to automatic review settings October 20, 2026 09:05
@matouskozak matouskozak changed the title Add saved held-out model evaluation Evaluate models against their saved held-out data Oct 20, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Failed retraining can overwrite an existing model’s held-out dataset, leaving a mismatched pair that invalidates subsequent evaluation.

1 open issue
1 resolved since last review

Review effort: Balanced

Comment thread IssueLabeler/src/Trainer/Trainer.cs Outdated
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: b552cb76-4727-490c-85d7-461e7dda1392
Copilot AI balanced review requested due to automatic review settings October 20, 2026 09:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Failed retraining can leave an existing model paired with a replacement held-out dataset, compromising evaluation correctness.

1 open issue

Review effort: Balanced

Store one split manifest per downloaded dataset and bind models to its fingerprint. Remove separate held-out data caches and retention; evaluation requires the original dataset while inference remains model-only.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: b552cb76-4727-490c-85d7-461e7dda1392
Copilot AI balanced review requested due to automatic review settings October 20, 2026 10:28
@matouskozak matouskozak changed the title Evaluate models against their saved held-out data Evaluate models using a fixed dataset split Oct 20, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The workflow’s legacy action pins produce caches incompatible with its new manifest-aware restores.

2 open issues

Review effort: Balanced

Comment thread .github/workflows/labeler-train.yml Outdated
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: b552cb76-4727-490c-85d7-461e7dda1392
Copilot AI balanced review requested due to automatic review settings October 20, 2026 11:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The breaking dataset/model compatibility contract requires human validation of coordinated action rollout and dataset/model regeneration.

1 open issue
1 resolved since last review

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 21, 2026 08:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The metrics report incorrectly claims to include all held-out items despite excluding unseen labels.

2 open issues
1 previously missed issue

In code that hasn't changed since last review

Medium severity Clarify metrics exclude holdout-only labels and align report assertions

IssueLabeler/​src/​Trainer/​Trainer.cs:120

A label that occurs only in the holdout is mapped to key 0 because MapValueToKey is fitted on split.TrainSet. ML.NET's evaluator skips these unknown-label rows, so these metrics can report perfect accuracy even when predictions for unseen labels are wrong. Clarify that these metrics exclude labels absent from training, and change the MicroAccuracy description to refer to evaluated items. The precision-target table includes those rows, so distinguish the two populations and update the report-text assertions in TrainerTests.cs.

Review effort: Balanced

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 85a78a8a-a3e4-4bc9-8f73-789850210855
Copilot AI balanced review requested due to automatic review settings October 21, 2026 09:04
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 85a78a8a-a3e4-4bc9-8f73-789850210855

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

Static review identified no blocking issues in evaluation, reporting, or test integration; builds and tests were not run.

2 open issues

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 21, 2026 09:08
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 85a78a8a-a3e4-4bc9-8f73-789850210855

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The changes match the requested behavior, with relevant tests and no identified blocking issues.

2 open issues

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 21, 2026 09:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No blocking issues remain from source review; builds and tests were not run.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 85a78a8a-a3e4-4bc9-8f73-789850210855
Copilot AI balanced review requested due to automatic review settings October 21, 2026 09:28
@matouskozak
matouskozak marked this pull request as ready for review October 21, 2026 09:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No blocking issues were identified in evaluation calculations, reporting, warnings, or test integration.

No open issues 🎉

Review effort: Balanced

Comment thread IssueLabeler/src/Trainer/Trainer.cs Outdated
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: b552cb76-4727-490c-85d7-461e7dda1392
Copilot AI balanced review requested due to automatic review settings October 22, 2026 07:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

Static review found no blocking issues in evaluation, reporting, or test integration; tests were not executed.

No open issues 🎉

Review effort: Balanced

@matouskozak
matouskozak removed this pull request from stack #139 October 22, 2026 07:41
@jeffhandley
jeffhandley merged commit 520fee5 into main Oct 24, 2026
3 checks passed
@jeffhandley
jeffhandley deleted the matouskozak-held-out-evaluation-foundation branch October 24, 2026 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-Workflows Related to the issue-labeler reusable workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants