Skip to content

Conversation

@YannCabanes
Copy link
Collaborator

No description provided.

@codecov
Copy link

codecov bot commented Jun 22, 2022

Codecov Report

Merging #1593 (cfaa570) into master (fbe17c7) will decrease coverage by 12.16%.
The diff coverage is 86.67%.

@@             Coverage Diff             @@
##           master    #1593       +/-   ##
===========================================
- Coverage   92.06%   79.90%   -12.15%     
===========================================
  Files         115      115               
  Lines       11124    11621      +497     
===========================================
- Hits        10240     9285      -955     
- Misses        884     2336     +1452     
Flag Coverage Δ
autograd ?
numpy ?
pytorch 79.90% <86.67%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
geomstats/_backend/__init__.py 82.26% <ø> (ø)
geomstats/geometry/hyperboloid.py 84.55% <0.00%> (ø)
geomstats/geometry/matrices.py 97.24% <ø> (ø)
geomstats/geometry/poincare_ball.py 93.39% <ø> (ø)
geomstats/geometry/poincare_half_space.py 97.62% <ø> (ø)
geomstats/geometry/poincare_polydisk.py 90.91% <ø> (ø)
geomstats/geometry/riemannian_metric.py 76.82% <18.19%> (-20.06%) ⬇️
geomstats/information_geometry/base.py 52.64% <52.64%> (ø)
geomstats/distributions/lognormal.py 87.84% <66.67%> (ø)
geomstats/geometry/euclidean.py 91.90% <66.67%> (-2.22%) ⬇️
... and 92 more

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

@YannCabanes
Copy link
Collaborator Author

Hello @ninamiolane and @LPereira95,
Could you help me with this PR please?
What should I change to pass the autograd, pytorch and tensorflow tests?

@luisfpereira luisfpereira self-requested a review June 28, 2022 08:25
Copy link
Collaborator

@luisfpereira luisfpereira left a comment

Choose a reason for hiding this comment

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

Thanks @YannCabanes.

My review does not address yet your question about the reason for the tests to be failing for torch and tensorflow, but it brings some discussions I think are important to have.

I think the feedback from @ninamiolane and @nguigs will be important here due to the first time use of complex types.

@YannCabanes
Copy link
Collaborator Author

Hello @LPereira95, @ninamiolane and @nguigs,
Could you help me by reviewing this PR dealing with complex numbers please?

@YannCabanes
Copy link
Collaborator Author

Hello @LPereira95 and @ninamiolane,
Could you help me to try to merge this PR before the hackathon please?

Copy link
Collaborator

@ninamiolane ninamiolane left a comment

Choose a reason for hiding this comment

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

LGTM! Two remarks:

  • is_floating should be renamed is_float
  • some tests are failing because of the recent addition of curvatures in geomstats, which do not work on these complex manifolds. You should skip these tests:
    with:
    skip_test_covariant_riemann_tensor_is_skew_symmetric_1 = True
    skip_test_covariant_riemann_tensor_is_skew_symmetric_2 = True
    skip_test_covariant_riemann_tensor_bianchi_identity = True
    skip_test_covariant_riemann_tensor_is_interchange_symmetric = True
    skip_test_riemann_tensor_shape = True
    skip_test_scalar_curvature_shape = True
    skip_test_ricci_tensor_shape = True
    skip_test_sectional_curvature_shape = True

get_default_cdtype,
get_default_dtype,
is_complex,
is_floating,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is floating? Change to is_float



def _is_floating(x):
def is_floating(x):
Copy link
Collaborator

Choose a reason for hiding this comment

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

ditto: change to is_float

get_default_cdtype,
get_default_dtype,
is_complex,
is_floating,
Copy link
Collaborator

Choose a reason for hiding this comment

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

ditto: is_float



def _is_floating(x):
def is_floating(x):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Ditto: is_float

std = _preserve_input_dtype(_add_default_dtype_by_casting(target=_torch.std))


def is_floating(x):
Copy link
Collaborator

Choose a reason for hiding this comment

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

ditto: change to is_float

get_default_cdtype,
get_default_dtype,
is_complex,
is_floating,
Copy link
Collaborator

Choose a reason for hiding this comment

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

ditto: is_float



def _is_floating(x):
def is_floating(x):
Copy link
Collaborator

Choose a reason for hiding this comment

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

is_float

set_default_dtype = _pre_set_default_dtype(as_dtype)

_cast_out_from_dtype = _pre_cast_out_from_dtype(_tf.cast, _is_floating, _is_complex)
_cast_out_from_dtype = _pre_cast_out_from_dtype(_tf.cast, is_floating, is_complex)
Copy link
Collaborator

Choose a reason for hiding this comment

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

is_float

Copy link
Collaborator

Choose a reason for hiding this comment

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

Done.,

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@ninamiolane ninamiolane marked this pull request as ready for review October 17, 2022 08:13
@YannCabanes
Copy link
Collaborator Author

Thank you @ninamiolane and @LPereira95 for helping me for this PR!
Is it finally ready to be merged now are should I still do some modifications ?
(You can push on my branch if more modifications are needed.)

@YannCabanes
Copy link
Collaborator Author

@ninamiolane, there is a problem with TensorFlow unit tests: AttributeError: 'DType' object has no attribute 'is_float'

@YannCabanes YannCabanes deleted the add-hermitian-matrices branch November 17, 2022 06:47
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.

4 participants