Skip to content

Refactor Identity to not allocate memory if not necessary#401

Merged
kellertuer merged 97 commits intomasterfrom
kellertuer/refactor-identity-type
Aug 4, 2021
Merged

Refactor Identity to not allocate memory if not necessary#401
kellertuer merged 97 commits intomasterfrom
kellertuer/refactor-identity-type

Conversation

@kellertuer
Copy link
Copy Markdown
Member

This PR is a WIP to reduce Identity (see #378) to not contain its point anymore. Here are a few notes on my idea

  • Identity{G} is still parametrised by the group it belongs to
  • identity!, ìndentityandmake_identity` are obsolete
  • get_point(e::Identity{G}) (or get_point(g::G, Identity{G}) should be implemented to return the (array) point that represents the identity
  • check which parts directly can be adapted and whether we lose functionality that way. For now I removed get_vector and get_coordinates but maybe they can be reintroduced

@kellertuer kellertuer marked this pull request as draft July 22, 2021 16:06
@kellertuer kellertuer changed the title Refactor Identity to not contain a point [WIP] Refactor Identity to not contain a point Jul 22, 2021
Comment thread src/groups/group.jl Outdated
Comment thread src/groups/group.jl Outdated
Comment thread src/groups/product_group.jl Outdated
Comment thread src/groups/product_group.jl Outdated
Comment thread src/groups/semidirect_product_group.jl Outdated
Comment thread test/groups/general_linear.jl Outdated
Comment thread test/groups/special_linear.jl Outdated
Comment thread test/groups/special_linear.jl Outdated
Comment thread test/groups/special_orthogonal.jl Outdated
Comment thread test/groups/special_orthogonal.jl Outdated
Comment thread src/groups/group.jl Outdated
Comment thread src/groups/semidirect_product_group.jl Outdated
Comment thread src/groups/special_linear.jl Outdated
Comment thread src/groups/special_linear.jl Outdated
@kellertuer
Copy link
Copy Markdown
Member Author

I got a little stuck on one point that should be similar to the allocation of get_point for atlases with a small difference that

allocate_result(::GroupManifold. ::typeof(get_point), ::Identity)

does not have an a as the atlas variant (to create an array that is similar but of different size). Resolving that should solve a lot of the remaining problems (yes currently really many tests fail, why I did not check format for the last commit).

My idea is as follows: In a few places we have to have a get_point(G,e) or a get_point!(G,p,e) to turn an Indenity() into an array-representation of the identity. So just knowing G and e we have to come up with a proper array type for this p.

@mateuszbaran
Copy link
Copy Markdown
Member

I don't think we should support get_point or get_parameters with Identity. Is it needed for something indirectly?

@kellertuer
Copy link
Copy Markdown
Member Author

There is a lot a lot of places, where currently e.p is used, so where we have to get from the non-allocation type to the actual array. We can also call it get_value but I thought get_point would be nice, too. In the end that is a naming thing we can discuss after we have decided whether to use Identity or not.

@mateuszbaran
Copy link
Copy Markdown
Member

OK, I just confused it with get_point that handles parameter -> point conversion in charts.

@kellertuer
Copy link
Copy Markdown
Member Author

Yes, sorry, that that was confusing, I had no better idea for a name for that function, it would maybe also be a materialiseor something.

@kellertuer
Copy link
Copy Markdown
Member Author

kellertuer commented Jul 25, 2021

get_point is now identity which has 3 variants

  • identity(G) returns a default (array of AbstractManifoldPoint) identity
  • identity(G,p) returns an identity that is similar to p (for example if one has different representations of points, or to get an SArray identity, if p is of that type or such) it indeed allocates and calls the next
  • identity!(G,q) create an identity in place of q

Further I refactored Identity to be an Identity{O} where O is an AbstractGroupOperation that feels quite correct. There are still constructors for ease of use Identity(G) Identity(o::AbstractGroupOperation) and Identity(::Type{O}) where {O<:AbstractGroupOperation}. Now we just have to check which functions to keep.

edit: So there is one challenge we currently have:

  • A ProductGroupOperation currently seems to sometimes assumed to act like a multiplication group (with an identity) which it currently does not.
  • we have to implement a few mot identity! functions
  • we have to decide which actions / operations with identity to keep and adapt the tests accordingly (currently there are a lot of tests failing) – and I am not sure which functions to actually keep.

While working on this I noticed that we could also refactor the group_log / group_exp to be exp/log with one parameter less (if that does not introduce too many ambiguities) since they are just exp/log on Group manifolds at the identity. so we could default exp(G,X) to exp(G,Identity(G),X) instead of having the group_exp. What do you think?

@kellertuer
Copy link
Copy Markdown
Member Author

There is still a lot of errors and failing tests, but we should first decide where to keep identity before we continue. the overloaded operators are done, compose and apply should work, but for example the semidirect product group is still missing some features.

@mateuszbaran
Copy link
Copy Markdown
Member

  • identity(G) returns a default (array of AbstractManifoldPoint) identity

I don't like it, one-argument identity is a standard Julia thing that is supposed to just return its argument. Could we use a different name?

While working on this I noticed that we could also refactor the group_log / group_exp to be exp/log with one parameter less (if that does not introduce too many ambiguities) since they are just exp/log on Group manifolds at the identity. so we could default exp(G,X) to exp(G,Identity(G),X) instead of having the group_exp. What do you think?

I think there would be too many ambiguities with this. If anything, we could refactor group_exp and group_log to normal exp/log with Identity on CartanSchoutenMinus connection manifolds, for example. I'm not sure if it's worth the trouble though.

There is still a lot of errors and failing tests, but we should first decide where to keep identity before we continue. the overloaded operators are done, compose and apply should work, but for example the semidirect product group is still missing some features.

I'll take a look at it today.

@kellertuer
Copy link
Copy Markdown
Member Author

kellertuer commented Jul 26, 2021

  • identity(G) returns a default (array of AbstractManifoldPoint) identity

I don't like it, one-argument identity is a standard Julia thing that is supposed to just return its argument. Could we use a different name?

I saw that, too, but I did not have a better idea for a name. The only idea I had was Lie_identity but if you have an idea, feel free to propose it.

edit; We could take identity_element.

While working on this I noticed that we could also refactor the group_log / group_exp to be exp/log with one parameter less (if that does not introduce too many ambiguities) since they are just exp/log on Group manifolds at the identity. so we could default exp(G,X) to exp(G,Identity(G),X) instead of having the group_exp. What do you think?

I think there would be too many ambiguities with this. If anything, we could refactor group_exp and group_log to normal exp/log with Identity on CartanSchoutenMinus connection manifolds, for example. I'm not sure if it's worth the trouble though.

We would have

  • exp(::AbstractGroupManifold, X) which does not interfere with anything (since the usual exp has 3 arguments)
  • exp!(::AbstractGroupManifold, q, X) which does not interfere with anything, since the usual exp! has 4 arguments

and similar for the log. I think there should not be any ambiguity. Which ambiguities do you see? For me the name group_exp always seemed quite artificial for exp_at_id, which itself is again a quite artificial name. I had an ExpAtIdentity in my Matlab code actually. But with the above signatures, I think we should be safe.

There is still a lot of errors and failing tests, but we should first decide where to keep identity before we continue. the overloaded operators are done, compose and apply should work, but for example the semidirect product group is still missing some features.

I'll take a look at it today.

Great! I can surely help once we fixed, where to use Identity and where not, one main thing to resolve is for example the allocate_result(::GroupManifold, f, ::Identity)type calls. Currently there are a huge number of errors and failing tests, but most of them are just from a small set of the same things failing.

@mateuszbaran
Copy link
Copy Markdown
Member

I saw that, too, but I did not have a better idea for a name. The only idea I had was Lie_identity but if you have an idea, feel free to propose it.

edit; We could take identity_element.

identity_element sounds great 👍 .

We would have

  • exp(::AbstractGroupManifold, X) which does not interfere with anything (since the usual exp has 3 arguments)
  • exp!(::AbstractGroupManifold, q, X) which does not interfere with anything, since the usual exp! has 4 arguments

and similar for the log. I think there should not be any ambiguity. Which ambiguities do you see? For me the name group_exp always seemed quite artificial for exp_at_id, which itself is again a quite artificial name. I had an ExpAtIdentity in my Matlab code actually. But with the above signatures, I think we should be safe.

We have exp(M::AbstractManifold, p, X, t::Real), so we could have exp(M::AbstractManifold, X, t::Real) but it'd be confusing on the Circle group (what is exp(CircleGroup(), -1.0, 0.5) supposed to mean)?

@kellertuer
Copy link
Copy Markdown
Member Author

We have exp(M::AbstractManifold, p, X, t::Real), so we could have exp(M::AbstractManifold, X, t::Real) but it'd be confusing on the Circle group (what is exp(CircleGroup(), -1.0, 0.5) supposed to mean)?

I would not define this for arbitrary manifolds, just

exp(G::AbstractGroupManifold, X, args..) = exp(G, Identity(G), X, args...)

(and the other 3 analogously), or even with identity_element(M) instead of Identity(G).

@mateuszbaran
Copy link
Copy Markdown
Member

I would not define this for arbitrary manifolds, just

exp(G::AbstractGroupManifold, X, args..) = exp(G, Identity(G), X, args...)

(and the other 3 analogously), or even with identity_element(M) instead of Identity(G).

But how does it remove the ambiguity for CircleGroup?

@kellertuer
Copy link
Copy Markdown
Member Author

ah, but that is really only for the circle group, right? Hm.

@mateuszbaran
Copy link
Copy Markdown
Member

It seems that we have some problems with plot recipe testing. VisualRegressionTest seems to be no longer maintained: JuliaPlots/VisualRegressionTests.jl#32 .

@kellertuer
Copy link
Copy Markdown
Member Author

hm, without those we lose quite some coverage, that would be sad.

@mateuszbaran
Copy link
Copy Markdown
Member

Also documentation fails, maybe we won't be able to continue using that very old version of Plots.jl? Do out plots still fail on newer Plots.jl?

@kellertuer
Copy link
Copy Markdown
Member Author

kellertuer commented Aug 4, 2021

I was surprised by that too, but forgot that (and why) we fixed plots that way, but the newest version also throws errors, and I have not enough time just now to check why. So we either have to stay with that version or delete the recipes for now.

Ah it really just seems to be the regression test; the rest works as it seems.

@kellertuer
Copy link
Copy Markdown
Member Author

Meh. Now we are lost in some Unsatifyability infinite loop – locally the tests run fine, but somehow deleting VisualRegressionTests here for now introduced a laaaaaaaarge unsatisfiability that I do not even understand. I had hoped that deleting a package would reduce incompatibilities not raise new ones.

@mateuszbaran
Copy link
Copy Markdown
Member

That issue is much easier to understand when printed without word wrap. It turns out that 1.6.12 was the last version of Plots.jl that supports Julia 1.4 so we are either stuck with it and its problems or drop Julia 1.4. Julia 1.5 is still fine.

@kellertuer
Copy link
Copy Markdown
Member Author

That issue is much easier to understand when printed without word wrap. It turns out that 1.6.12 was the last version of Plots.jl that supports Julia 1.4 so we are either stuck with it and its problems or drop Julia 1.4. Julia 1.5 is still fine.

Ah that's why there was a 1.6 in there, will try to add that again then.

Yeah somehow I dod not get a version that was wrapped, also not when copying the text and I was not sure which package caused all this.

@mateuszbaran
Copy link
Copy Markdown
Member

I noticed there is also a second issue:

Unsatisfiable requirements detected for package DiffEqBase [2b5f629d]:
 DiffEqBase [2b5f629d] log:
 ├─possible versions are: [3.13.2-3.13.3, 4.0.0-4.0.1, 4.1.0, 4.2.0, 4.3.0-4.3.1, 4.4.0, 4.5.0, 4.6.0, 4.7.0, 4.8.0, 4.9.0, 4.10.0-4.10.1, 4.11.0-4.11.1, 4.12.0, 4.13.0, 4.14.0-4.14.1, 4.15.0, 4.16.0, 4.17.0, 4.18.0, 4.19.0, 4.20.0-4.20.3, 4.21.0, 4.21.2-4.21.3, 4.22.0-4.22.2, 4.23.0, 4.23.2-4.23.4, 4.24.0-4.24.3, 4.25.0-4.25.1, 4.26.0-4.26.3, 4.27.0-4.27.1, 4.28.0-4.28.1, 4.29.0-4.29.2, 4.30.0-4.30.2, 4.31.0-4.31.2, 4.32.0, 5.0.0-5.0.1, 5.1.0, 5.2.0-5.2.3, 5.3.0-5.3.2, 5.4.0-5.4.1, 5.5.0-5.5.2, 5.6.0-5.6.4, 5.7.0, 5.8.0-5.8.1, 5.9.0, 5.10.0-5.10.3, 5.11.0-5.11.1, 5.12.0, 5.13.0, 5.14.0-5.14.2, 5.15.0, 5.16.0-5.16.5, 5.17.0-5.17.1, 5.18.0, 5.19.0, 5.20.0-5.20.1, 6.0.0, 6.1.0, 6.2.0-6.2.4, 6.3.0-6.3.6, 6.4.0-6.4.2, 6.5.0-6.5.1, 6.6.0, 6.7.0, 6.8.0, 6.9.0-6.9.4, 6.10.0-6.10.2, 6.11.0, 6.12.0-6.12.5, 6.13.0-6.13.3, 6.14.0-6.14.2, 6.15.0-6.15.2, 6.16.0, 6.17.0-6.17.3, 6.18.0-6.18.1, 6.19.0, 6.20.0, 6.21.0-6.21.1, 6.22.0-6.22.2, 6.23.0, 6.24.0, 6.25.0-6.25.2, 6.26.0, 6.27.0, 6.28.0, 6.29.0-6.29.3, 6.30.0-6.30.4, 6.31.0-6.31.1, 6.32.0-6.32.2, 6.33.0-6.33.1, 6.34.0-6.34.3, 6.35.0-6.35.2, 6.36.0-6.36.4, 6.37.0, 6.38.0-6.38.4, 6.39.0-6.39.1, 6.40.0-6.40.9, 6.41.0-6.41.3, 6.42.0, 6.43.0-6.43.1, 6.44.0-6.44.3, 6.45.0-6.45.1, 6.46.0-6.46.1, 6.47.0-6.47.1, 6.48.0-6.48.2, 6.49.0-6.49.2, 6.50.0, 6.51.0, 6.52.0-6.52.2, 6.53.0-6.53.6, 6.54.0-6.54.1, 6.55.0, 6.56.0, 6.57.0-6.57.9, 6.58.0, 6.59.0, 6.60.0-6.60.1, 6.61.0, 6.62.0-6.62.2, 6.63.0, 6.64.0, 6.65.0, 6.66.0, 6.67.0, 6.68.0-6.68.1, 6.69.0-6.69.1, 6.70.0, 6.71.0] or uninstalled
 ├─restricted by compatibility requirements with Compat [34da2185] to versions: [5.7.0, 5.8.0-5.8.1, 5.9.0, 5.10.0-5.10.3, 5.11.0-5.11.1, 5.12.0, 5.13.0, 5.14.0-5.14.2, 5.15.0, 5.16.0-5.16.5, 5.17.0-5.17.1, 5.18.0, 5.19.0, 5.20.0-5.20.1, 6.0.0, 6.1.0, 6.2.0-6.2.4, 6.3.0-6.3.6, 6.4.0-6.4.2, 6.5.0-6.5.1, 6.6.0, 6.7.0, 6.8.0, 6.9.0-6.9.4, 6.10.0-6.10.2, 6.11.0, 6.12.0-6.12.5, 6.13.0-6.13.3, 6.14.0-6.14.2, 6.15.0-6.15.2, 6.16.0, 6.17.0-6.17.3, 6.18.0-6.18.1, 6.19.0, 6.20.0, 6.21.0-6.21.1, 6.22.0-6.22.2, 6.23.0, 6.24.0, 6.25.0-6.25.2, 6.26.0, 6.27.0, 6.28.0, 6.29.0-6.29.3, 6.30.0-6.30.4, 6.31.0-6.31.1, 6.32.0-6.32.2, 6.33.0-6.33.1, 6.34.0-6.34.3, 6.35.0-6.35.2, 6.36.0-6.36.4, 6.37.0, 6.38.0-6.38.4, 6.39.0-6.39.1, 6.40.0-6.40.9, 6.41.0-6.41.3, 6.42.0, 6.43.0-6.43.1, 6.44.0-6.44.3, 6.45.0-6.45.1, 6.46.0-6.46.1, 6.47.0-6.47.1, 6.48.0-6.48.2, 6.49.0-6.49.2, 6.50.0, 6.51.0, 6.52.0-6.52.2, 6.53.0-6.53.6, 6.54.0-6.54.1, 6.55.0, 6.56.0, 6.57.0-6.57.9, 6.58.0, 6.59.0, 6.60.0-6.60.1, 6.61.0, 6.62.0-6.62.2, 6.63.0, 6.64.0, 6.65.0, 6.66.0, 6.67.0, 6.68.0-6.68.1, 6.69.0-6.69.1, 6.70.0, 6.71.0] or uninstalled
 │ └─Compat [34da2185] log:
 │   ├─possible versions are: [1.0.0-1.0.1, 1.1.0, 1.2.0, 1.3.0, 1.4.0, 1.5.0-1.5.1, 2.0.0, 2.1.0, 2.2.0-2.2.1, 3.0.0, 3.1.0, 3.2.0, 3.3.0-3.3.1, 3.4.0, 3.5.0, 3.6.0, 3.7.0, 3.8.0, 3.9.0-3.9.1, 3.10.0, 3.11.0, 3.12.0, 3.13.0, 3.14.0, 3.15.0, 3.16.0, 3.17.0, 3.18.0, 3.19.0, 3.20.0, 3.21.0, 3.22.0, 3.23.0, 3.24.0, 3.25.0, 3.26.0, 3.27.0, 3.28.0, 3.29.0, 3.30.0, 3.31.0-3.31.1, 3.32.0] or uninstalled
 │   └─restricted to versions 3.32.0 by an explicit requirement, leaving only versions 3.32.0
 ├─restricted by compatibility requirements with DataStructures [864edb3b] to versions: [3.13.2-3.13.3, 4.0.0-4.0.1, 4.1.0, 4.2.0, 4.3.0-4.3.1, 4.4.0, 4.5.0, 4.6.0, 4.7.0, 4.8.0, 4.9.0, 4.10.0-4.10.1, 4.11.0-4.11.1, 4.12.0, 4.13.0, 4.14.0-4.14.1, 4.15.0, 4.16.0, 4.17.0, 4.18.0, 4.19.0, 4.20.0-4.20.3, 4.21.0, 4.21.2-4.21.3, 4.22.0-4.22.2, 4.23.0, 4.23.2-4.23.4, 4.24.0-4.24.3, 4.25.0-4.25.1, 4.26.0-4.26.3, 4.27.0-4.27.1, 4.28.0-4.28.1, 4.29.0-4.29.2, 4.30.0-4.30.2, 4.31.0-4.31.2, 4.32.0, 5.0.0-5.0.1, 5.1.0, 5.2.0-5.2.3, 5.3.0-5.3.2, 5.4.0-5.4.1, 5.5.0-5.5.2, 5.6.0-5.6.4, 5.7.0, 5.8.0-5.8.1, 5.9.0, 5.10.0-5.10.3, 5.11.0-5.11.1, 5.12.0, 5.13.0, 5.14.0-5.14.2, 5.15.0, 5.16.0-5.16.5, 5.17.0-5.17.1, 5.18.0, 5.19.0, 5.20.0-5.20.1, 6.44.0-6.44.3, 6.45.0-6.45.1, 6.46.0-6.46.1, 6.47.0-6.47.1, 6.48.0-6.48.2, 6.49.0-6.49.2, 6.50.0, 6.51.0, 6.52.0-6.52.2, 6.53.0-6.53.6, 6.54.0-6.54.1, 6.55.0, 6.56.0, 6.57.0-6.57.9, 6.58.0, 6.59.0, 6.60.0-6.60.1, 6.61.0, 6.62.0-6.62.2, 6.63.0, 6.64.0, 6.65.0, 6.66.0, 6.67.0, 6.68.0-6.68.1, 6.69.0-6.69.1, 6.70.0, 6.71.0] or uninstalled, leaving only versions: [5.7.0, 5.8.0-5.8.1, 5.9.0, 5.10.0-5.10.3, 5.11.0-5.11.1, 5.12.0, 5.13.0, 5.14.0-5.14.2, 5.15.0, 5.16.0-5.16.5, 5.17.0-5.17.1, 5.18.0, 5.19.0, 5.20.0-5.20.1, 6.44.0-6.44.3, 6.45.0-6.45.1, 6.46.0-6.46.1, 6.47.0-6.47.1, 6.48.0-6.48.2, 6.49.0-6.49.2, 6.50.0, 6.51.0, 6.52.0-6.52.2, 6.53.0-6.53.6, 6.54.0-6.54.1, 6.55.0, 6.56.0, 6.57.0-6.57.9, 6.58.0, 6.59.0, 6.60.0-6.60.1, 6.61.0, 6.62.0-6.62.2, 6.63.0, 6.64.0, 6.65.0, 6.66.0, 6.67.0, 6.68.0-6.68.1, 6.69.0-6.69.1, 6.70.0, 6.71.0] or uninstalled
 │ └─DataStructures [864edb3b] log:
 │   ├─possible versions are: [0.9.0, 0.10.0, 0.11.0-0.11.1, 0.12.0, 0.13.0, 0.14.0-0.14.1, 0.15.0, 0.16.1, 0.17.0-0.17.20, 0.18.0-0.18.9] or uninstalled
 │   └─restricted to versions 0.18.9 by an explicit requirement, leaving only versions 0.18.9
 ├─restricted by compatibility requirements with ChainRulesCore [d360d2e6] to versions: [3.13.2-3.13.3, 4.0.0-4.0.1, 4.1.0, 4.2.0, 4.3.0-4.3.1, 4.4.0, 4.5.0, 4.6.0, 4.7.0, 4.8.0, 4.9.0, 4.10.0-4.10.1, 4.11.0-4.11.1, 4.12.0, 4.13.0, 4.14.0-4.14.1, 4.15.0, 4.16.0, 4.17.0, 4.18.0, 4.19.0, 4.20.0-4.20.3, 4.21.0, 4.21.2-4.21.3, 4.22.0-4.22.2, 4.23.0, 4.23.2-4.23.4, 4.24.0-4.24.3, 4.25.0-4.25.1, 4.26.0-4.26.3, 4.27.0-4.27.1, 4.28.0-4.28.1, 4.29.0-4.29.2, 4.30.0-4.30.2, 4.31.0-4.31.2, 4.32.0, 5.0.0-5.0.1, 5.1.0, 5.2.0-5.2.3, 5.3.0-5.3.2, 5.4.0-5.4.1, 5.5.0-5.5.2, 5.6.0-5.6.4, 5.7.0, 5.8.0-5.8.1, 5.9.0, 5.10.0-5.10.3, 5.11.0-5.11.1, 5.12.0, 5.13.0, 5.14.0-5.14.2, 5.15.0, 5.16.0-5.16.5, 5.17.0-5.17.1, 5.18.0, 5.19.0, 5.20.0-5.20.1, 6.0.0, 6.1.0, 6.2.0-6.2.4, 6.3.0-6.3.6, 6.4.0-6.4.2, 6.5.0-6.5.1, 6.6.0, 6.7.0, 6.8.0, 6.9.0-6.9.4, 6.10.0, 6.69.0-6.69.1, 6.70.0, 6.71.0] or uninstalled, leaving only versions: [5.7.0, 5.8.0-5.8.1, 5.9.0, 5.10.0-5.10.3, 5.11.0-5.11.1, 5.12.0, 5.13.0, 5.14.0-5.14.2, 5.15.0, 5.16.0-5.16.5, 5.17.0-5.17.1, 5.18.0, 5.19.0, 5.20.0-5.20.1, 6.69.0-6.69.1, 6.70.0, 6.71.0] or uninstalled
 │ └─ChainRulesCore [d360d2e6] log:
 │   ├─possible versions are: [0.1.0-0.1.1, 0.2.0, 0.3.0, 0.4.0, 0.5.0-0.5.5, 0.6.0-0.6.1, 0.7.0-0.7.1, 0.7.4-0.7.5, 0.8.0-0.8.1, 0.9.0-0.9.45, 0.10.0-0.10.13, 1.0.0-1.0.2, 1.1.0, 1.2.0, 1.3.0] or uninstalled
 │   └─restricted to versions 1.3.0 by an explicit requirement, leaving only versions 1.3.0
 ├─restricted by compatibility requirements with StaticArrays [90137ffa] to versions: [3.13.2-3.13.3, 4.0.0-4.0.1, 4.1.0, 4.2.0, 4.3.0-4.3.1, 4.4.0, 4.5.0, 4.6.0, 4.7.0, 4.8.0, 4.9.0, 4.10.0-4.10.1, 4.11.0-4.11.1, 4.12.0, 4.13.0, 4.14.0-4.14.1, 4.15.0, 4.16.0, 4.17.0, 4.18.0, 4.19.0, 4.20.0-4.20.3, 4.21.0, 4.21.2-4.21.3, 4.22.0-4.22.2, 4.23.0, 4.23.2-4.23.4, 6.50.0, 6.51.0, 6.52.0-6.52.2, 6.53.0-6.53.6, 6.54.0-6.54.1, 6.55.0, 6.56.0, 6.57.0-6.57.9, 6.58.0, 6.59.0, 6.60.0-6.60.1, 6.61.0, 6.62.0-6.62.2, 6.63.0, 6.64.0, 6.65.0, 6.66.0, 6.67.0, 6.68.0-6.68.1, 6.69.0-6.69.1, 6.70.0, 6.71.0] or uninstalled, leaving only versions: [6.69.0-6.69.1, 6.70.0, 6.71.0] or uninstalled
 │ └─StaticArrays [90137ffa] log:
 │   ├─possible versions are: [0.8.0-0.8.3, 0.9.0-0.9.2, 0.10.0, 0.10.2-0.10.3, 0.11.0-0.11.1, 0.12.0-0.12.5, 1.0.0-1.0.1, 1.1.0-1.1.3, 1.2.0-1.2.10] or uninstalled
 │   ├─restricted to versions 1 by Manifolds [1cead3c2], leaving only versions [1.0.0-1.0.1, 1.1.0-1.1.3, 1.2.0-1.2.10]
 │   │ └─Manifolds [1cead3c2] log:
 │   │   ├─possible versions are: 0.6.0 or uninstalled
 │   │   └─Manifolds [1cead3c2] is fixed to version 0.6.0
 │   └─restricted to versions 1.2.10 by an explicit requirement, leaving only versions 1.2.10
 ├─restricted by compatibility requirements with OrdinaryDiffEq [1dea7af3] to versions: [6.38.0-6.38.4, 6.39.0-6.39.1, 6.40.0-6.40.9, 6.41.0-6.41.3, 6.42.0, 6.43.0-6.43.1, 6.44.0-6.44.3, 6.45.0-6.45.1, 6.46.0-6.46.1, 6.47.0-6.47.1, 6.48.0-6.48.2, 6.49.0-6.49.2, 6.50.0, 6.51.0, 6.52.0-6.52.2, 6.53.0-6.53.6, 6.54.0-6.54.1, 6.55.0, 6.56.0, 6.57.0-6.57.9, 6.58.0, 6.59.0, 6.60.0-6.60.1, 6.61.0, 6.62.0-6.62.2, 6.63.0, 6.64.0, 6.65.0, 6.66.0, 6.67.0, 6.68.0-6.68.1, 6.69.0-6.69.1, 6.70.0, 6.71.0], leaving only versions: [6.69.0-6.69.1, 6.70.0, 6.71.0]
 │ └─OrdinaryDiffEq [1dea7af3] log:
 │   ├─possible versions are: [4.0.0, 4.1.0, 4.2.0, 4.3.0, 4.4.0-4.4.1, 4.5.0, 4.6.0, 4.7.0-4.7.1, 4.8.0-4.8.1, 4.9.0, 4.10.0, 4.11.0-4.11.1, 4.12.0-4.12.4, 4.13.0, 4.14.0, 4.15.0-4.15.1, 4.16.0-4.16.5, 4.17.0-4.17.2, 4.18.0-4.18.3, 4.19.0, 4.20.0, 4.21.0-4.21.1, 5.0.0, 5.1.0-5.1.4, 5.2.0-5.2.1, 5.3.0, 5.4.0-5.4.1, 5.5.0, 5.6.0-5.6.1, 5.7.0-5.7.1, 5.8.0-5.8.1, 5.9.0, 5.10.0, 5.11.0-5.11.1, 5.12.0, 5.13.0, 5.14.0, 5.15.0-5.15.1, 5.16.0, 5.17.0-5.17.2, 5.18.0, 5.19.0, 5.20.0-5.20.1, 5.21.0, 5.22.0, 5.23.0, 5.24.0, 5.25.0, 5.26.0-5.26.8, 5.27.0-5.27.1, 5.28.0-5.28.1, 5.29.0, 5.30.0, 5.31.0, 5.32.0-5.32.2, 5.33.0, 5.34.0-5.34.1, 5.35.0-5.35.5, 5.36.0-5.36.1, 5.37.0, 5.38.0-5.38.3, 5.39.0-5.39.1, 5.40.0, 5.41.0, 5.42.0-5.42.10, 5.43.0, 5.44.0, 5.45.0-5.45.1, 5.46.0, 5.47.0-5.47.1, 5.48.0, 5.49.0-5.49.3, 5.50.0-5.50.2, 5.51.0-5.51.2, 5.52.0-5.52.7, 5.53.0-5.53.2, 5.54.0, 5.55.0-5.55.1, 5.56.0, 5.57.0, 5.58.0, 5.59.0-5.59.4, 5.60.0-5.60.2] or uninstalled
 │   ├─restricted to versions * by an explicit requirement, leaving only versions [4.0.0, 4.1.0, 4.2.0, 4.3.0, 4.4.0-4.4.1, 4.5.0, 4.6.0, 4.7.0-4.7.1, 4.8.0-4.8.1, 4.9.0, 4.10.0, 4.11.0-4.11.1, 4.12.0-4.12.4, 4.13.0, 4.14.0, 4.15.0-4.15.1, 4.16.0-4.16.5, 4.17.0-4.17.2, 4.18.0-4.18.3, 4.19.0, 4.20.0, 4.21.0-4.21.1, 5.0.0, 5.1.0-5.1.4, 5.2.0-5.2.1, 5.3.0, 5.4.0-5.4.1, 5.5.0, 5.6.0-5.6.1, 5.7.0-5.7.1, 5.8.0-5.8.1, 5.9.0, 5.10.0, 5.11.0-5.11.1, 5.12.0, 5.13.0, 5.14.0, 5.15.0-5.15.1, 5.16.0, 5.17.0-5.17.2, 5.18.0, 5.19.0, 5.20.0-5.20.1, 5.21.0, 5.22.0, 5.23.0, 5.24.0, 5.25.0, 5.26.0-5.26.8, 5.27.0-5.27.1, 5.28.0-5.28.1, 5.29.0, 5.30.0, 5.31.0, 5.32.0-5.32.2, 5.33.0, 5.34.0-5.34.1, 5.35.0-5.35.5, 5.36.0-5.36.1, 5.37.0, 5.38.0-5.38.3, 5.39.0-5.39.1, 5.40.0, 5.41.0, 5.42.0-5.42.10, 5.43.0, 5.44.0, 5.45.0-5.45.1, 5.46.0, 5.47.0-5.47.1, 5.48.0, 5.49.0-5.49.3, 5.50.0-5.50.2, 5.51.0-5.51.2, 5.52.0-5.52.7, 5.53.0-5.53.2, 5.54.0, 5.55.0-5.55.1, 5.56.0, 5.57.0, 5.58.0, 5.59.0-5.59.4, 5.60.0-5.60.2]
 │   ├─restricted by compatibility requirements with Compat [34da2185] to versions: [4.3.0, 4.4.0-4.4.1, 4.5.0, 4.6.0, 4.7.0-4.7.1, 4.8.0-4.8.1, 4.9.0, 4.10.0, 4.11.0-4.11.1, 4.12.0-4.12.4, 4.13.0, 4.14.0, 4.15.0-4.15.1, 4.16.0-4.16.5, 4.17.0-4.17.2, 4.18.0-4.18.3, 4.19.0, 4.20.0, 4.21.0-4.21.1, 5.0.0, 5.1.0-5.1.4, 5.2.0-5.2.1, 5.3.0, 5.4.0-5.4.1, 5.5.0, 5.6.0-5.6.1, 5.7.0-5.7.1, 5.8.0-5.8.1, 5.9.0, 5.10.0, 5.11.0-5.11.1, 5.12.0, 5.13.0, 5.14.0, 5.15.0-5.15.1, 5.16.0, 5.17.0-5.17.2, 5.18.0, 5.19.0, 5.20.0-5.20.1, 5.21.0, 5.22.0, 5.23.0, 5.24.0, 5.25.0, 5.26.0-5.26.8, 5.27.0-5.27.1, 5.28.0-5.28.1, 5.29.0, 5.30.0, 5.31.0, 5.32.0-5.32.2, 5.33.0, 5.34.0-5.34.1, 5.35.0-5.35.5, 5.36.0-5.36.1, 5.37.0, 5.38.0-5.38.3, 5.39.0-5.39.1, 5.40.0, 5.41.0, 5.42.0-5.42.10, 5.43.0, 5.44.0, 5.45.0-5.45.1, 5.46.0, 5.47.0-5.47.1, 5.48.0, 5.49.0-5.49.3, 5.50.0-5.50.2, 5.51.0-5.51.2, 5.52.0-5.52.7, 5.53.0-5.53.2, 5.54.0, 5.55.0-5.55.1, 5.56.0, 5.57.0, 5.58.0, 5.59.0-5.59.4, 5.60.0-5.60.2] or uninstalled, leaving only versions: [4.3.0, 4.4.0-4.4.1, 4.5.0, 4.6.0, 4.7.0-4.7.1, 4.8.0-4.8.1, 4.9.0, 4.10.0, 4.11.0-4.11.1, 4.12.0-4.12.4, 4.13.0, 4.14.0, 4.15.0-4.15.1, 4.16.0-4.16.5, 4.17.0-4.17.2, 4.18.0-4.18.3, 4.19.0, 4.20.0, 4.21.0-4.21.1, 5.0.0, 5.1.0-5.1.4, 5.2.0-5.2.1, 5.3.0, 5.4.0-5.4.1, 5.5.0, 5.6.0-5.6.1, 5.7.0-5.7.1, 5.8.0-5.8.1, 5.9.0, 5.10.0, 5.11.0-5.11.1, 5.12.0, 5.13.0, 5.14.0, 5.15.0-5.15.1, 5.16.0, 5.17.0-5.17.2, 5.18.0, 5.19.0, 5.20.0-5.20.1, 5.21.0, 5.22.0, 5.23.0, 5.24.0, 5.25.0, 5.26.0-5.26.8, 5.27.0-5.27.1, 5.28.0-5.28.1, 5.29.0, 5.30.0, 5.31.0, 5.32.0-5.32.2, 5.33.0, 5.34.0-5.34.1, 5.35.0-5.35.5, 5.36.0-5.36.1, 5.37.0, 5.38.0-5.38.3, 5.39.0-5.39.1, 5.40.0, 5.41.0, 5.42.0-5.42.10, 5.43.0, 5.44.0, 5.45.0-5.45.1, 5.46.0, 5.47.0-5.47.1, 5.48.0, 5.49.0-5.49.3, 5.50.0-5.50.2, 5.51.0-5.51.2, 5.52.0-5.52.7, 5.53.0-5.53.2, 5.54.0, 5.55.0-5.55.1, 5.56.0, 5.57.0, 5.58.0, 5.59.0-5.59.4, 5.60.0-5.60.2]
 │   │ └─Compat [34da2185] log: see above
 │   ├─restricted by compatibility requirements with DataStructures [864edb3b] to versions: [5.42.4-5.42.10, 5.43.0, 5.44.0, 5.45.0-5.45.1, 5.46.0, 5.47.0-5.47.1, 5.48.0, 5.49.0-5.49.3, 5.50.0-5.50.2, 5.51.0-5.51.2, 5.52.0-5.52.7, 5.53.0-5.53.2, 5.54.0, 5.55.0-5.55.1, 5.56.0, 5.57.0, 5.58.0, 5.59.0-5.59.4, 5.60.0-5.60.2] or uninstalled, leaving only versions: [5.42.4-5.42.10, 5.43.0, 5.44.0, 5.45.0-5.45.1, 5.46.0, 5.47.0-5.47.1, 5.48.0, 5.49.0-5.49.3, 5.50.0-5.50.2, 5.51.0-5.51.2, 5.52.0-5.52.7, 5.53.0-5.53.2, 5.54.0, 5.55.0-5.55.1, 5.56.0, 5.57.0, 5.58.0, 5.59.0-5.59.4, 5.60.0-5.60.2]
 │   │ └─DataStructures [864edb3b] log: see above
 │   └─restricted by compatibility requirements with Reexport [189a3867] to versions: [5.47.0-5.47.1, 5.48.0, 5.49.0-5.49.3, 5.50.0-5.50.2, 5.51.0-5.51.2, 5.52.0-5.52.7, 5.53.0-5.53.2, 5.54.0, 5.55.0-5.55.1, 5.56.0, 5.57.0, 5.58.0, 5.59.0-5.59.4, 5.60.0-5.60.2] or uninstalled, leaving only versions: [5.47.0-5.47.1, 5.48.0, 5.49.0-5.49.3, 5.50.0-5.50.2, 5.51.0-5.51.2, 5.52.0-5.52.7, 5.53.0-5.53.2, 5.54.0, 5.55.0-5.55.1, 5.56.0, 5.57.0, 5.58.0, 5.59.0-5.59.4, 5.60.0-5.60.2]
 │     └─Reexport [189a3867] log:
 │       ├─possible versions are: [0.2.0, 1.0.0, 1.1.0] or uninstalled
 │       └─restricted to versions 1.1.0 by an explicit requirement, leaving only versions 1.1.0
 └─restricted by julia compatibility requirements to versions: [3.13.2-3.13.3, 4.0.0-4.0.1, 4.1.0, 4.2.0, 4.3.0-4.3.1, 4.4.0, 4.5.0, 4.6.0, 4.7.0, 4.8.0, 4.9.0, 4.10.0-4.10.1, 4.11.0-4.11.1, 4.12.0, 4.13.0, 4.14.0-4.14.1, 4.15.0, 4.16.0, 4.17.0, 4.18.0, 4.19.0, 4.20.0-4.20.3, 4.21.0, 4.21.2-4.21.3, 4.22.0-4.22.2, 4.23.0, 4.23.2-4.23.4, 4.24.0-4.24.3, 4.25.0-4.25.1, 4.26.0-4.26.3, 4.27.0-4.27.1, 4.28.0-4.28.1, 4.29.0-4.29.2, 4.30.0-4.30.2, 4.31.0-4.31.2, 4.32.0, 5.0.0-5.0.1, 5.1.0, 5.2.0-5.2.3, 5.3.0-5.3.2, 5.4.0-5.4.1, 5.5.0-5.5.2, 5.6.0-5.6.4, 5.7.0, 5.8.0-5.8.1, 5.9.0, 5.10.0-5.10.3, 5.11.0-5.11.1, 5.12.0, 5.13.0, 5.14.0-5.14.2, 5.15.0, 5.16.0-5.16.5, 5.17.0-5.17.1, 5.18.0, 5.19.0, 5.20.0-5.20.1, 6.0.0, 6.1.0, 6.2.0-6.2.4, 6.3.0-6.3.6, 6.4.0-6.4.2, 6.5.0-6.5.1, 6.6.0, 6.7.0, 6.8.0, 6.9.0-6.9.4, 6.10.0-6.10.2, 6.11.0, 6.12.0-6.12.5, 6.13.0-6.13.3, 6.14.0-6.14.2, 6.15.0-6.15.2, 6.16.0, 6.17.0-6.17.3, 6.18.0-6.18.1, 6.19.0, 6.20.0, 6.21.0-6.21.1, 6.22.0-6.22.2, 6.23.0, 6.24.0, 6.25.0-6.25.2, 6.26.0, 6.27.0, 6.28.0, 6.29.0-6.29.3, 6.30.0-6.30.4, 6.31.0-6.31.1, 6.32.0-6.32.2, 6.33.0-6.33.1, 6.34.0-6.34.3, 6.35.0-6.35.2, 6.36.0-6.36.4, 6.37.0, 6.38.0-6.38.4, 6.39.0-6.39.1, 6.40.0-6.40.9, 6.41.0-6.41.3, 6.42.0, 6.43.0-6.43.1, 6.44.0-6.44.3, 6.45.0-6.45.1, 6.46.0-6.46.1, 6.47.0-6.47.1, 6.48.0-6.48.2, 6.49.0-6.49.2, 6.50.0, 6.51.0, 6.52.0-6.52.2, 6.53.0-6.53.6, 6.54.0-6.54.1, 6.55.0, 6.56.0, 6.57.0-6.57.9, 6.58.0, 6.59.0, 6.60.0-6.60.1, 6.61.0, 6.62.0-6.62.2, 6.63.0, 6.64.0] or uninstalled — no versions left

It's weird, it worked before -- incompatibility seems to be caused by ChainRulesCore.

Comment thread docs/Project.toml Outdated
Co-authored-by: Mateusz Baran <mateuszbaran89@gmail.com>
@kellertuer
Copy link
Copy Markdown
Member Author

kellertuer commented Aug 4, 2021

It's weird, it worked before -- incompatibility seems to be caused by ChainRulesCore.

This PR seems to be cursed somehow. I again do not understand where this is now coming from just because we loosened the compat on plots or deleted the visual regression tests...?!

Edit maybe an artefact somehow? It seems to be gone now and we even have enough code coverage 🥇

@mateuszbaran
Copy link
Copy Markdown
Member

I don't understand it but if CI thinks it's fine then I'm not going to argue 😄 .

@dehann
Copy link
Copy Markdown
Contributor

dehann commented Aug 5, 2021

Hi, I was reading changes for v0.6 and found this thread. Perhaps the issue between local and CI test failures has to do with a known cached registry issue. Cache does not update for upstream immediately if there are large file size changes (resulting in a delay for DiffEqBase / ChainRules in this case). I previously had a similar issue which took me forever to figure out (leading to Registry 16777, a very long thread), and after parsing through it was able to fix with:
JuliaRegistries/General#16777 (comment)

@kellertuer
Copy link
Copy Markdown
Member Author

Thanks :) Well the issue went away (and even nightly ran fine on master after merging), so it resolved itself – but thanks for the comment, that might indeed habe been the case. My main problem was then maybe, that this PR was far longer and far more work than I thought.

@dehann
Copy link
Copy Markdown
Contributor

dehann commented Aug 5, 2021

more than a thousand lines of changes to update the description of the zero/nothing/identity element... :-) We're looking at something similar, for the inference code to go beyond Lie groups (requiring the floating reference point rather than assuming identity). It's also becoming a large influence on code design our side... I'm likely using identity way too much.

PS, we're pushing to finish IncrementalInference.jl v0.25 which will be fully converted to using/following Manifolds.jl! And, a few downstream packages too.

@kellertuer
Copy link
Copy Markdown
Member Author

Well, the reason was simple: The initial design of identity was to avoid allocations – otherwise one could just the array/AbstractManifoldPoint instead. Then with further features the identity stored the point internally. This PR refactored that, so that it was again a type without allocations
The only real change on the outside is that e = Identity(G) on a Lie group G can now be done without a point p (to represent the identity) and also can be done with the Identity(A) group action A (which is now the only parameter of the identity). to obtain an ayyay/ManifoldPoint you can now use identity_element(e) (for an identity of a certain type similar to a point p identity_element(G,p) and similarly an inlace variant exists).
The remainder are internal changes.

to the PS: Cool! Looking forward to seeing that!

@dehann
Copy link
Copy Markdown
Contributor

dehann commented Aug 7, 2021

Okay, that sounds good! I'm having a little unexpected difficulty around using identity as we had been doing before. Trying to debug... What is the correct way to do this for SpecialEuclidean(2) --- not sure if this was supposed to work?

M = SpecialEuclidean(2)
G = Identity(M)

julia> Manifolds.identity_element(G)
ERROR: MethodError: no method matching identity_element(::Identity{Manifolds.SemidirectProductOperation{RotationAction{TranslationGroup{Tuple{2}, ℝ}, SpecialOrthogonal{2}, LeftAction}}})
Closest candidates are:
  identity_element(::ProductGroup{𝔽, T} where {𝔽, T}) at /home/dehann/.julia/packages/Manifolds/EY0G1/src/groups/product_group.jl:37
  identity_element(::CircleGroup) at /home/dehann/.julia/packages/Manifolds/EY0G1/src/groups/circle_group.jl:27
  identity_element(::CircleGroup, ::Number) at /home/dehann/.julia/packages/Manifolds/EY0G1/src/groups/circle_group.jl:28
  ..

@kellertuer
Copy link
Copy Markdown
Member Author

Could you open an issue for this? The PR is already merged and finished. Then I will take a look, I hope we have not missed an identity_elementfunction (formerly make_identity but that was easier since it only returned the point that was saved internally).

@kellertuer kellertuer deleted the kellertuer/refactor-identity-type branch May 18, 2022 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview docs Add this label if you want to see a PR-preview of the documentation 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.

3 participants