Skip to content

Use full training labels for holdout classification scoring - #1642

Open
Aryan R. Ganjoo (AryanRG) wants to merge 19 commits into
microsoft:mainfrom
AryanRG:fix-holdout-classification-labels
Open

Aryan R. Ganjoo (AryanRG) wants to merge 19 commits into
microsoft:mainfrom
AryanRG:fix-holdout-classification-labels

Conversation

@AryanRG

@AryanRG Aryan R. Ganjoo (AryanRG) commented Oct 19, 2026 •

Copy link
Copy Markdown

Why are these changes needed?

Holdout classification can finish with infinite log loss and no model when validation data is missing a training class.

Cache the full training class set for built-in holdout metrics and align sampled models' probabilities with it. For local tabular classification, public predict_proba() columns follow classes_, including sparse inputs, disabled preprocessing, and single-class binary and multiclass boosted samples. Non-finite backend output, diagnostic outputs and Spark outputs are preserved. Custom metric callbacks retain their existing label handling.

Regression tests cover missing classes, sampled predictions, failed refits and retraining. The predict_proba() documentation explains class ordering, missing-class columns and differences from raw model output.

Related issue number

None.

Validation

Focused regression and surrounding classification tests, plus repository pre-commit hooks. Full backend and platform matrices have not been run locally.

Checks

  • I've used pre-commit to lint the changes in this PR.
  • I've included any doc changes needed for https://microsoft.github.io/FLAML/. Clarified the predict_proba() class ordering and sampled-model behavior.
  • I've added tests corresponding to the changes introduced in this PR.
  • I've made sure all auto checks have passed.

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

Sampled classifiers can still fail log-loss scoring, and each trial unnecessarily recomputes the full training class set.

2 open issues
What changed in this PR

Updates AutoML holdout classification scoring to use the full training class set when validation or sampled training data omits a class.

Changes:

  • Passes full training targets into trial scoring.
  • Infers holdout labels while preserving explicit overrides and token-classification behavior.
  • Adds regression tests for missing classes, time splits, custom metrics, and sampling.
File Description
test/​automl/​test_holdout_labels.py Adds holdout label regression tests.
flaml/​automl/​state.py Passes full training targets to scoring.
flaml/​automl/​ml.py Infers classification labels for holdout metrics.

Review effort: Balanced

Comment thread flaml/automl/ml.py Resolved
Comment thread flaml/automl/ml.py Resolved

@thinkall Li Jiang (thinkall) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Overall review at efb0e90208c145cd4780bcd2b329b2dfbd7f3106: changes requested. The ordinary missing-validation-class fix works, including independently checked string labels and binary single-class validation. One sampled-scoring P2 remains.

P2 - Align sampled probability columns with the full label set. Using the PR's 3,000-row rare-class fixture, change validation to classes [0, 1], use built-in metric="log_loss", and enable log_training_metric=True. A sampled model has two probability columns, but this change supplies labels [0, 1, 2]. Validation scoring becomes infinite; the training-score call then raises an uncaught ValueError and aborts the public AutoML.fit call. The exact pre-change scoring function, exercised through the same common framework with only the new keyword discarded, completes with loss 0.43185208871658 and model classes [0, 1]; the current call raises the class-count mismatch. This comparison does not claim an entirely old package installation.

Please preserve full-class semantics while aligning probability columns for both validation and training scoring, and add a sampled built-in log-loss test with training metrics enabled. The existing custom-F1 test avoids probability columns. Balanced Copilot independently reported this in the existing discussion; no duplicate inline is being added.

P3 - Preserve the existing string-task helper path. compute_estimator still accepts Union[str, Task]. With task="classification" and an explicit built-in estimator_class, the old helper succeeds but the new guard raises AttributeError: 'str' object has no attribute 'is_classification'. Normalize the supported string form before calling Task methods. This is lower priority: the sole in-repository caller already supplies a Task object, so it is not a second claim that normal public AutoML construction fails.

Validation: all 5 new tests and 4 existing LGBM/LRL1 CV/underlying-model reproducibility cases passed. Independent real public scoring and six isolated label-routing checks also passed; the sampled public regression and string-helper incompatibility were separately reproduced. Approval is withheld for the verified public regression.

Posted by thinkall-agent-auto-reviewer

@AryanRG

Copy link
Copy Markdown
Author

Thanks Li Jiang (@thinkall), I've fixed the sampled log-loss crash and the string-task helper. Labels are now cached per fit, with regression coverage for both validation and training scoring.

@AryanRG

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

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 localized changes have focused regression coverage and no unresolved findings; tests were not executed during this review.

1 open issue
1 resolved since last review

Review effort: Balanced

@thinkall Li Jiang (thinkall) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Overall review at dd0c080b4f40600441ec26f6ccc042f279cfc9d0: changes requested for one remaining P2 in callable probability scoring.

The original built-in log-loss/training-metric failure is fixed, the string-task helper no longer raises the reported attribute error, and the cache refreshes across class-set changes and clears for regression. All 17 targeted repository tests passed. The six independent Medium review-code lenses and driver checks are complete; their original findings/severities are retained separately from this adjudicated public result.

P2 - Preserve the documented custom log-loss workflow as well as the built-in metric. The new aligner runs only in the string-metric branch. The published custom metric still calls log_loss(y, estimator.predict_proba(X), labels=labels). With a sampled two-class estimator and full labels [0, 1, 2], that callback raises the same class/probability-count ValueError and aborts AutoML.fit.

Using the PR's seed-1 fixture (3,000 rows, 40 rare-class examples), validation classes [0, 1], min_sample_size=50, sample=True, auto_augment=False, estimator_list=["lgbm"], and two trials, the exact released-main scoring module in the common framework completes the published callback with finite loss 0.5884176913322716. Current code aborts on the first callback: 50 training rows, estimator classes [0, 1], supplied labels [0, 1, 2]. This reference-module comparison does not claim an entirely old package installation. The latest corrective commit leaves the defect in place even though it predates that small delta; it is introduced by the whole PR versus released main.

Please keep callable probability outputs and their supplied class metadata consistent, preserve this previously valid documented workflow, and add a sampled regression using that recipe. A positive Copilot recommendation and passing built-in-only tests do not resolve the independently reproduced failure.

A lower-priority defensive-copy concern is also confirmed: a callback that mutates the cached label array changes later sequential trials, whereas the prior implementation supplied fresh inferred labels per trial. Keep that P3 hardening concern separate from the public workflow P2 above.

Posted by thinkall-agent-auto-reviewer

Comment thread flaml/automl/ml.py Resolved

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; tests were not executed in this review environment.

1 open issue

Review effort: Balanced

@thinkall Li Jiang (thinkall) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed the correction at 93b8931ae2682918cb68c9e74076540fa4b713e0. The earlier documented-callback P2 and label-mutation concern are fixed: the original public callback now matches released-main reference loss 0.5884176913322716, and repeated array/list/Series callbacks plus a real six-call CV fit preserve label isolation. All 19 targeted tests passed. The Low harness is CLEAN for this localized delta, not a whole-PR approval.

One remaining P2 - Handle a valid one-class LightGBM sample before the probability-width fallback. A fitted LightGBM classifier can have classes_ == [0] yet return two probability columns. _align_log_loss_probabilities returns those columns unchanged because their width differs from len(classes_), but scoring still receives the full three labels. Both sampled trials become infinite loss, and public AutoML.fit returns without a best model.

Reproduction uses 3,000 targets initially zero, with rows 1500 and 2500 set to classes 1 and 2; Gaussian features from RandomState(81); validation labels alternating 0/1; metric="log_loss", estimator_list=["lgbm"], two trials, min_sample_size=50, sample=True, auto_augment=False, retrain_full=False, and log_training_metric=False. The exact released-main scoring module in the common framework returns a trained model with finite loss 17.2693881956416. Current code returns best_loss=inf and model=None. This is a reference-module comparison, not an entire old-package installation.

An observation-only wrapper confirms both current trials have classes [0], labels [0,1,2], and unchanged (300,2) input/output probabilities. An independent zero-filled full-class oracle is finite (18.021826694558573), so preserving the full-class metric need not discard these trials. Handle this supported backend boundary, or ensure appropriate class coverage before evaluation, and add a one-class-sample regression alongside the two-class case.

This is a remaining whole-PR alignment defect, not a claim that the callback guard introduced it. No exception from AutoML.fit is claimed here: the failure is specifically infinite loss and no model. A positive Balanced Copilot recommendation does not resolve that independently reproduced P2, so approval remains withheld.

Posted by thinkall-agent-auto-reviewer

Comment thread flaml/automl/ml.py Resolved

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 unresolved issues; tests were inspected but not executed during review.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@thinkall Li Jiang (thinkall) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Overall reassessment at e3046451d9201ac966a8708631e1a3df2b74b4f5: the reported code fixes are verified; approval is withheld for external gates.

The original one-class public counterexample now returns trained models with finite losses for LightGBM, XGBoost and xgb_limitdepth. Losses match independent dtype-correct full-class sklearn oracles. Raw/wrapped classifiers, numeric/string label placement and input immutability are covered; legacy binary and unknown-backend behavior remain intact. The documented callback again returns its expected finite loss and legacy label inference.

I freshly reread the complete main-to-head production/test changes, not only the last corrective hunk. The scoped Low review-code harness is CLEAN (actual gpt-6.1-sol), 43 targeted tests passed, and full all-file pre-commit passed before the local evidence commit. No confirmed blocking code issue remains in this PR. Both earlier signed P2 discussions are now resolved after reproducing and verifying their fixes; no other reviewer's thread was changed.

Approval is not submitted: applicable check contexts are not all successful; actual Build: in_progress/None.

Posted by thinkall-agent-auto-reviewer

@thinkall Li Jiang (thinkall) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Overall review of the complete current PR at e3046451d9201ac966a8708631e1a3df2b74b4f5: approved.

I freshly reassessed the complete main-to-head production/test changes rather than treating the last small repair as whole-PR clearance. Full-label holdout scoring, per-fit cache reset, explicit overrides, legacy callable behavior and callback isolation remain consistent. Sampled one-class LightGBM and both XGBoost paths now return finite trained models with correct full-class losses, and regular sampled-class mapping preserves class order and raw input probabilities. The earlier independently reproduced P2s are resolved; no blocking code issue remains.

Validated exact-head review-code evidence was reused (Low, actual gpt-6.1-sol), including the prior 43 passing tests and native dtype-correct oracle/callback checks. These are unchanged-source results, not a claim of a new model or test run. My two earlier signed P2 discussions were resolved only after their exact counterexamples passed.

Fresh same-head gates now confirm all discussions resolved, an explicit Balanced Copilot approval recommendation, every applicable check successful, and the actual Build/docs/formatting workflows successfully completed. The conditional gh-release skip is specifically justified by the unchanged workflow's pull_request exclusion.

Posted by thinkall-agent-auto-reviewer

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

Retained sampled models can report finite validation loss while public probability columns remain inconsistent with the advertised class set.

1 open issue

Review effort: Balanced

Comment thread flaml/automl/ml.py Resolved

@thinkall Li Jiang (thinkall) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Review cycle 20261106-2049; exact source f988351954bb79f59d90057b3b8399aef6a6aa29.

Inspected the new author delta from 7be81064b4e4989f7ce86762cb06528f0bdb1d32. Independent review-code review is planned Medium, but remains blocked at its unresolved authenticated CLI prerequisite. No reviewer model ran or new canonical clean artifact was generated. Bounded driver checks below are not a whole-feature clean signoff; original findings and review-scope qualifications are preserved.

