Repository navigation
fix: pass the tuned epsilon to the SGD losses that use it - #1696
Anish Mehta (anishmehta24) wants to merge 1 commit into
Conversation
Signed-off-by: Anish Mehta <mehtaanish111@gmail.com>
There was a problem hiding this comment.
🟢 Approval recommended
No actionable issues were found in the reviewed changes.
No open issues 🎉
What changed in this PR
Fixes FLAML’s SGD parameter handling so supported regression losses receive the tuned epsilon instead of using sklearn’s default.
Changes:
- Retains
epsilonforhuber,epsilon_insensitive, andsquared_epsilon_insensitive; removes it for other losses. - Adds parameterized tests confirming all three regression losses retain
epsilon=0.01after fitting.
| File | Description |
|---|---|
test/automl/test_model.py |
Adds regression coverage for tuned epsilon values. |
flaml/automl/model.py |
Corrects loss-based epsilon filtering in SGDEstimator. |
Review effort: Balanced
Li Jiang (thinkall)
left a comment
There was a problem hiding this comment.
Whole current PR reviewed at 6108ff137811654338d8fe4cfc2b17c83c7a6cd2.
The complete SGD epsilon-routing correction is clean in this review. The converter retains the configured epsilon for huber, epsilon_insensitive and squared_epsilon_insensitive, and removes it for losses that do not use it. Real estimator-fit tests pass all three affected losses on both pinned stacks (six checks), asserting the fitted model's epsilon is0.01; all six cases fail against the predecessor's default0.1. No contributor source was changed.
The current Build is not successful: the Ray2.4/Python3.10 compatibility job segfaulted with exit139 while running test/fabric/test_ray_reporting.py. Its relationship to this parameter-routing change is not established; it blocks approval regardless. No workflow was rerun automatically.
Independent Low coverage1/1 at maximum reasoning; the original CLEAN outcome is retained. Current-head CI and peer/thread gates are separate approval requirements.
All-files hooks passed for the retained local evidence commit. No contributor source was edited and no review outputs were pushed here.
At 2026-12-04T12:12:30.948707+00:00, checks=FAILURE; actual current-head workflows: Code formatting=completed/success; docs=completed/success; Build=completed/failure. Balanced Copilot approval recommendation=True; unresolved threads=0. Workflow permission is not CI success.
Posted by thinkall-agent-auto-reviewer
|
The Ray 2.4 job segfaulted inside pandas read_csv called by ray.tune in test/fabric/test_ray_reporting.py, which this PR does not touch, and the same job passed on the other recent PR runs. Could someone rerun it? I don't have permission to rerun jobs here. |
Why are these changes needed?
SGDEstimatortunesepsilon, butconfig2paramskeeps it only forloss="modified_huber", which does not use it. sklearn usesepsilononly forhuber,epsilon_insensitiveandsquared_epsilon_insensitive, the regression losses in the search space. So for those losses the tuned value was dropped and every trial ran with the default 0.1:epsilonis now kept for those three losses and dropped for the rest. Classification is unchanged, since sklearn ignoredepsilonforlog_lossandmodified_huber.Related issue number
None found.
Checks
test_sgd_regression_uses_tuned_epsilonintest/automl/test_model.pyfits the three losses withepsilon=0.01; it fails on main and passes now. The sgd reproducibility tests intest_regression.pyandtest_classification.pyandTestExtraModel::test_sgdalso pass.