update TRUNK subsolver usage to new keyword API and add note on allowed subsolvers and tolerances#146
Closed
arnavk23 wants to merge 0 commit intoJuliaSmoothOptimizers:mainfrom
Closed
update TRUNK subsolver usage to new keyword API and add note on allowed subsolvers and tolerances#146arnavk23 wants to merge 0 commit intoJuliaSmoothOptimizers:mainfrom
arnavk23 wants to merge 0 commit intoJuliaSmoothOptimizers:mainfrom
Conversation
Contributor
Author
|
@tmigot please review this pr. |
tmigot
requested changes
Oct 18, 2025
Member
tmigot
left a comment
There was a problem hiding this comment.
The migration note is not needed because the package version is mentioned in the tutorial, see https://jso.dev/tutorials/introduction-to-jsosolvers/.
Contributor
Author
|
@tmigot please see the checks below. |
Contributor
Author
Member
|
@arnavk23 it's not need to ping me every time something happen, I receive notifications already. Can you make this 2 separate PR? it looks like the deploymenent CI is struggling modifying 2 tutorials at the same time |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates to tutorial
Checked the repo for outdated patterns:
No occurrences of subsolver_type, CglsSolver, CrlsSolver, LsqrSolver, or LsmrSolver found.
Other tutorials use trunk without specifying a subsolver (or with modern kwargs), so no edits required.
Compat review:
Project.toml already has JSOSolvers = "0.11" which supports the new API, so no compat changes needed.
The solver dictionary in the tutorial now uses:
:trunk_cgls => nlp -> trunk(nlp; subsolver = :cgls)
:trunk_crls => nlp -> trunk(nlp; subsolver = :crls)
:trunk_lsqr => nlp -> trunk(nlp; subsolver = :lsqr)
:trunk_lsmr => nlp -> trunk(nlp; subsolver = :lsmr)
Optional example added:
:trunkls_lsmr => nlp -> trunk(nlp; rtol = RTOL, atol = ATOL, subsolver = :lsmr, max_time = max_time)
:trunkls_cg => nlp -> trunk(nlp; rtol = RTOL, atol = ATOL, subsolver = :cg, max_time = max_time)
completion summary
Build: PASS (doc-only change)
Lint/Typecheck: PASS
Tests: PASS (repo tests verify tutorial files exist)