镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

fix: RandomForestEstimator honors random_seed config - #1547

Merged
Li Jiang (thinkall) merged 1 commit into
microsoft:mainfrom
immu4989:reproducibility-audit-rf
May 14, 2026
Merged

Li Jiang (thinkall) merged 1 commit into
microsoft:mainfrom
immu4989:reproducibility-audit-rf

Conversation

@immu4989

@immu4989 Imran Ahamed (immu4989) commented May 13, 2026 •

Copy link
Copy Markdown
Contributor

Why are these changes needed?

Migrate RandomForestEstimator from a hardcoded random_state=12032022 in config2params to the random_seed-aware pattern used by the recently fixed estimators (#1364, #1374, #1376, #1541, #1546).

Before this change, callers passing AutoML(random_seed=N).fit(...) would get the same internal RandomForest/ExtraTrees random_state (always 12032022) regardless of N , inconsistent with how CatBoostEstimator, ElasticNetEstimator, SVCEstimator, SGDEstimator, and LRL1Classifier already behave. This brings RandomForestEstimator and the inheriting ExtraTreesEstimator in line with the rest of the audited estimator family.

The default value is preserved (12032022), so the existing reproducibility tests for rf and extra_tree in test/automl/test_classification.py and test/automl/test_regression.py continue to pass unchanged.

Related issue number

Tracking issue: #1540
Pattern reference: #1541 (SGD), #1546 (LRL1)

Test plan

  • pytest test/automl/test_classification.py test/automl/test_regression.py -k "reproducibility and (rf or extra_tree)" — 8/8 pass
  • pre-commit run --files flaml/automl/model.py — all hooks pass
  • CI green on the PR

Checks

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.

2 participants