From da942130e7ad28fbc46d2dc333e29cae395af96a Mon Sep 17 00:00:00 2001 From: Imran Ahamed Date: Wed, 20 May 2026 23:12:22 -0500 Subject: [PATCH] fix: LRL2Classifier honors random_seed config --- flaml/automl/model.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/flaml/automl/model.py b/flaml/automl/model.py index 5b7c08efec..af2e249437 100644 --- a/flaml/automl/model.py +++ b/flaml/automl/model.py @@ -2068,6 +2068,9 @@ def config2params(self, config: dict) -> dict: def __init__(self, task="binary", **config): super().__init__(task, **config) + random_seed = self.params.pop("random_seed", config.get("random_seed", 10242048)) + if "random_state" not in self.params: + self.params["random_state"] = random_seed assert self._task.is_classification(), "LogisticRegression for classification task only" self.estimator_class = LogisticRegression