-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nicer Interfaces for ::Number
Manifolds and Objectives
#236
Conversation
Still assert type problems, where I have no clue why some area still thinks we should work with floats in the assertion of types.
Ah, I at least see the problem. The Now since we have a float storage, that of course errors when we com by with 1-arrays. This is not only a problem here but even a general problem if other manifolds use other than their default representation. I did fix the number/vector issue when initialising storage – but will have to check for NMLinesearch. Probably the best is to parr an optional init point and init vector to that as well. edit:
So maybe parts of |
…rach, since we do not have a point to infere the type.
While this turns out far more complex than I thought, I found out some interesting things. I noticed
So I am not so sure I want to use
since for now this is what we used in a lot of places but it seems to change the type? Or in short
edit: So as soon as we scale vectors using |
Codecov Report
@@ Coverage Diff @@
## master #236 +/- ##
==========================================
- Coverage 99.85% 99.69% -0.17%
==========================================
Files 65 64 -1
Lines 5558 5819 +261
==========================================
+ Hits 5550 5801 +251
- Misses 8 18 +10
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
The switch to 1-dim arrays (using See JuliaLang/julia#28866 thanks to the super-fast answer in https://discourse.julialang.org/t/broadcast-strange-on-0-dimensional-array/97311/2 |
::Number
Manifolds and Objectives
Hm,
Yes, I very rarely use plain numbers in Manifolds.jl.
Oh, I didn't know about that problem with 0-dim arrays. Let's just use one-element 1-dim arrays with broadcasting then. |
great!
Maybe this PR will check a few of those then :) but I think the copy might be the main thing.
Well, t was interesting to learn, and we just use 1-dims and then it should be fine :) |
# Conflicts: # Project.toml # src/plans/nonmutating_manifolds_plans.jl
This is a bit more work than I thought, but a nice occasion to unify and test all high-level interfaces. ALM took me about an hour, but the kwargs got nicer in quite a few places. |
Yes, it indeed looks like quite a bit of work but I think it's a good change 🙂 . |
Yes, I think both things are good ideas, both the preprocessing for numbers (though it takes a bit with adopting functions), So this is definetly useful. Just also takes bit to rework. |
...phew just 10 Algorithms left. It is nice to also review a few tests and improve them, but going through all algorithms is indeed a bit of work by now. But. Both new things are really nice to have (though I will not do the number thing for the more-involved algorithms like RCPA and PDSSN). |
For EPM it even made phrasing the defaults much nicer, because some required the objective already. So this rework not only separates some code nicely, it also makes some code really nice. |
Checked Chambolle-Pock and PDSSN today, they make not so much sense in this new form, since they have both a lot of mandatory functions (which sure could be wrapped in their objectives) but also quite a few initial mandatory steps, so that the interface with the objective would still be too crowded. Will think about something nicer for them in some next PR and removed them from the list here. |
@mateuszbaran I have one small questions on
|
That would be a valid optimization problem but I would expect that there should be a better specialized algorithm for that case.
I don't really have a good explanation how the algorithm is changed. BTW, |
Then I will not cast the special case here
Ah, I took that one over then for now, though it does not help much for a user to read that text ;) |
Trying to resolve #223 and #235
Todo
fill(p)
prequel for every solver, wherep
might be a number. #235 way (maybe not all necessary) - it can in most casessolvername(M, obj, ...)
#223, see list belowjacB
kw)