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

Unify use of an atol when comparing to zero #692

Merged
merged 29 commits into from
Dec 25, 2023

Conversation

kellertuer
Copy link
Member

As discussed therein, this fixes #630.

I carefully went through all isapprox and as soon as there was a comparison to zero, I adapted from existing cases a nonzero atol in the signature and passed that down.

this still needs a bit of checks for failing tests, but should work otherwise I hope.

@kellertuer
Copy link
Member Author

Ah, one thing that is a bit tricky here is that without the atol= a lot of checks where quite fine with integer matrices, now they are not, maybe adopting the already sometimes used max_eps makes that nicer to tolerate those again. Most tests failing currently is due to integer values.

@kellertuer kellertuer added the Ready-for-Review A label for pull requests that are feature-ready label Dec 14, 2023
@kellertuer
Copy link
Member Author

Locally the tests run fine by now – here it seems on Julia 1.10 there is a problem with DiffEq (again?).

Copy link

codecov bot commented Dec 14, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b2d83b3) 99.57% compared to head (a63e8ae) 99.57%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #692   +/-   ##
=======================================
  Coverage   99.57%   99.57%           
=======================================
  Files         108      108           
  Lines       10677    10708   +31     
=======================================
+ Hits        10632    10663   +31     
  Misses         45       45           

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

@mateuszbaran
Copy link
Member

BoundaryValueDiffEq.jl again 😞

@mateuszbaran
Copy link
Member

I've opened an issue: SciML/BoundaryValueDiffEq.jl#148

@kellertuer
Copy link
Member Author

With the last fix it really runs locally just fine (probably with an older version of BoundaryValueEq still), that is indeed a bit annoying.

Copy link
Member

@mateuszbaran mateuszbaran left a comment

Choose a reason for hiding this comment

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

Everything else looks fine 👍

src/groups/addition_operation.jl Outdated Show resolved Hide resolved
src/groups/special_linear.jl Outdated Show resolved Hide resolved
src/manifolds/CenteredMatrices.jl Outdated Show resolved Hide resolved
src/manifolds/CenteredMatrices.jl Outdated Show resolved Hide resolved
src/manifolds/CholeskySpace.jl Outdated Show resolved Hide resolved
src/manifolds/SymmetricPositiveSemidefiniteFixedRank.jl Outdated Show resolved Hide resolved
src/manifolds/Symplectic.jl Outdated Show resolved Hide resolved
src/manifolds/Symplectic.jl Outdated Show resolved Hide resolved
src/manifolds/SymplecticStiefel.jl Outdated Show resolved Hide resolved
src/manifolds/SymplecticStiefel.jl Outdated Show resolved Hide resolved
@mateuszbaran
Copy link
Member

@kellertuer could you check if there is anything else to adapt due to JuliaManifolds/ManifoldsBase.jl#177 ?

@kellertuer
Copy link
Member Author

At first glance there might be two further things (but I am on mobile)

  • default_approximation_method is the new function and we have an old (deprecated) default_estimation_method now here
  • the ExtrinsicEstimationMethod got a little new feature to store the method using in the extrinsic space (since usually that was only implicitly mentioned in the docs that one uses gradient in the embedding or such) – so the constructor without parameter (defaulting to GradientDescentEstimation I would think)

@mateuszbaran
Copy link
Member

  • the ExtrinsicEstimationMethod got a little new feature to store the method using in the extrinsic space (since usually that was only implicitly mentioned in the docs that one uses gradient in the embedding or such) – so the constructor without parameter (defaulting to GradientDescentEstimation I would think)

The most common use case for extrinsic estimation is when the embedding in Euclidean and we use EfficientEstimator there.

@kellertuer
Copy link
Member Author

Sure that also sounds like a very good default. I think I just saw the gradient one somewhere, but yours is indeed maybe the more common case.

src/statistics.jl Outdated Show resolved Hide resolved
src/statistics.jl Outdated Show resolved Hide resolved
src/statistics.jl Outdated Show resolved Hide resolved
src/statistics.jl Outdated Show resolved Hide resolved
test/statistics.jl Outdated Show resolved Hide resolved
@kellertuer
Copy link
Member Author

The new approximation methods and their dispatch should now be fixed. I also circumvent the inconsistency from StatsBase for now, which mainly means we have a bit of code that can be considered duplication (if StatsBase would not be inconsistent).

Copy link
Member

@mateuszbaran mateuszbaran left a comment

Choose a reason for hiding this comment

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

Cool, it looks almost ready 👍

NEWS.md Outdated Show resolved Hide resolved
src/manifolds/EssentialManifold.jl Outdated Show resolved Hide resolved
src/statistics.jl Outdated Show resolved Hide resolved
src/manifolds/Rotations.jl Show resolved Hide resolved
@kellertuer kellertuer merged commit deede80 into master Dec 25, 2023
25 checks passed
@kellertuer kellertuer deleted the kellertuer/fix-isapproxes branch May 4, 2024 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

Improve default atol when comparing to 0
2 participants