Skip to content

adding a shifted version of NormLinf, without and with bounds - #162

Draft
BenjaminPINEAU wants to merge 3 commits into
JuliaSmoothOptimizers:masterfrom
BenjaminPINEAU:NormLinfBox
Draft

adding a shifted version of NormLinf, without and with bounds#162
BenjaminPINEAU wants to merge 3 commits into
JuliaSmoothOptimizers:masterfrom
BenjaminPINEAU:NormLinfBox

Conversation

@BenjaminPINEAU

Copy link
Copy Markdown
Contributor

Implementation of shiftedNormLinf.jl, a version of shifted GroupL2Norm without bounds, and shiftedNormLinfBox.jl, a version of GroupL2Norm with bounds.

@BenjaminPINEAU
BenjaminPINEAU marked this pull request as draft July 3, 2026 19:38
@BenjaminPINEAU

Copy link
Copy Markdown
Contributor Author

Currently working on allocation test but i do not have idea to implement the function _proj_l1ball (implementation of the algorithm from Duchi et al. "Efficient Projections onto the ℓ₁-ball for Learning in High Dimensions") such that

@wrappedallocs(prox!(y, ψ, y, 1.0)) == 0

If you have any ideas, I'd love to hear them @dpo @MaxenceGollier

@MaxenceGollier

Copy link
Copy Markdown
Collaborator

rebase

@MaxenceGollier

MaxenceGollier commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

@BenjaminPINEAU I recommend to use the following workflow when you work on multiple branches.
When you have a PR opened and want to start over with some new feature,

git checkout main
git pull
git checkout -b <branch-name>
... add and commit changes
git push --set-upstream origin <branch-name>

Don't worry though, this branch error still happens to me, to fix now what you can do is synchronize your fork and then do

git checkout main
git pull
git checkout NormLinfBox
git rebase main
git push --force

I'd say the best practice is to always check the git diff when you open PRs to make sure that you are trying to merge the correct commits.

@MaxenceGollier

Copy link
Copy Markdown
Collaborator

Currently working on allocation test but i do not have idea to implement the function _proj_l1ball (implementation of the algorithm from Duchi et al. "Efficient Projections onto the ℓ₁-ball for Learning in High Dimensions") such that

@wrappedallocs(prox!(y, ψ, y, 1.0)) == 0

If you have any ideas, I'd love to hear them @dpo @MaxenceGollier

I am not sure to understand what is preventing you from an inplace implementation.
If you want to see an in place computation of the prox that uses preallocated buffers, you can check ShiftedCompositeNormL2 that I implemented two years ago.

@codecov

codecov Bot commented Jul 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.40000% with 62 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.31%. Comparing base (753a97f) to head (40cd6e8).
⚠️ Report is 30 commits behind head on master.

Files with missing lines Patch % Lines
src/shiftedGroupNormL2Box.jl 0.00% 54 Missing ⚠️
src/shiftedNormLinfBox.jl 88.09% 5 Missing ⚠️
src/shiftedNormLinf.jl 89.65% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #162      +/-   ##
==========================================
+ Coverage   73.71%   74.31%   +0.59%     
==========================================
  Files          22       27       +5     
  Lines         898     1094     +196     
==========================================
+ Hits          662      813     +151     
- Misses        236      281      +45     

☔ View full report in Codecov by Harness.
📢 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.

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