From 4935a667cb925229cd64806db7c7fbccf7da87ef Mon Sep 17 00:00:00 2001 From: Tyler Thomas Date: Wed, 22 May 2024 11:27:52 -0700 Subject: [PATCH 1/4] Bump CI --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b932f45..0d97796 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,11 +30,11 @@ jobs: continue-on-error: ${{ matrix.version == 'nightly' }} steps: - uses: actions/checkout@v4 - - uses: julia-actions/setup-julia@v1 + - uses: julia-actions/setup-julia@v2 with: version: ${{ matrix.version }} arch: ${{ matrix.arch }} - - uses: julia-actions/cache@v1 + - uses: julia-actions/cache@v2 - name: "Replace julia libstdcxx ubuntu + julia v1.6" if: ${{ matrix.version == '1.6' && matrix.os == 'ubuntu-latest' }} # The following is needed for Julia <=1.8.3 on Linux OS From 69b847fec983133c369f7cc5596a417a8e65c2f9 Mon Sep 17 00:00:00 2001 From: Tyler Thomas Date: Wed, 22 May 2024 11:39:50 -0700 Subject: [PATCH 2/4] Bump scikit-learn, add todo's for future scikit-learn versions --- CondaPkg.toml | 2 +- src/models/ensemble.jl | 1 + src/models/linear-classifiers.jl | 2 ++ src/models/linear-regressors.jl | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CondaPkg.toml b/CondaPkg.toml index f10a04a..a0ed2ea 100644 --- a/CondaPkg.toml +++ b/CondaPkg.toml @@ -1,4 +1,4 @@ [deps.scikit-learn] channel = "conda-forge" -version = ">=1.4, <1.5" +version = ">=1.4, <1.6" diff --git a/src/models/ensemble.jl b/src/models/ensemble.jl index 569029f..28abe27 100644 --- a/src/models/ensemble.jl +++ b/src/models/ensemble.jl @@ -36,6 +36,7 @@ const AdaBoostClassifier_ = sken(:AdaBoostClassifier) estimator::Any = nothing n_estimators::Int = 50::(_ > 0) learning_rate::Float64 = 1.0::(_ > 0) + #TODO: Remove `SAMME.R` in v1.6 algorithm::String = "SAMME.R"::(_ in ("SAMME", "SAMME.R")) random_state::Any = nothing end diff --git a/src/models/linear-classifiers.jl b/src/models/linear-classifiers.jl index 30d3d44..6a2997f 100644 --- a/src/models/linear-classifiers.jl +++ b/src/models/linear-classifiers.jl @@ -10,6 +10,7 @@ const LogisticClassifier_ = sklm(:LogisticRegression) random_state::Any = nothing solver::String = "lbfgs"::(_ in ("lbfgs", "newton-cg", "liblinear", "sag", "saga")) max_iter::Int = 100::(_ > 0) + #TODO: Remove `multi_class` in v1.7+ multi_class::String = "auto"::(_ in ("ovr", "multinomial", "auto")) verbose::Int = 0 warm_start::Bool = false @@ -157,6 +158,7 @@ const RidgeCVClassifier_ = sklm(:RidgeClassifierCV) scoring::Any = nothing cv::Int = 5 class_weight::Any = nothing + #TODO: Use `store_cv_results` in v1.6+ store_cv_values::Bool = false end MMI.fitted_params(m::RidgeCVClassifier, (f, _, _)) = ( diff --git a/src/models/linear-regressors.jl b/src/models/linear-regressors.jl index f8b6dc8..dc6a5e3 100644 --- a/src/models/linear-regressors.jl +++ b/src/models/linear-regressors.jl @@ -406,6 +406,7 @@ const RidgeCVRegressor_ = sklm(:RidgeCV) scoring::Any = nothing cv::Any = 5 gcv_mode::Option{String} = nothing::(_ === nothing || _ in ("auto","svd","eigen")) + #TODO: Use `store_cv_results` in v1.6+ store_cv_values::Bool = false end MMI.fitted_params(model::RidgeCVRegressor, (fitresult, _, _)) = ( From 4d7c2d03e6f0b179cba8f1288cc6c114bdf57583 Mon Sep 17 00:00:00 2001 From: Tyler Thomas Date: Wed, 22 May 2024 11:40:44 -0700 Subject: [PATCH 3/4] Fix bounds for problematic julia versions in the README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 58c689a..fffe7d5 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Repository implementing MLJ interface for [![Coverage](http://codecov.io/github/JuliaAI/MLJScikitLearnInterface.jl/coverage.svg?branch=master)](https://codecov.io/gh/JuliaAI/MLJScikitLearnInterface.jl) # Known Issue -If you are using Linux and Julia version `>=1.8.3`, the `libstdcxx` version is not compatible with `scikit-learn>=1.2`. To get around this issue, you have to swap out the `libstdcxx` version that is loaded in with Julia. There is two methods to do this. The first is to build an environment with `Conda.jl` and use that as your `LD_LIBRARY_PATH`. +If you are using Linux and Julia version `<=1.8.3`, the `libstdcxx` version is not compatible with `scikit-learn>=1.2`. To get around this issue, you have to swap out the `libstdcxx` version that is loaded in with Julia. There is two methods to do this. The first is to build an environment with `Conda.jl` and use that as your `LD_LIBRARY_PATH`. ```bash ROOT_ENV=`julia -e "using Conda; print(Conda.ROOTENV)"` export LD_LIBRARY_PATH=$ROOT_ENV"/lib":$LD_LIBRARY_PATH From 361bedff8f92073fa949237ea9a5c051382863ee Mon Sep 17 00:00:00 2001 From: Tyler Thomas Date: Wed, 22 May 2024 11:41:02 -0700 Subject: [PATCH 4/4] Bump MLJScikitLearnInterface to v0.7 --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 5126fe9..467f334 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "MLJScikitLearnInterface" uuid = "5ae90465-5518-4432-b9d2-8a1def2f0cab" authors = ["Thibaut Lienart, Anthony Blaom"] -version = "0.6.1" +version = "0.7.0" [deps] MLJModelInterface = "e80e1ace-859a-464e-9ed9-23947d8ae3ea"