Skip to content
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

add timing information for sampler outputs #779

Merged
merged 14 commits into from
Feb 19, 2025
Merged

Conversation

mitzimorris
Copy link
Member

Submission Checklist

  • Run unit tests
  • Declare copyright holder and open-source license: see below

Summary

Added routine to `utils/stancsv.py' to scrape timing information from sampler outputs; it captures the timing information from each run as a dict with keys 'warmup', 'sampling', and 'total'.

Capturing total time will allow us to calculate the ESS/sec. One could argue that this should be part of CmdStan's 'stansummary' - it was dropped to match current outputs of posterior and cmdstanr. Note that cmdstanr provides method 'time' to do this: https://mc-stan.org/cmdstanr/reference/fit-method-time.html

Copyright and Licensing

Please list the copyright holder for the work you are submitting (this will be you or your assignee, such as a university or company): Columbia University

By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses:

Copy link
Member

@WardBrian WardBrian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Three minor points but this looks good, thanks for tackling!

@codecov-commenter
Copy link

codecov-commenter commented Feb 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.36%. Comparing base (650d2bb) to head (7fe4ef1).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #779      +/-   ##
===========================================
+ Coverage    80.24%   80.36%   +0.11%     
===========================================
  Files           25       25              
  Lines         3878     3926      +48     
===========================================
+ Hits          3112     3155      +43     
- Misses         766      771       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@WardBrian WardBrian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great -- thanks!

@mitzimorris mitzimorris merged commit 797fa6e into develop Feb 19, 2025
16 checks passed
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 this pull request may close these issues.

3 participants