From a86e943c29072b9add0fa31fe48006eeba789fa1 Mon Sep 17 00:00:00 2001 From: Olivier Labayle Date: Tue, 27 May 2025 13:32:45 +0100 Subject: [PATCH 1/5] change f_tol to f_reltol --- docs/src/quickstart.md | 4 ++-- src/fit/solvers.jl | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/src/quickstart.md b/docs/src/quickstart.md index 3f55042..7dd24d1 100644 --- a/docs/src/quickstart.md +++ b/docs/src/quickstart.md @@ -155,12 +155,12 @@ Which, in my case, gives `setosa`, `setosa` (correct in both cases). Depending on your data you may want to customize the default solver associated with your model. Since this package uses [Optim](https://julianlsolvers.github.io/Optim.jl/stable/) behind the scene, we can interact directly with this package. -For instance, you may need to be more stringent about the convergence criterion of the LBFGS solver. This can be done by changing the general Optim `f_tol` parameter which defaults to ``10^{-4}``: +For instance, you may need to be more stringent about the convergence criterion of the LBFGS solver. This can be done by changing the general Optim `f_reltol` parameter which defaults to ``10^{-4}``: ```julia import Optim -new_optim_options = Optim.Options(f_tol=1e-6) +new_optim_options = Optim.Options(f_reltol=1e-6) mdl = MultinomialClassifier(solver=LBFGS(optim_options=new_optim_options)) mach = machine(mdl, X, y) fit!(mach) diff --git a/src/fit/solvers.jl b/src/fit/solvers.jl index aaeccb2..ac82de4 100644 --- a/src/fit/solvers.jl +++ b/src/fit/solvers.jl @@ -57,7 +57,7 @@ solver = MLJLinearModels.Newton( ``` """ @with_kw struct Newton{O,S} <: Solver - optim_options::O = Optim.Options(f_tol=1e-4) + optim_options::O = Optim.Options(f_reltol=1e-4) newton_options::S = (; ) end @@ -84,7 +84,7 @@ solver = MLJLinearModels.NewtonCG( ``` """ @with_kw struct NewtonCG{O,S} <: Solver - optim_options::O = Optim.Options(f_tol=1e-4) + optim_options::O = Optim.Options(f_reltol=1e-4) newtoncg_options::S = (; ) end @@ -107,7 +107,7 @@ solver = MLJLinearModels.LBFGS( ``` """ @with_kw struct LBFGS{O,S} <: Solver - optim_options::O = Optim.Options(f_tol=1e-4) + optim_options::O = Optim.Options(f_reltol=1e-4) lbfgs_options::S = (; ) end From 4ab80a143bc6fb674d5e03f09cfed047acdc713b Mon Sep 17 00:00:00 2001 From: Olivier Labayle Date: Tue, 27 May 2025 13:36:42 +0100 Subject: [PATCH 2/5] update actions versions --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8d918c1..f69a883 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,12 +24,12 @@ jobs: arch: - x64 steps: - - uses: actions/checkout@v2 - - uses: julia-actions/setup-julia@v1 + - uses: actions/checkout@v4 + - uses: julia-actions/setup-julia@v2 with: version: ${{ matrix.version }} arch: ${{ matrix.arch }} - - uses: actions/cache@v1 + - uses: actions/cache@v4 env: cache-name: cache-artifacts with: @@ -51,8 +51,8 @@ jobs: name: Documentation runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: julia-actions/setup-julia@v1 + - uses: actions/checkout@v4 + - uses: julia-actions/setup-julia@v2 with: version: '1' - run: | From daf480583bead78b3db8c63e8c763f24419e41ee Mon Sep 17 00:00:00 2001 From: Olivier Labayle Date: Tue, 27 May 2025 13:43:24 +0100 Subject: [PATCH 3/5] try R_HOME special --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f69a883..ecfdd46 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,6 +43,7 @@ jobs: - uses: julia-actions/julia-runtest@v1 env: RUN_COMPARISONS: "false" + R_HOME: "*" - uses: julia-actions/julia-processcoverage@v1 - uses: codecov/codecov-action@v1 with: From 0744fc4e21270a069392a69d072747e351b8e174 Mon Sep 17 00:00:00 2001 From: Olivier Labayle Date: Tue, 27 May 2025 13:51:35 +0100 Subject: [PATCH 4/5] update project version --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index b4773b6..17c63cb 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "MLJLinearModels" uuid = "6ee0df7b-362f-4a72-a706-9e79364fb692" authors = ["Thibaut Lienart "] -version = "0.10.0" +version = "0.10.1" [deps] DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" From c96879d4ca5813c4bbd5bdcebd966dce30be8317 Mon Sep 17 00:00:00 2001 From: Thibaut Lienart Date: Thu, 29 May 2025 09:09:09 +0200 Subject: [PATCH 5/5] Update ci.yml Co-authored-by: Anthony Blaom, PhD --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ecfdd46..2121b2a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,7 @@ jobs: with: version: ${{ matrix.version }} arch: ${{ matrix.arch }} - - uses: actions/cache@v4 + - uses: julia-actions/cache@v2 env: cache-name: cache-artifacts with: