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

Make dependencies less strict #95

Merged
merged 3 commits into from
Jul 3, 2021
Merged

Make dependencies less strict #95

merged 3 commits into from
Jul 3, 2021

Conversation

lazyoracle
Copy link
Member

@lazyoracle lazyoracle commented May 21, 2021

What

Makes dependency requirements flexible

Why

Fixes #97

How

  • Less strict requirements with >=
  • test/test_envelopes.py has been updated to include a variable atol which is calculated based on the desired data. This was outlined in Further tests and reading loading config checks #89 and the same has been adopted here after some refactoring to allow for easy updating and maintenance.

@lazyoracle
Copy link
Member Author

@GlaserN Do you have any insights on what might have led to the following test fail?

test/test_envelopes.py:262: in <module>
    test_gaussian()
test/test_envelopes.py:190: in test_gaussian
    actual=envelopes["gaussian"](t=ts, params=params), desired=test_data["gaussian"]
E   AssertionError: 
E   Not equal to tolerance rtol=1e-07, atol=0
E   
E   Mismatched elements: 2 / 100 (2%)
E   Max absolute difference: 6.51925802e-09
E   Max relative difference: 1.33211993e-15
E    x: array([2.566574e-09, 5.401866e+05, 1.172500e+06, 1.909621e+06,
E          2.765382e+06, 3.754771e+06, 4.893897e+06, 6.199942e+06,
E          7.691067e+06, 9.386301e+06, 1.130537e+07, 1.346853e+07,...
E    y: array([0.000000e+00, 5.401866e+05, 1.172500e+06, 1.909621e+06,
E          2.765382e+06, 3.754771e+06, 4.893897e+06, 6.199942e+06,
E          7.691067e+06, 9.386301e+06, 1.130537e+07, 1.346853e+07,...

We have only made the requirements of dependencies less strict by allowing upgrades to the latest version of tensorflow. There s no API breaking changes with tensorflow that affects us and if we were relying on some specific/weird aspects of the tensorflow implementations, this might be a good time to revisit it because we definitely do not wish to restrict our dependencies to a particular release.

@lazyoracle lazyoracle linked an issue May 26, 2021 that may be closed by this pull request
@GlaserN
Copy link
Collaborator

GlaserN commented May 26, 2021

I guess the rtol or atol of this test has to be adjusted. The 2 mismatched elements are 1e-15 smaller than all the other elements meaning that we seem to have some numerical artefacts happening here.

@lazyoracle lazyoracle mentioned this pull request Jul 3, 2021
@pull-request-size pull-request-size bot added size/L and removed size/M labels Jul 3, 2021
@codecov
Copy link

codecov bot commented Jul 3, 2021

Codecov Report

Merging #95 (6cf6c1d) into dev (6ee8d75) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##              dev      #95   +/-   ##
=======================================
  Coverage   65.28%   65.28%           
=======================================
  Files          36       36           
  Lines        5292     5292           
=======================================
  Hits         3455     3455           
  Misses       1837     1837           

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 6ee8d75...6cf6c1d. Read the comment docs.

@lazyoracle lazyoracle marked this pull request as ready for review July 3, 2021 13:30
@lazyoracle lazyoracle merged commit f20f566 into dev Jul 3, 2021
@lazyoracle lazyoracle deleted the flexi-req branch July 3, 2021 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flexible Dependency Management
2 participants