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 a num_threads helper argument to pathfinder() #741

Merged
merged 4 commits into from
Mar 25, 2024

Conversation

WardBrian
Copy link
Member

@WardBrian WardBrian commented Mar 18, 2024

Submission Checklist

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

Summary

Closes #738 by adding a keyword argument num_threads. This checks that the model was compiled with STAN_THREADS defined and if so, sets the environment variable STAN_NUM_THREADS to the desired value.

This also fixes a small oversight pointed out on the forums: https://discourse.mc-stan.org/t/pathfinder-does-not-accept-multiple-inits/34580/

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):

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

@WardBrian WardBrian requested a review from mitzimorris March 18, 2024 19:52
@codecov-commenter
Copy link

codecov-commenter commented Mar 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.67%. Comparing base (b420952) to head (71d22e0).
Report is 5 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #741      +/-   ##
===========================================
- Coverage    79.81%   79.67%   -0.14%     
===========================================
  Files           75       25      -50     
  Lines        11502     3843    -7659     
===========================================
- Hits          9180     3062    -6118     
+ Misses        2322      781    -1541     

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

Copy link
Member

@mitzimorris mitzimorris left a comment

Choose a reason for hiding this comment

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

LGTM - many thanks!

test/test_sample.py Outdated Show resolved Hide resolved
Copy link
Member

@mitzimorris mitzimorris left a comment

Choose a reason for hiding this comment

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

very clear! many thanks!

@WardBrian WardBrian merged commit de2e73c into develop Mar 25, 2024
16 checks passed
@WardBrian WardBrian deleted the feat/738-pathfinder-threads branch March 25, 2024 20:51
@WardBrian
Copy link
Member Author

I will do a patch release tomorrow

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.

add parallel options for multi-path pathfinder
3 participants