-
Notifications
You must be signed in to change notification settings - Fork 280
Add Hermitian matrices #1593
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
Add Hermitian matrices #1593
Conversation
Codecov Report
@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
|
Hello @ninamiolane and @LPereira95, |
luisfpereira
left a comment
There was a problem hiding this 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.
|
Hello @LPereira95, @ninamiolane and @nguigs, |
|
Hello @LPereira95 and @ninamiolane, |
Skip unit-tests that are failing too often (Stiefel, Gamma, Dirichlet)
Rename: OpenSet's ambient_space -> embedding_space & SPDMetricXXX -> SPDXXXMetric
Add curvature tensors - Follow-up from PR geomstats#1606
ninamiolane
left a comment
There was a problem hiding this 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, |
There was a problem hiding this comment.
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): |
There was a problem hiding this comment.
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
geomstats/_backend/numpy/__init__.py
Outdated
| get_default_cdtype, | ||
| get_default_dtype, | ||
| is_complex, | ||
| is_floating, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto: is_float
geomstats/_backend/numpy/_dtype.py
Outdated
|
|
||
|
|
||
| def _is_floating(x): | ||
| def is_floating(x): |
There was a problem hiding this comment.
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): |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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): |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is_float
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.,
…tats into add-hermitian-matrices
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
|
Thank you @ninamiolane and @LPereira95 for helping me for this PR! |
|
@ninamiolane, there is a problem with TensorFlow unit tests: AttributeError: 'DType' object has no attribute 'is_float' |
No description provided.