Skip to content

Commit 639c7bd

Browse files
authored
Update benchmarks to work again (#3674)
1 parent 2fd2a5a commit 639c7bd

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

benchmarks/asv.conf.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@
4141
// package (in PyPI) and the values are version numbers. An empty
4242
// list indicates to just test against the default (latest)
4343
// version.
44-
"matrix": {
45-
},
44+
"matrix": {},
4645

4746
// The directory (relative to the current directory) that benchmarks are
4847
// stored in. If not provided, defaults to "benchmarks"
@@ -66,7 +65,7 @@
6665
// `asv` will cache wheels of the recent builds in each
6766
// environment, making them faster to install next time. This is
6867
// number of builds to keep, per environment.
69-
"wheel_cache_size": 2,
68+
"build_cache_size": 2,
7069

7170
// The commits after which the regression search in `asv publish`
7271
// should start looking for regressions. Dictionary whose keys are

benchmarks/benchmarks/benchmarks.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def track_glm_hierarchical_ess(self, init):
151151
start=start, random_seed=100, progressbar=False,
152152
compute_convergence_checks=False)
153153
tot = time.time() - t0
154-
ess = pm.effective_n(trace, ('mu_a',))['mu_a']
154+
ess = float(pm.ess(trace, var_names=['mu_a'])['mu_a'].values)
155155
return ess / tot
156156

157157
def track_marginal_mixture_model_ess(self, init):
@@ -165,7 +165,7 @@ def track_marginal_mixture_model_ess(self, init):
165165
start=start, random_seed=100, progressbar=False,
166166
compute_convergence_checks=False)
167167
tot = time.time() - t0
168-
ess = pm.effective_n(trace, ('mu',))['mu'].min() # worst case
168+
ess = pm.ess(trace, var_names=['mu'])['mu'].values.min() # worst case
169169
return ess / tot
170170

171171

@@ -190,7 +190,7 @@ def track_glm_hierarchical_ess(self, step):
190190
random_seed=100, progressbar=False,
191191
compute_convergence_checks=False)
192192
tot = time.time() - t0
193-
ess = pm.effective_n(trace, ('mu_a',))['mu_a']
193+
ess = float(pm.ess(trace, var_names=['mu_a'])['mu_a'].values)
194194
return ess / tot
195195

196196

0 commit comments

Comments
 (0)