Skip to content

Commit 7c8041b

Browse files
pvTomAugspurger
authored andcommitted
PERF/CI: fix benchmark import error + run asv check on all builds (pandas-dev#26575)
* PERF: fix asv import error * CI: run asv check on all builds * PERF: since TimeGrouper was removed, remove benchmarks concerning it * PERF: fix benchmark frame_methods.Iteration.mem_itertuples_to_list The runtime of the benchmark increased in asv 0.4 (which has upgraded asv.extern.asizeof), so bump the timeout upward.
1 parent a60d1bd commit 7c8041b

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

asv_bench/benchmarks/frame_methods.py

+2
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ def time_dict_rename_both_axes(self):
9696

9797

9898
class Iteration:
99+
# mem_itertuples_* benchmarks are slow
100+
timeout = 120
99101

100102
def setup(self):
101103
N = 1000

asv_bench/benchmarks/groupby.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
from functools import partial
22
from itertools import product
33
from string import ascii_letters
4-
import warnings
54

65
import numpy as np
76

87
from pandas import (
9-
Categorical, DataFrame, MultiIndex, Series, TimeGrouper, Timestamp,
8+
Categorical, DataFrame, MultiIndex, Series, Timestamp,
109
date_range, period_range)
1110
import pandas.util.testing as tm
1211

@@ -301,10 +300,6 @@ def setup(self):
301300
def time_multi_size(self):
302301
self.df.groupby(['key1', 'key2']).size()
303302

304-
def time_dt_timegrouper_size(self):
305-
with warnings.catch_warnings(record=True):
306-
self.df.groupby(TimeGrouper(key='dates', freq='M')).size()
307-
308303
def time_category_size(self):
309304
self.draws.groupby(self.cats).size()
310305

asv_bench/benchmarks/io/parsers.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
import numpy as np
22

3-
from pandas._libs.tslibs.parsing import (
4-
_concat_date_cols, _does_string_look_like_datetime)
3+
try:
4+
from pandas._libs.tslibs.parsing import (
5+
_concat_date_cols, _does_string_look_like_datetime)
6+
except ImportError:
7+
# Avoid whole benchmark suite import failure on asv (currently 0.4)
8+
pass
59

610

711
class DoesStringLookLikeDatetime(object):

azure-pipelines.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,11 @@ jobs:
9797
- script: |
9898
export PATH=$HOME/miniconda3/bin:$PATH
9999
source activate pandas-dev
100+
cd asv_bench
101+
asv check -E existing
100102
git remote add upstream https://github.com/pandas-dev/pandas.git
101103
git fetch upstream
102104
if git diff upstream/master --name-only | grep -q "^asv_bench/"; then
103-
cd asv_bench
104105
asv machine --yes
105106
ASV_OUTPUT="$(asv dev)"
106107
if [[ $(echo "$ASV_OUTPUT" | grep "failed") ]]; then

0 commit comments

Comments
 (0)