add skip_sigma kwarg in R2NModel and LMModel#241
Merged
MaxenceGollier merged 1 commit intoOct 1, 2025
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #241 +/- ##
===========================================
+ Coverage 61.53% 84.43% +22.90%
===========================================
Files 11 13 +2
Lines 1292 1632 +340
===========================================
+ Hits 795 1378 +583
+ Misses 497 254 -243 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds a skip_sigma keyword argument to the obj functions of both R2NModel and LMModel classes. This allows callers to optionally exclude the sigma regularization term from the objective function computation.
- Added
skip_sigmakeyword parameter to objective functions in both model types - Modified solver algorithms to use
skip_sigma = truewhen computing model functions - Provides conditional logic to return objective values with or without regularization
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/R2NModel.jl | Added skip_sigma kwarg to obj function with conditional return |
| src/LMModel.jl | Added skip_sigma kwarg to obj function with conditional return |
| src/R2N.jl | Updated solver to call obj with skip_sigma = true |
| src/LM_alg.jl | Updated solver to call obj with skip_sigma = true |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
dpo
approved these changes
Oct 1, 2025
7b54d4f
into
JuliaSmoothOptimizers:master
13 of 14 checks passed
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.
@dpo @MohamedLaghdafHABIBOULLAH
comment
should replace #239