Skip to content
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

Define Meta Manifolds already in ManifoldsBase #169

Merged
merged 62 commits into from
Oct 16, 2023

Conversation

kellertuer
Copy link
Member

@kellertuer kellertuer commented Sep 30, 2023

This allows the user to even use a TangentSpaceAtPoint when only depending on ManifoldsBase.
I would like to have this for defining proper/nice/generic subproblems in tangent spaces in Manopt.jl (e.g. for the current trust region rework).

This is breaking (hence also for 0.15) in the sense that with this version otherwise the VectorBundle is defined twice (which kills precompiation).

To do

  • moved the ArrayPartition sections to a weak dependency with RecursiveArrayTools.
  • We now have a first (non-standard-library) dependency here_ Requires.jl, but I think that is ok
  • check documentation
  • introduce DocumenterCitations here as well
  • bump Documenter to 1.0
  • check test coverage

@codecov
Copy link

codecov bot commented Sep 30, 2023

Codecov Report

Merging #169 (ef36dc7) into master (ba4a2ff) will increase coverage by 0.00%.
The diff coverage is 99.84%.

❗ Current head ef36dc7 differs from pull request most recent head fb37b01. Consider uploading reports for the commit fb37b01 to get more accurate results

@@           Coverage Diff            @@
##           master     #169    +/-   ##
========================================
  Coverage   99.96%   99.96%            
========================================
  Files          20       26     +6     
  Lines        2562     3160   +598     
========================================
+ Hits         2561     3159   +598     
  Misses          1        1            
Files Coverage Δ
...rayToolsExt/ManifoldsBaseRecursiveArrayToolsExt.jl 100.00% <100.00%> (ø)
...yToolsExt/ProductManifoldRecursiveArrayToolsExt.jl 100.00% <100.00%> (ø)
src/DefaultManifold.jl 100.00% <100.00%> (ø)
src/Fiber.jl 100.00% <100.00%> (ø)
src/ManifoldsBase.jl 100.00% <100.00%> (+0.39%) ⬆️
src/PowerManifold.jl 100.00% <100.00%> (ø)
src/TangentSpace.jl 100.00% <100.00%> (ø)
src/VectorFiber.jl 100.00% <100.00%> (ø)
src/bases.jl 100.00% <100.00%> (ø)
src/point_vector_fallbacks.jl 100.00% <100.00%> (ø)
... and 4 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@mateuszbaran
Copy link
Member

Hmm... since it's breaking, maybe let's move the implementation of fiber bundles from JuliaManifolds/Manifolds.jl#642 here? And Product manifolds as well.

@kellertuer
Copy link
Member Author

Sure, why not. I was not aware you worked on the Fibre Bundle in that PR.

@mateuszbaran
Copy link
Member

It's in the PR's title 😄

@mateuszbaran
Copy link
Member

Will you make the update or prefer me to do that?

@kellertuer
Copy link
Member Author

Since those are your changes (and it is harder for me to track them down in your PR), maybe you could add them here? Feel free to add product and power as much as possible here, too, I'd love to have them here as well.

@mateuszbaran
Copy link
Member

OK, sure, I will do it then.

@kellertuer
Copy link
Member Author

What do you think about the extension here? Or should the few functions using ArrayPartitions stay in Manifolds instead, where we have that dependency anyways?

@mateuszbaran
Copy link
Member

I prefer to have that extension here.

@kellertuer
Copy link
Member Author

Nice, I do not have a strong preference, but I agree, that this puts all VectorBundle-Fun in one place. Then Iwe should add the Revise dependency here as well (that's what's missing still).

@kellertuer
Copy link
Member Author

I just spend quite a bit of time with the docs. Citations should be fine already – but the docs still have 8 doctorings that we never included somewhere. I only fixed about a few and these are still missing. Test coverage – I started with that but I am not yet sure how far I got.

@kellertuer
Copy link
Member Author

Maybe we should also rethink the docs a bit when fixing the remaining ones – the manifolds section is by now very long – and might be better to be restructured.

@mateuszbaran
Copy link
Member

Maybe let's update docs when new things are ready? I'm in the middle of moving metamanifolds here.

@kellertuer
Copy link
Member Author

Sure, that's one of the reasons I waited with fixing :)

