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

Resolve pylint benchmarks #178

Merged

Conversation

pnkraemer
Copy link
Collaborator

I did what I claimed I will never do and touch linear solver code... Now the benchmark directory is pylint-clean. Mostly, this amounted to adding some pylint-discard messages but I also changed some code. Nothing major IMO. Everything still benchmarks and I hope the changes are not too opinionated. If I misunderstood something, @JonathanWenger please judge.

@codecov
Copy link

codecov bot commented Aug 26, 2020

Codecov Report

Merging #178 into master will increase coverage by 0.35%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #178      +/-   ##
==========================================
+ Coverage   73.75%   74.10%   +0.35%     
==========================================
  Files          61       61              
  Lines        3124     3167      +43     
  Branches      409      409              
==========================================
+ Hits         2304     2347      +43     
  Misses        659      659              
  Partials      161      161              
Impacted Files Coverage Δ
src/probnum/diffeq/ode/ode.py 100.00% <0.00%> (ø)
src/probnum/filtsmooth/filtsmoothposterior.py 100.00% <0.00%> (ø)
...um/filtsmooth/statespace/discrete/discretemodel.py 100.00% <0.00%> (ø)
...mooth/statespace/discrete/discretegaussianmodel.py 100.00% <0.00%> (ø)
src/probnum/diffeq/odefiltsmooth/ivpfiltsmooth.py 96.77% <0.00%> (+0.05%) ⬆️
src/probnum/diffeq/ode/ivp.py 98.57% <0.00%> (+0.06%) ⬆️
src/probnum/diffeq/odefiltsmooth/prior.py 95.04% <0.00%> (+0.10%) ⬆️
src/probnum/diffeq/odesolution.py 96.55% <0.00%> (+0.25%) ⬆️
...bnum/filtsmooth/gaussfiltsmooth/gaussfiltsmooth.py 91.93% <0.00%> (+0.26%) ⬆️
src/probnum/random_variables/_scipy_stats.py 71.95% <0.00%> (+0.34%) ⬆️
... and 6 more

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 ab66e15...7269727. Read the comment docs.

benchmarks/benchmark_utils.py Outdated Show resolved Hide resolved
benchmarks/distribution.py Outdated Show resolved Hide resolved
def setup(self, dist, property):
def setup(self, dist, method):
# pylint: disable=missing-function-docstring,attribute-defined-outside-init
# pylint: disable=unused-argument
Copy link
Contributor

Choose a reason for hiding this comment

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

# pylint: disable=unused-argument
# pylint: disable=missing-function-docstring

will appear in almost every benchmark and should if possible be ignored for all benchmarks.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The docstring warning makes sense to be ignored globally IMO (the docstrings seem to be super repetitive anyway: "Time method xyz", "Benchmark memory usage of xyz". The unused-argument I am more hesitant about...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I put the ignore for unused-argument back into the tox file. Any idea where we can best document that this is not one of the "we have not resolved this yet" ignores but a "final" ignore? I put a comment into the tox ini file, but if you have a better idea please share.

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe @nathanaelbosch knows a way to ignore specific warnings in a certain folder, however judging from StackOverflow one can only achieve this by having a .pylintrc file in benchmarks and then having two pylint statements (which we already have anyway).

Copy link
Collaborator

Choose a reason for hiding this comment

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

@marvinpfoertner also looked into it and, if I'm not mistaken, came to the conclusion that it's unfortunately not possible to have configs on a per-directory basis.

In general I'm definitely open for ideas to move these exceptions out of the tox.ini, since the current way does not feel ideal.

@pnkraemer pnkraemer merged commit 9fc3341 into probabilistic-numerics:master Sep 1, 2020
@pnkraemer pnkraemer deleted the resolve_pylint_benchmarks branch November 13, 2020 08:20
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.

3 participants