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

[WIP] Improving benchmarks #1137

Closed
wants to merge 13 commits into from
Closed

Conversation

nitishp25
Copy link
Contributor

@nitishp25 nitishp25 commented Apr 5, 2020

Description

Fixes #782 and builds on top of the work done in #1088.

I've moved _fast_kde and _fast_kde_2d to kde_utils and get_bins to stats_utils to resolve cyclic import issues occuring due to import of histogram for the _fast_kde.

I've also modified the benchmarks and will cover more functions soon. Currently, the stats_variance_2d benchmark does not work with Numba disabled but I couldn't figure out why (the function still works with Numba disabled).

cc @OriolAbril, @ahartikainen

Checklist

  • Follows official PR format
  • Includes new or updated tests to cover the new feature
  • Code style correct (follows pylint and black guidelines)
  • Changes are listed in changelog

@OriolAbril
Copy link
Member

Can you rebase the changes to current master? it looks like the first two should not be included in this PR and clutter the files to be reviewed :/

@nitishp25
Copy link
Contributor Author

Can you rebase the changes to current master? it looks like the first two should not be included in this PR and clutter the files to be reviewed :/

Shouldn't the arviz-devs/benchmarks branch be also rebased with the master?

@OriolAbril
Copy link
Member

Ohhhh, I completely overlooked this, I though this was built on top of #1088 to merge into master, not to merge into benchmarks PR. Yes, benchmarks has to be rebased on master and then this branch has to be rebased on benchmarks for this to work.

@nitishp25
Copy link
Contributor Author

nitishp25 commented Apr 7, 2020

Ohhhh, I completely overlooked this, I though this was built on top of #1088 to merge into master, not to merge into benchmarks PR. Yes, benchmarks has to be rebased on master and then this branch has to be rebased on benchmarks for this to work.

I was confused whether to make this PR to master or benchmarks. Is this more inconvinient than making a PR to master?


return np.arange(x_min, x_max + width + 1, width)


def _sturges_formula(dataset, mult=1):
Copy link
Member

Choose a reason for hiding this comment

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

I am not sure about what functions use this, but it looks like it should be moved to stats_utils like get_bins

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Currently, only rank_plot uses this

Comment on lines 10 to 11
from scipy.signal import convolve
from scipy.signal.windows import gaussian
Copy link
Member

Choose a reason for hiding this comment

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

are these needed? maybe they are used by fast_kde?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, there are a few more unsed imports. I'll remove them

@OriolAbril
Copy link
Member

I was confused whether to make this PR to master or benchmarks. Is this more inconvinient than making a PR to master?

Whatever is less work for you will be best.

@nitishp25
Copy link
Contributor Author

nitishp25 commented Apr 7, 2020

Whatever is less work for you will be best.

I think here you would have to always rebase this branch with master everytime you want to review so it's better if I close this and make this PR to master? I think it also resolves conflicting files :)

@nitishp25 nitishp25 closed this Apr 7, 2020
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.

2 participants