Corrective evidence: the four new installed-preprocessing rollback cases plus six related rejected-refit/task-change controls passed 10 cases on each native Windows Python 3.10/3.13 stack. Exact pre-fix controls produced four expected failures and six passes per stack. That confirms the bounded transformer/class restoration, not complete rejected-task rollback.

P2 — changes required: _keep_installed_preprocessing restores the transformers/classes but not the installed task. Independently reproduced Copilot's existing task-restoration finding on both native stacks, for both rejected fit(task='regression', metric=42) and missing-log retrain_from_log(task='regression'). With dense, normally transformed sampled classification, the retained estimator and both transformers are unchanged, classes_ remains [0, 1, 2], but _state.task remains regression and predict_proba changes from (80, 3) to (80, 2). The retained classifier's class-axis contract is still broken. Restore the installed task alongside preprocessing and add transformed task-changing fit/replay controls. The previous source also lost preprocessing/classes; its distinct failure is retained as the counterfactual. No new inline thread is duplicated and the foreign thread is not resolved.

The older inherited seasonal-naive HPO P2 also remains on this exact author head: 60,005 minute observations, period=12001, sample=True, min_sample_size=10000, max_iter=3, time_budget=15 still abort with SeasonalNaive needs at least season=12001 training observations, got 10000. Both native stacks reproduced it. These are real search checks, not max_iter=1 refit proxies.

Fresh external gates: 1 unresolved thread(s); current-head Balanced approval recommendation: no; actual workflow holds: docs:completed/action_required; Code formatting:completed/action_required; Build:completed/action_required. No PR approval, ordinary issue comment, foreign-thread mutation or review dismissal was performed.

Posted by thinkall-agent-auto-reviewer

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

Human assessment is needed to evaluate whether retaining the previous trained model during subsequent fits could increase peak memory enough to exhaust the memory budget.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@thinkall Li Jiang (thinkall) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Review cycle 20261106-2049; follow-up exact source 30e3c72debcdab2045995eef48fbd0b237455682.

The author added this corrective commit after the previously reviewed f988351954bb79f59d90057b3b8399aef6a6aa29. The earlier REQUEST_CHANGES review and its native failure evidence are retained; no historical result was rewritten.

Bounded correction verified: the installed task and estimator type are now restored along with transformers/classes when fit or log replay fails before replacing the model. On each native Windows Python 3.10/3.13 stack, all 13 related rejected-refit/task-change/replay cases pass. The same external new test file against the immediate previous source produces seven expected failures and six passing controls per stack. Separate transformed fit and missing-log replay probes on both native stacks now preserve the installed classifier, both transformers, task multiclass, estimator type classifier, three class labels and the exact (80, 3) probabilities. The earlier two-column/three-label finding is fixed in these tested paths.

Independent review remains incomplete: the author-delta plan remains Medium under review-code, but the authenticated CLI/catalog prerequisite is unresolved; no complementary reviewer or six-lens set ran and no canonical clean artifact was generated. These corrective checks do not clear the whole feature, optional Spark/TFT/GPU or legacy serialization/refit matrix. No PR approval is submitted.

The older inherited seasonal-naive HPO P2 still reproduces on this exact new head on both native stacks: 60,005 minute observations, period 12,001, sampling/minimum sample 10,000, max_iter=3, time_budget=15 abort with SeasonalNaive needs at least season=12001 training observations, got 10000. This is real search, not a max_iter=1 refit proxy.

Fresh gates: 0 unresolved thread(s); explicit current-head Balanced approval recommendation: no. Current-head CI permission was authorized only after fresh guards; actual completion and all applicable contexts remain required before approval. No foreign thread was resolved or historical review dismissed.

Posted by thinkall-agent-auto-reviewer

@AryanRG

Copy link
Copy Markdown
Author

On the peak-memory question from the last Copilot review: it was a real regression from the rollback wrapper. It kept a strong reference to the previously installed model for the whole fit(), so the old model stayed alive during the next search, whereas main frees it once _search() drops it. 525aef1 holds that model through a weak reference instead, and a new test checks it has been released by the time search starts. The rollback behaviour is unchanged.

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 active review issues are identified for the holdout scoring and probability-alignment changes.

No open issues 🎉

Review effort: Balanced

@thinkall Li Jiang (thinkall) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Review cycle 20261107-0154; exact source 525aef100cf3ae6761b0209b2fb08c6358ba645c.

Inspected the corrective author delta from 30e3c72debcdab2045995eef48fbd0b237455682. _keep_installed_preprocessing now holds the installed estimator weakly when possible, allowing search to release it after retirement while retaining rollback only if the same installed model remains active.

Bounded native correction verified: each Windows Python 3.10/3.13 stack passed 17 scoped cases: 14 repository cases for discarded-model release and retained preprocessing/task/class/probability behavior, plus three helper checks for None, collected weak-reference objects and non-weakrefable fallback identity. The same 14 repository cases against the exact previous source produced one expected failure (the retired model remained alive during search) and 13 passing controls per stack. The helper checks are new-current-API evidence, not fabricated preexisting API controls. No full backend/memory or optional Spark/TFT/GPU matrix is claimed; the strong fallback for non-weakrefable objects is intentionally retained.

Independent source review remains incomplete: the author-delta plan is Medium under review-code, but its authenticated CLI/catalog prerequisite remains unresolved. No complementary reviewer or six-lens set ran and no new canonical clean artifact was produced. These corrective checks preserve, not replace, the original feature-level findings and review qualifications. No PR approval is submitted.

The older inherited seasonal-naive HPO P2 still reproduces on this exact head on both native stacks: 60,005 minute observations, period=12001, sample=True, min_sample_size=10000, max_iter=3, time_budget=15 abort with SeasonalNaive needs at least season=12001 training observations, got 10000. These are real search controls, not max_iter=1 refit proxies. The weak-reference correction did not repair it.

Fresh gates: 0 unresolved thread(s); explicit current-head Balanced approval recommendation: yes; actual workflow holds: Build:in_progress/None. CI permission was granted only to freshly guarded current-head runs; permission approval is not validation success. No historical review was dismissed or foreign thread resolved.

Posted by thinkall-agent-auto-reviewer

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

There are no active review issues blocking the holdout scoring and probability-alignment changes.

No open issues 🎉

Review effort: Balanced

@thinkall Li Jiang (thinkall) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed the update from 525aef100cf3ae6761b0209b2fb08c6358ba645c to f925209c53fe9aefae0db4beb287aacb669f70d6. The new commit is the exact conflict-free automatic merge of current main f2427d802ae9ca23c2d99bef970373272afc5df1: only the two CI workflow files changed. The full automatic merge tree and exact parents were verified, with no manual resolution or contributor production/test changes. The main delta pins Python 3.12 for pre-commit and Java 17 for the applicable Ubuntu Spark jobs.

This bounded CI-only update inspection is not a fresh clean whole-feature independent review. Earlier scope findings, test qualifications and unresolved threads remain preserved. The previously reported source findings remain applicable; the CI merge does not correct them.

No PR approval submitted. Whole required review evidence, resolved threads, explicit current-head Balanced Copilot approval and every applicable check/context and actual workflow must all pass. At this guarded readback, non-successful actual runs: [{"name": "Build", "status": "in_progress", "conclusion": null}]. No foreign thread was resolved and no earlier review was dismissed.

Posted by thinkall-agent-auto-reviewer

@thinkall Li Jiang (thinkall) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

P2: the full native class axis mislabels a retained one-class HistGB model.

At f925209c53fe9aefae0db4beb287aacb669f70d6, the new alignment helper special-cases implicit two-column single-class output only for LightGBM/XGBoost. The registered sklearn HistGB backend can produce the same shape, and its raw matrix passes through the width guard.

I reproduced this through actual public AutoML on both native Python 3.10 and 3.13 stacks: 3,000 training labels mostly 20, rare 10 at rows 1500/2500, explicit validation, skip_transform=True, sample=True, minimum sample 50, two iterations, seed 1, no augmentation or full retraining. Each actual HistGB fit sees 50 rows of class 20. The current facade exposes classes_=[10,20] and approximately [1,2e-15], while predict() returns 20; the probability-axis argmax instead reports 10 on 300/300 rows. Exact main exposes the retained [20] axis and has 0 such mismatches.

Please canonicalize HistGB's implicit binary output before matching the full label axis, and cover the higher-valued observed class. This is not a fake-backend or private-state-injection result, and it is distinct from the already-resolved booster cases.

The existing 156 tests pass per native stack, but they miss this backend. All original High evidence and the native counterfactual are committed locally. Seven of eight required reviewer slots have valid results; the remaining lens returned empty output again after the sole allowed targeted recovery, so no clean complete High signoff is claimed. No approval, foreign-thread resolution or prior-review dismissal is submitted.

Posted by thinkall-agent-auto-reviewer

@AryanRG

Copy link
Copy Markdown
Author

Thanks for the repro. I saw the same mismatch with HistGB trained on class 20 only. The fix puts that model’s probability in the class 20 column before scoring or returning it. The new regression checks that predict_proba() agrees with predict() and that the holdout log loss uses the same class order. All 157 tests in the holdout-label suite passed.

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

Single-class probability normalization depends on backend behavior across supported versions, and the reported validation omits the full backend/platform matrix, leaving compatibility contracts for human validation.

No open issues 🎉

Review effort: Balanced

@thinkall Li Jiang (thinkall) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The HistGB single-class normalization correction is verified on both native stacks: 28 selected passes, while the new public HistGB regression fails on the preceding head in each stack. The previously reported native HistGB class-axis mismatch is fixed for these environments.

Two low-priority follow-ups remain in this delta. The balanced validation labels make constant reversed scoring columns produce the same mean log loss; use unequal class counts and assert the explicit [0, 1] probability matrix to pin both scoring and public normalization. Also include HistGB in the public AutoML.predict_proba normalization documentation.

This is a Low correction review, not a replacement for the prior incomplete full High review or backend/platform/version-matrix evidence. No failed reviewer is counted as signoff and no foreign thread or prior review was resolved or dismissed.

Posted by thinkall-agent-auto-reviewer

@AryanRG

Copy link
Copy Markdown
Author

Thanks Li Jiang (@thinkall). I made the validation labels uneven and added an explicit check that every probability row is [0, 1]. The holdout loss now checks against that same expected matrix. A scoring-only column swap passed the old test and failed the updated one.

I also added HistGB to the predict_proba docstring. All 157 holdout-label tests and pre-commit passed.

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 active review issues were identified for the holdout-scoring and probability-alignment changes.

No open issues 🎉

Review effort: Balanced

@thinkall Li Jiang (thinkall) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The correction at e4f9a0a1a849253489712b5d78b092acb7e4134e fixes both earlier followups: HistGB is now documented, and asymmetric labels plus an independent probability oracle detect reversed scoring columns on both native stacks.

One low-priority coverage issue remains in test_histgb_single_class_sample_preserves_probability_labels: replacing the old assertions also removes its automl.predict(X_val) check. A runtime mutation returning encoded zero instead of native label 20 now goes unexercised and passes; the predecessor rejects it. The real, unmodified model still predicts 20 correctly on both heads and stacks, so this is a lost regression assertion, not observed production corruption. Keep both new assertions and add an independent expected-label check for predict.

The focused current and predecessor cases each passed twice. This Low review covers only the doc/test correction. The earlier required whole-PR High review remains incomplete at 7/8 under its exhausted follow-up bound; this delta does not replace that evidence or permit approval.

No contributor source was edited and no review evidence was pushed.

Posted by thinkall-agent-auto-reviewer

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants