-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
CI: Check ASV for failed benchmarks #19236
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,6 +73,10 @@ matrix: | |
env: | ||
- JOB="3.6_NUMPY_DEV" TEST_ARGS="--skip-slow --skip-network" PANDAS_TESTING_MODE="deprecate" | ||
# In allow_failures | ||
- dist: trusty | ||
env: | ||
- JOB="3.6_ASV" ASV=true | ||
# In allow_failures | ||
- dist: trusty | ||
env: | ||
- JOB="3.6_DOC" DOC=true | ||
|
@@ -93,6 +97,9 @@ matrix: | |
- dist: trusty | ||
env: | ||
- JOB="3.6_NUMPY_DEV" TEST_ARGS="--skip-slow --skip-network" PANDAS_TESTING_MODE="deprecate" | ||
- dist: trusty | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jorisvandenbossche prefered this before the doc build |
||
env: | ||
- JOB="3.6_ASV" ASV=true | ||
- dist: trusty | ||
env: | ||
- JOB="3.6_DOC" DOC=true | ||
|
@@ -128,6 +135,7 @@ script: | |
- ci/script_single.sh | ||
- ci/script_multi.sh | ||
- ci/lint.sh | ||
- ci/asv.sh | ||
- echo "checking imports" | ||
- source activate pandas && python ci/check_imports.py | ||
- echo "script done" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
import numpy as np | ||
import pandas.util.testing as tm | ||
from pandas import (DataFrame, Series, rolling_median, rolling_mean, | ||
rolling_min, rolling_max, rolling_var, rolling_skew, | ||
rolling_kurt, rolling_std, read_csv, factorize, date_range) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I might be 'overhead' to keep, but we can also simply move those imports to withing the |
||
from pandas import DataFrame, Series, read_csv, factorize, date_range | ||
from pandas.core.algorithms import take_1d | ||
try: | ||
from pandas import (rolling_median, rolling_mean, rolling_min, rolling_max, | ||
rolling_var, rolling_skew, rolling_kurt, rolling_std) | ||
have_rolling_methods = True | ||
except ImportError: | ||
have_rolling_methods = False | ||
try: | ||
from pandas._libs import algos | ||
except ImportError: | ||
|
@@ -171,8 +175,7 @@ def run(period): | |
class ParallelRolling(object): | ||
|
||
goal_time = 0.2 | ||
params = ['rolling_median', 'rolling_mean', 'rolling_min', 'rolling_max', | ||
'rolling_var', 'rolling_skew', 'rolling_kurt', 'rolling_std'] | ||
params = ['median', 'mean', 'min', 'max', 'var', 'skew', 'kurt', 'std'] | ||
param_names = ['method'] | ||
|
||
def setup(self, method): | ||
|
@@ -181,34 +184,28 @@ def setup(self, method): | |
win = 100 | ||
arr = np.random.rand(100000) | ||
if hasattr(DataFrame, 'rolling'): | ||
rolling = {'rolling_median': 'median', | ||
'rolling_mean': 'mean', | ||
'rolling_min': 'min', | ||
'rolling_max': 'max', | ||
'rolling_var': 'var', | ||
'rolling_skew': 'skew', | ||
'rolling_kurt': 'kurt', | ||
'rolling_std': 'std'} | ||
df = DataFrame(arr).rolling(win) | ||
|
||
@test_parallel(num_threads=2) | ||
def parallel_rolling(): | ||
getattr(df, rolling[method])() | ||
getattr(df, method)() | ||
self.parallel_rolling = parallel_rolling | ||
else: | ||
rolling = {'rolling_median': rolling_median, | ||
'rolling_mean': rolling_mean, | ||
'rolling_min': rolling_min, | ||
'rolling_max': rolling_max, | ||
'rolling_var': rolling_var, | ||
'rolling_skew': rolling_skew, | ||
'rolling_kurt': rolling_kurt, | ||
'rolling_std': rolling_std} | ||
elif have_rolling_methods: | ||
rolling = {'median': rolling_median, | ||
'mean': rolling_mean, | ||
'min': rolling_min, | ||
'max': rolling_max, | ||
'var': rolling_var, | ||
'skew': rolling_skew, | ||
'kurt': rolling_kurt, | ||
'std': rolling_std} | ||
|
||
@test_parallel(num_threads=2) | ||
def parallel_rolling(): | ||
rolling[method](arr, win) | ||
self.parallel_rolling = parallel_rolling | ||
else: | ||
raise NotImplementedError | ||
|
||
def time_rolling(self, method): | ||
self.parallel_rolling() | ||
|
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.
move this after the doc build
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.
@jorisvandenbossche prefered this before the doc build
#19236 (comment)