Skip to content

Commit 5c3af0d

Browse files
committed
Rename make_update_stats_functions to _make_progressbar_update_functions
1 parent 33427a0 commit 5c3af0d

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

pymc/progress_bar.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,8 @@ def __init__(
209209
210210
When sampling, Step classes are responsible for computing and exposing statistics that can be reported on
211211
progress bars. Each Step implements two class methods: :meth:`pymc.step_methods.BlockedStep._progressbar_config`
212-
and :meth:`pymc.step_methods.BlockedStep._make_update_stats_function`. `_progressbar_config` reports which
213-
columns should be displayed on the progress bar, and `_make_update_stats_function` computes the statistics
212+
and :meth:`pymc.step_methods.BlockedStep._make_progressbar_update_functions`. `_progressbar_config` reports which
213+
columns should be displayed on the progress bar, and `_make_progressbar_update_functions` computes the statistics
214214
that will be displayed on the progress bar.
215215
216216
Parameters
@@ -281,7 +281,7 @@ def __init__(
281281
progressbar_theme=progressbar_theme,
282282
)
283283
self.progress_stats = progress_stats
284-
self.update_stats_functions = step_method._make_update_stats_functions()
284+
self.update_stats_functions = step_method._make_progressbar_update_functions()
285285

286286
self._show_progress = show_progress
287287
self.divergences = 0

pymc/step_methods/compound.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def _progressbar_config(n_chains=1):
189189
return columns, stats
190190

191191
@staticmethod
192-
def _make_update_stats_functions():
192+
def _make_progressbar_update_functions():
193193
def update_stats(step_stats):
194194
return step_stats
195195

@@ -332,10 +332,10 @@ def _progressbar_config(self, n_chains=1):
332332

333333
return columns, stats
334334

335-
def _make_update_stats_functions(self):
335+
def _make_progressbar_update_functions(self):
336336
update_functions = []
337337
for method in self.methods:
338-
update_functions.extend(method._make_update_stats_functions())
338+
update_functions.extend(method._make_progressbar_update_functions())
339339
return update_functions
340340

341341

pymc/step_methods/hmc/nuts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ def _progressbar_config(n_chains=1):
248248
return columns, stats
249249

250250
@staticmethod
251-
def _make_update_stats_functions():
251+
def _make_progressbar_update_functions():
252252
def update_stats(stats):
253253
return {key: stats[key] for key in ("diverging", "step_size", "tree_size")}
254254

pymc/step_methods/metropolis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ def _progressbar_config(n_chains=1):
346346
return columns, stats
347347

348348
@staticmethod
349-
def _make_update_stats_functions():
349+
def _make_progressbar_update_functions():
350350
def update_stats(step_stats):
351351
return {
352352
"accept_rate" if key == "accept" else key: step_stats[key]

pymc/step_methods/slicer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ def _progressbar_config(n_chains=1):
212212
return columns, stats
213213

214214
@staticmethod
215-
def _make_update_stats_functions():
215+
def _make_progressbar_update_functions():
216216
def update_stats(step_stats):
217217
return {key: step_stats[key] for key in {"tune", "nstep_out", "nstep_in"}}
218218

0 commit comments

Comments
 (0)