@kellertuer kellertuer changed the title Define Tangent/Vector/Cotangent Spaces/Bundles already in Base Define Meta Manifolds already in ManifoldsBase Oct 1, 2023
@mateuszbaran
Copy link
Member

Sounds good 👍 . I more thing I'd like to do before merging this is making all tests pass (locally) in the Manifolds.jl rework PR.

@kellertuer
Copy link
Member Author

Ah, that sounds like a very good idea 👍

In the mean time I can do the error-keyword-rework already for #135 – that also mainly seems to be a few lines of code and a bit of test adaptions.

@mateuszbaran
Copy link
Member

Sure, that should be fairly simple.

@kellertuer
Copy link
Member Author

Sure, that should be fairly simple.

Well, ± ambiguities and a few internals for embedded manifold or such that did change. but I think I am nearly there.

@mateuszbaran
Copy link
Member

I've updated PowerManifold so that it can also be optionally static. I opted to use field-size by default because for this manifold it almost never makes sense to store the size statically, IMO.

mateuszbaran and others added 3 commits October 14, 2023 21:46
…uctRetraction and ProductVectorTransport, move × for productManifold here.
Instead of a map one could also allocate n copies of the retraction, but maybe this is easiest.
@kellertuer
Copy link
Member Author

I think I found a way to introduce retractions with non-product retractions as discussed in JuliaManifolds/Manifolds.jl#659, the only “disadvantage” might be, that when margin this into #167. we might have to repeat these for the retract as well.

This might be slightly bridging our layers, but layer one says “Note that all other parameters of a function should be as least typed as possible for all parameters besides the manifold.” so that is what I did here for the abstract retraction case and put it on layer 1; currently I also moved the ProductRetraction cases to layer 1, but maybe that is wrong and they should be back on Layer 2.

this is still missing a bit of testing, but I will first check which lines are missing, since also the new cross functions (analogue to product manifold one can now also create product retractions, inverse retractions, vector transports) and new show functions have to be tested.

@mateuszbaran
Copy link
Member

I think I found a way to introduce retractions with non-product retractions as discussed in JuliaManifolds/Manifolds.jl#659, the only “disadvantage” might be, that when margin this into #167. we might have to repeat these for the retract as well.

OK, if this doesn't cause any ambiguities then I'm fine with it.

@kellertuer
Copy link
Member Author

I think I found a way to introduce retractions with non-product retractions as discussed in JuliaManifolds/Manifolds.jl#659, the only “disadvantage” might be, that when margin this into #167. we might have to repeat these for the retract as well.

OK, if this doesn't cause any ambiguities then I'm fine with it.

That is exactly why I moved them from L2 to L1, on L2 they caused too many (non-ignorable) ambiguities. I will then write a few tests now :)

@kellertuer
Copy link
Member Author

kellertuer commented Oct 15, 2023

Oh, two of the function definitions I do not yet hit but I thought I would have. I will only have time tomorrow to check for these as well.

edit: I like what this turned out to be, also the ne ×, thanks for adapting your PR in Manifolds already. I will do something similar in Manopt, but for that it is easier to wait for Manifolds and ManifoldDiff to be bumped to ManifoldBase 0.15.

@mateuszbaran
Copy link
Member

Cool. With this latest fix, test are passing in Manifolds.jl PR. I will continue with docs and coverage there.

@kellertuer
Copy link
Member Author

Thanks for fixing one of my a-bit-too-fast copied method. I just extended (hopefully finally) test coverage.

I think now this should be good to go :)

@kellertuer
Copy link
Member Author

We have one false-positive uncovered line left, so code coverage is as best as possible.

@mateuszbaran
Copy link
Member

Yes, I think this is pretty much ready and we can work on releasing 0.15.0. I think first, we need to merge all three breaking PRs into one branch and check if the Manifolds.jl PR needs some additional work.

@kellertuer
Copy link
Member Author

Cool. Then let's start with this one, then retractions (since we might want to check that this still works with the new dispatch)  – and then the error PR.

@kellertuer kellertuer merged commit 5e7f6ae into master Oct 16, 2023
11 checks passed
@kellertuer kellertuer deleted the kellertuer/VectorBundle branch May 4, 2024 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Ready-for-Review A label for pull requests that are feature-ready
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants