Skip to content

Remove R2NModels#311

Merged
MaxenceGollier merged 6 commits into
JuliaSmoothOptimizers:masterfrom
MaxenceGollier:rm-r2nmodels
Mar 11, 2026
Merged

Remove R2NModels#311
MaxenceGollier merged 6 commits into
JuliaSmoothOptimizers:masterfrom
MaxenceGollier:rm-r2nmodels

Conversation

@MaxenceGollier
Copy link
Copy Markdown
Collaborator

partially solves #220.

Copilot AI review requested due to automatic review settings March 10, 2026 13:03
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR partially addresses issue #220 by removing the custom R2NModel type and replacing it with QuadraticModel from the QuadraticModels.jl package. The R2NModel was a bespoke NLP model representing the smooth quadratic R2N subproblem; swapping it for QuadraticModel reduces the amount of custom code in the repository and leverages an actively maintained external dependency.

Changes:

  • Removes src/R2NModel.jl (the custom model) and its include in RegularizedOptimization.jl
  • Replaces R2NModel construction and field access with QuadraticModel and data.H/data.σ in R2N.jl and TR_alg.jl; adds a preallocated work vector v1 to both solver structs
  • Adds QuadraticModels as a dependency in Project.toml

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/R2NModel.jl File deleted — custom quadratic subproblem model removed
src/RegularizedOptimization.jl Added QuadraticModels to using list; removed include("R2NModel.jl")
src/R2N.jl Replaces R2NModel with QuadraticModel; updates field accesses to data.H/data.σ; adds v1 work vector; rewrites mk lambda to avoid skip_sigma
src/TR_alg.jl Same R2NModelQuadraticModel substitution; adds v1 work vector; updates data.H accesses
Project.toml Adds QuadraticModels dependency with compat constraint "0.9.15"

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/R2N.jl Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 10, 2026

Codecov Report

❌ Patch coverage is 76.19048% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.38%. Comparing base (e0f214d) to head (d251914).
⚠️ Report is 274 commits behind head on master.

Files with missing lines Patch % Lines
src/R2N.jl 80.00% 3 Missing ⚠️
src/TR_alg.jl 66.66% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master     #311       +/-   ##
===========================================
+ Coverage   61.53%   83.38%   +21.85%     
===========================================
  Files          11       12        +1     
  Lines        1292     1643      +351     
===========================================
+ Hits          795     1370      +575     
+ Misses        497      273      -224     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@MaxenceGollier MaxenceGollier merged commit cd01951 into JuliaSmoothOptimizers:master Mar 11, 2026
14 checks passed
@MaxenceGollier MaxenceGollier deleted the rm-r2nmodels branch March 11, 2026 17:22
@MaxenceGollier MaxenceGollier mentioned this pull request Mar 27, 2026
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.

2 participants