-
-
Notifications
You must be signed in to change notification settings - Fork 379
bool is_empty() for not writing to files. #3081
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
Conversation
Update version numbers to 2.28
Switch to stanc3 test models for integration tests
…4.1 (tags/RELEASE_600/final)
add std:: in tests to avoid ambiguity
…4.1 (tags/RELEASE_600/final)
|
Nice! Thanks Steve! Can you change so that the PR is done towards master? I think we want to do a .2 release, given our 4 month releae schedule. |
|
I will review in a bit. |
|
@rok-cesnovar Do we want it on master or do we want to merge this to develop and then do a full release of 2.28.2? Maybe in the future we could make a branch for each release and then when we do bugfixes we can cherry pick changes and patch them into previous releases? I think that's what Eigen does |
We want it done towards
We have release branches as well: https://github.com/stan-dev/stan/tree/release/v2.28.1 If we wanted to back-port some fix to 2.27.0 we should do it to that branch, but given that we are patching the current release I think just doing it to master is the easiest also for release script purposes. |
|
And master will be merged to develop then obviously. |
72e0169 to
4ddcdcc
Compare
|
I tried to work some git magic to make this branch mergeable to master, but that won't fly. Will make a separate branch and open a separate PR with your changes. Thanks again! |
Submission Checklist
./runTests.py src/test/unitmake cpplintSummary
Fixes for #1055 @rok-cesnovar @fcostin I ended up taking the bool approach as when I looked over the code I often see we do things to write to the diagnostics like in
mcmc_writer.hppand I'm like, why do any of that? If we have a bool inside of the
writerwe can just check if we've reported this thing as empty already and then do nothing in the entire function by just wrapping the body inif (!is_empty()) { ... }.So to do that I just put a bool member inside of the writers and added a bool argument to the constructor for each one with a default value of
false. So all code should work as normal, then up incommand.hppI can just update the constructor for the writer when we see we are writing diagnostics to an empty stream.Intended Effect
Remove performance loss from writing diagnostics always from #3028
How to Verify
Tests added to check writing with
empty_ == trueis a no-opSide Effects
Documentation
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): Steve Bronder
By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses: