From 4fc13b50795ef9990a4aa31d8a7de03f47313d29 Mon Sep 17 00:00:00 2001 From: ethanglaser Date: Wed, 9 Sep 2026 19:44:40 -0700 Subject: [PATCH 1/2] Guard n_jobs access after conditional column drop #219 added a block that drops the `n_jobs` column when it is partially NaN, but the pre-existing access below it was left unguarded, so any `--compatibility-mode` report over more than one environment_name raises KeyError: 'n_jobs'. Co-Authored-By: Claude Opus 5 --- sklbench/report/compatibility.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sklbench/report/compatibility.py b/sklbench/report/compatibility.py index b482237b..303c7d14 100644 --- a/sklbench/report/compatibility.py +++ b/sklbench/report/compatibility.py @@ -50,7 +50,7 @@ def transform_results_to_compatible(results: pd.DataFrame): ], ) # auto-assigned `n_jobs` drop for different CPUs - if results["n_jobs"].unique().size > 1: + if "n_jobs" in results.columns and results["n_jobs"].unique().size > 1: results.drop( inplace=True, errors="ignore", From 458a95ccc018f72fba0f218238f82e12b4f4b342 Mon Sep 17 00:00:00 2001 From: ethanglaser Date: Wed, 9 Sep 2026 16:18:27 -0700 Subject: [PATCH 2/2] re-add preview for lasso/enet --- configs/common/sklearn.json | 6 ++++++ configs/regular/linear_model.json | 4 ++-- configs/testing/azure-pipelines-ci.json | 18 +++++++++++++++++- configs/weekly/linear_model.json | 4 ++-- 4 files changed, 27 insertions(+), 5 deletions(-) diff --git a/configs/common/sklearn.json b/configs/common/sklearn.json index bae07393..c50a1907 100644 --- a/configs/common/sklearn.json +++ b/configs/common/sklearn.json @@ -18,6 +18,12 @@ "data": { "format": "dpnp", "order": "C" } } ], + "sklearn-ex[preview,cpu] implementations": { + "algorithm": [ + { "library": "sklearn", "device": "cpu" }, + { "library": "sklearnex.preview", "device": "cpu" } + ] + }, "sklearnex spmd implementation": { "algorithm": { "library": "sklearnex.spmd", diff --git a/configs/regular/linear_model.json b/configs/regular/linear_model.json index 7227ea25..08981e80 100644 --- a/configs/regular/linear_model.json +++ b/configs/regular/linear_model.json @@ -61,10 +61,10 @@ ] }, "sklearn lasso": { - "SETS": ["sklearn-ex[cpu] implementations", "common lasso parameters", "regression datasets"] + "SETS": ["sklearn-ex[preview,cpu] implementations", "common lasso parameters", "regression datasets"] }, "sklearn elasticnet": { - "SETS": ["sklearn-ex[cpu] implementations", "common elasticnet parameters", "regression datasets"] + "SETS": ["sklearn-ex[preview,cpu] implementations", "common elasticnet parameters", "regression datasets"] }, "cuml linear": { "SETS": ["cuml implementation", "common linear parameters", "cuml L2 parameters", "regression datasets"] diff --git a/configs/testing/azure-pipelines-ci.json b/configs/testing/azure-pipelines-ci.json index fa5bf97c..d8ae0cf2 100644 --- a/configs/testing/azure-pipelines-ci.json +++ b/configs/testing/azure-pipelines-ci.json @@ -91,7 +91,7 @@ }, { "algorithm": { - "estimator": ["LinearRegression", "Ridge", "Lasso", "ElasticNet"] + "estimator": ["LinearRegression", "Ridge"] } }, { @@ -116,11 +116,27 @@ } } } + ], + "preview algorithms": [ + { + "algorithm": { + "estimator": ["Lasso", "ElasticNet"] + } + } ] }, "TEMPLATES": { "test": { "SETS": ["sklearn-ex[cpu] implementations", "common parameters", "data formats", "datasets", "algorithms"] + }, + "test preview": { + "SETS": [ + "sklearn-ex[preview,cpu] implementations", + "common parameters", + "data formats", + "datasets", + "preview algorithms" + ] } } } diff --git a/configs/weekly/linear_model.json b/configs/weekly/linear_model.json index 99efd8c8..9c393a93 100644 --- a/configs/weekly/linear_model.json +++ b/configs/weekly/linear_model.json @@ -57,10 +57,10 @@ ] }, "sklearn lasso": { - "SETS": ["sklearn-ex[cpu] implementations", "common lasso parameters", "regression datasets"] + "SETS": ["sklearn-ex[preview,cpu] implementations", "common lasso parameters", "regression datasets"] }, "sklearn elasticnet": { - "SETS": ["sklearn-ex[cpu] implementations", "common elasticnet parameters", "regression datasets"] + "SETS": ["sklearn-ex[preview,cpu] implementations", "common elasticnet parameters", "regression datasets"] }, "cuml linear": { "SETS": ["cuml implementation", "common linear parameters", "cuml L2 parameters", "regression datasets"]