diff --git a/flaml/automl/model.py b/flaml/automl/model.py index 8ddb4b2501..c5276e1572 100644 --- a/flaml/automl/model.py +++ b/flaml/automl/model.py @@ -2032,6 +2032,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 diff --git a/test/automl/test_classification.py b/test/automl/test_classification.py index 1ee22094fc..f847b4d4fc 100644 --- a/test/automl/test_classification.py +++ b/test/automl/test_classification.py @@ -432,7 +432,7 @@ def test_sparse_matrix_lr(self): "histgb", "kneighbor", "lgbm", - # "lrl1", + "lrl1", "lrl2", "rf", "sgd", @@ -495,7 +495,7 @@ def test_reproducibility_of_classification_models(estimator: str): "histgb", "kneighbor", "lgbm", - # "lrl1", + "lrl1", "lrl2", "svc", "rf",