-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
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
CLN: ASV inference benchmark #18759
CLN: ASV inference benchmark #18759
Conversation
Codecov Report
@@ Coverage Diff @@
## master #18759 +/- ##
==========================================
- Coverage 91.61% 91.59% -0.03%
==========================================
Files 153 153
Lines 51363 51363
==========================================
- Hits 47058 47047 -11
- Misses 4305 4316 +11
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #18759 +/- ##
==========================================
+ Coverage 91.61% 91.61% +<.01%
==========================================
Files 153 154 +1
Lines 51363 51430 +67
==========================================
+ Hits 47058 47120 +62
- Misses 4305 4310 +5
Continue to review full report at Codecov.
|
asv_bench/benchmarks/inference.py
Outdated
import pandas as pd | ||
import numpy as np | ||
import pandas.util.testing as tm | ||
import pandas._libs.lib as lib |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so this is not backward compat before 0.20., but I think ok for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you recall what this import would be pre 0.20?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from pandas import lib
(this is in fact what pandas/lib.py
does now, but that will get blown away in 0.22
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can import lib from pandas_vb_common.py
, the back compat is handled there
asv_bench/benchmarks/inference.py
Outdated
# from GH 7332 | ||
goal_time = 0.2 | ||
params = ['int64', 'int32', 'uint32', 'float32', 'float64'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add uint64. you can add int16, int8, uint16, uint8 as well to cover the bases
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we may want to define these numeric dtypes elsewhere and import here (so we are consistent across the asv),
and prob for datetimelike as well
asv_bench/benchmarks/inference.py
Outdated
|
||
param_names = ['dtype', 'downcast'] | ||
params = [['string-float', 'string-int', 'string-nint', 'datetime64', | ||
'int-list', 'int32'], | ||
[None, 'integer', 'signed', 'unsigned', 'float']] | ||
|
||
N = 500000 | ||
N2 = int(N / 2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was for a good reason, you can't use floats to multiply lists (I find it a bit strange that this didn't fail for you)
Created a new
|
asv_bench/benchmarks/inference.py
Outdated
try: | ||
import pandas._libs.lib as lib | ||
except ImportError: | ||
import pandas.lib as lib |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would keep this in pandas_vb_common
, you can just import lib from there (as this can then be reused in multiple files)
@jorisvandenbossche changed the |
thanks! |
Flake8 and removed star imports
Used
params
andsetup_cache
where possible