Skip to content

Add DirectLinearSolver support for length-1 vectors#200

Merged
gdalle merged 3 commits intoJuliaDecisionFocusedLearning:mainfrom
bmxam:dev-vector-1
Jan 16, 2026
Merged

Add DirectLinearSolver support for length-1 vectors#200
gdalle merged 3 commits intoJuliaDecisionFocusedLearning:mainfrom
bmxam:dev-vector-1

Conversation

@bmxam
Copy link
Copy Markdown
Contributor

@bmxam bmxam commented Jan 13, 2026

This PR enables the use of the DirectLinearSolver when the forward function returns vector of length 1. This fixes #199.

Note : I've placed some tests in the examples/4_gallery.jl file. I didn't know exactly where to place them so I thought that maybe, in a futur work, there could be a documentation page where misc. examples are listed, some kind of "gallery". But I can move them elsewhere if you prefer.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/settings.jl 100.00% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bmxam
Copy link
Copy Markdown
Contributor Author

bmxam commented Jan 13, 2026

Oh, I missed the fact that Documenter is trying to build & run all the files in the examples folder. How do you prefer to proceed : should I move 4_gallery.jl elsewhere, or should I tweak make.jl to skip 4_gallery.jl?

@gdalle
Copy link
Copy Markdown
Member

gdalle commented Jan 13, 2026

While I like the new example, I wonder whether it brings anything that is not already in the simpler Optim demo, documentation wise? If not, since our main goal is to test the length-1 case, perhaps a simpler test in the test repo would suffice?

@bmxam
Copy link
Copy Markdown
Contributor Author

bmxam commented Jan 14, 2026

The new example doesn't bring anything new except maybe the computation of a Hessian (only with DirectLinearSolver), but we could also add this Hessian test in the "badsqrt" example.

I've just pushed modifications that remove the "new example" (as well as the 4_gallery.jl file, and add some tests in test/systematic.jl. Tell me if it's ok.

Copy link
Copy Markdown
Member

@gdalle gdalle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perfect, thanks! let's leave investigations of second-order stuff for a future PR!

@gdalle gdalle merged commit 38573da into JuliaDecisionFocusedLearning:main Jan 16, 2026
5 checks passed
@gdalle gdalle mentioned this pull request Jan 16, 2026
@bmxam bmxam deleted the dev-vector-1 branch January 16, 2026 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DirectLinearSolver with vectors of length 1

2 participants