Skip to content

Updates for asv suite #10928

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

Merged
merged 4 commits into from
Aug 29, 2015
Merged

Conversation

qwhelan
Copy link
Contributor

@qwhelan qwhelan commented Aug 29, 2015

@jorisvandenbossche As you requested in #10849, here's the current state of affairs. The changes are:

  • First patch:
    • Fix the translation script so that functions defined in the vbench setup string get defined as classmethods and called appropriately. This fixes most failing tests.
    • Some backwards-compatibility fixes around imports. Raising NotImplementedError inside setup() is equivalent to SkipTest, so I've tried to do that in a couple necessary cases (such as things using test_parallel)
    • Speaking of test_parallel, this required a bit of hackery to support not-existing. I implemented a no-op decorator by that name so that the actual definition of test cases wouldn't fail. We simply raise NotImplementedError rather than test without it, however.
  • Second patch:
    • Support Python 3, the changes are essentially what I mentioned elsewhere.
    • from pandas_vb_common import * -> from .pandas_vb_common import *
    • Replace xrange with range and add from pandas.compat import range in pandas_vb_common
    • Replace string.uppercase with string.ascii_uppercase
  • Third patch
    • asv instructions in contributing.rst, largely lifted from the vbench description. The current examples are minimalist, but most comparable to what vbench outputs.
  • Fourth patch:
    • Re-run the translation script. I think some other additions may be included in the first patch due to having run it a few times while making changes.

cc @jreback @TomAugspurger

@jreback jreback added the Performance Memory or execution speed performance label Aug 29, 2015
@jreback jreback added this to the 0.17.0 milestone Aug 29, 2015

def remove(self, f):
try:
os.remove(self.f)
Copy link
Contributor

Choose a reason for hiding this comment

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

I would put all of these in a base class, maybe Base and inherit all tests from it (rather than object). You might want several levels of this for various ones (e.g. IOBase) or whatever. Just to remove some boilerplate.

You could e.g. in IOBase have teardown always do a .remove

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My expectation is that any of the benchmark modules will have a handful of classes post-cleanup. asv doesn't require different classes per benchmark, so we can put time_foo() and time_bar() on the same class. Also, these changes are all auto-generated.

@jorisvandenbossche
Copy link
Member

@jreback regarding your comments, I think that mainly are the things that will have to be handled manually (@qwhelan is that correct?) That is the clean-up mentioned in #10849

@jreback
Copy link
Contributor

jreback commented Aug 29, 2015

sure that is fine
yes iirc that is a further cleanup

ok so merge when ready then

@qwhelan
Copy link
Contributor Author

qwhelan commented Aug 29, 2015

@jorisvandenbossche Yes, that is correct. The only manual changes were in vbench_to_asv.py and inside vb_suite (which were propagated to asv_bench by rerunning the former). I also manually ensured some new asv tests added by others didn't get overwritten.

Just pushed some small changes (StringIO change and added a new line in contributing). I think it's good to merge.

jorisvandenbossche added a commit that referenced this pull request Aug 29, 2015
@jorisvandenbossche jorisvandenbossche merged commit 70607ba into pandas-dev:master Aug 29, 2015
@jorisvandenbossche
Copy link
Member

@qwhelan Thanks a lot for this!

@qwhelan
Copy link
Contributor Author

qwhelan commented Aug 29, 2015

Of course.

I also have a bunch of asv run data I should throw up on a github.io page
so the EuroScipy folks can look into some of the regressions (won't get to
this for probably 6+ hours).
On Aug 29, 2015 3:42 PM, "Joris Van den Bossche" [email protected]
wrote:

@qwhelan https://github.com/qwhelan Thanks a lot for this!


Reply to this email directly or view it on GitHub
#10928 (comment).

@qwhelan
Copy link
Contributor Author

qwhelan commented Aug 30, 2015

@jorisvandenbossche My run data should be accessible here: http://qwhelan.github.io/pandas_asv/ .

An explicit list of regressions can be seen here: http://qwhelan.github.io/pandas_asv/#/regressions

@@ -41,7 +41,10 @@
"sqlalchemy": [],
"scipy": [],
"numexpr": [],
"pytables": [],
"tables": [],
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did you change pytables to tables? It doesn't work for me know with conda. It ask if I meant pytables.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@RafalSkolasinski Looks like Anaconda changed the package name - it's on PyPI as tables: https://pypi.python.org/pypi/tables . I didn't want to force people to use conda or virtualenv, but I don't see an easy way to support both due to this name change.

Copy link
Contributor

Choose a reason for hiding this comment

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

@qwhelan I see... That's weird that package is named tables in pypi. even original webpage reads http://www.pytables.org/

Copy link
Member

Choose a reason for hiding this comment

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

but the 'import name' is tables I think.

In any case, we are probably not going to be able to specify a fully correct asv.conf.json file (eg also for windows an extra entry has to be added). So I would propose to choose one case (I would say: conda on linux) and make it work for that, and then clearly explain in the docs or readme what has to be changed to use it in the other cases.

@behzadnouri
Copy link
Contributor

from pandas_vb_common import * -> from .pandas_vb_common import *

has broken test_perf.sh. running benchmarks fails, with ImportError: No module named pandas_vb_common. (on python 2)

@jorisvandenbossche
Copy link
Member

Now we did the conversion (and it is the idea we shouldn't have to do this again, as we start changing the asv benchmarks direclty), we can change this (from pandas_vb_common import *) back to how it was in the vb_suite benchmarks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Performance Memory or execution speed performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants