Skip to content

Unused compute_draw_speed #7798

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

Closed
williambdean opened this issue May 23, 2025 · 1 comment · Fixed by #7801
Closed

Unused compute_draw_speed #7798

williambdean opened this issue May 23, 2025 · 1 comment · Fixed by #7801

Comments

@williambdean
Copy link
Contributor

williambdean commented May 23, 2025

This logic is redefined

pymc/pymc/util.py

Lines 860 to 870 in c8d83ca

def compute_draw_speed(self, chain_idx, draws):
elapsed = self._progress.tasks[chain_idx].elapsed
speed = draws / max(elapsed, 1e-6)
if speed > 1 or speed == 0:
unit = "draws/s"
else:
unit = "s/draws"
speed = 1 / speed
return speed, unit

pymc/pymc/util.py

Lines 939 to 948 in c8d83ca

def compute_draw_speed(elapsed, draws):
speed = draws / max(elapsed, 1e-6)
if speed > 1 or speed == 0:
unit = "draws/s"
else:
unit = "s/draws"
speed = 1 / speed
return speed, unit

@ricardoV94
Copy link
Member

Wanna fix it @williambdean ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants