Closed JelleAalbers closed 2 years ago
Thanks @JelleAalbers. This looks good. The tests currently fail due to version conflicts. Once I've merged https://github.com/jonasrauber/eagerpy/pull/47 into master, could you update your PR to include these changes (we then test with PyTorch 1.9.0, so you can remove your workaround for inverse hyperbolics)? Looking forward to merging this once the tests pass :)
@JelleAalbers FYI: I just updated PR to include the latest updates from master
Merging #46 (b44c0a3) into master (dad71ff) will decrease coverage by
0.10%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## master #46 +/- ##
===========================================
- Coverage 100.00% 99.89% -0.11%
===========================================
Files 16 16
Lines 1760 1860 +100
===========================================
+ Hits 1760 1858 +98
- Misses 0 2 +2
Impacted Files | Coverage Δ | |
---|---|---|
eagerpy/tensor/tensor.py | 100.00% <ø> (ø) |
|
eagerpy/framework.py | 100.00% <100.00%> (ø) |
|
eagerpy/tensor/jax.py | 100.00% <100.00%> (ø) |
|
eagerpy/tensor/numpy.py | 100.00% <100.00%> (ø) |
|
eagerpy/tensor/pytorch.py | 100.00% <100.00%> (ø) |
|
eagerpy/tensor/tensorflow.py | 100.00% <100.00%> (ø) |
|
eagerpy/tensor/extensions.py | 93.10% <0.00%> (-6.90%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update dad71ff...b44c0a3. Read the comment docs.
First of all, thanks for creating this great package!
This PR adds the twelve basic trigonometric functions -- sin, cos, tan, their hyperbolics, inverses, and inverse hyperbolics. Currently eagerpy only has tanh and arctanh.
PyTorch added inverse hyperbolics in 1.6.0 / July 2020. Since eagerpy's test builds still use torch 1.4.0, the implementation falls back to (less numerically stable) implementations in terms of logarithms if needed.