-
-
Notifications
You must be signed in to change notification settings - Fork 370
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
Issue/3200 pathfinder diagnostic #3202
Conversation
is there a pathfinder unit test that checks output files? if so, can add tests for single-path pathfinder. |
How ugly is it to always emit newlines after closing records? I feel like adding a flag for this is not the cleanest solution |
we would have to add "write_newline" to json_writer. also a fine way to go and much much simpler and would probably improve code readability, plus flexibility. shall I re-implement? |
…/stan-dev/stan into issue/3200-pathfinder-diagnostic
…/stan-dev/stan into issue/3200-pathfinder-diagnostic
I realize that breaking iterations out by line is completely unneccessary. the minimal fix for this PR is just adding the "newline" method, no fanciness w/r/t comma between records. if the reviewers prefer, I can simplify the PR and leave the diagnostic JSON as is, simply adding a newline at the end. |
I think I prefer simpler. I wouldn’t be opposed to automatically adding new lines at the end of lists/records, if that produces desirable output, but doing it case by case seems clunky |
simplified. will try to remember this for next time. |
…/stan-dev/stan into issue/3200-pathfinder-diagnostic
…/stan-dev/stan into issue/3200-pathfinder-diagnostic
…/stan-dev/stan into issue/3200-pathfinder-diagnostic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
Submission Checklist
./runTests.py src/test/unit
make cpplint
Summary
Add hooks to json_writer to put newlines around records and update single-path pathfinder accordingly.
Also got rid of all calls to boost::lexical_cast - see #3201
Intended Effect
Produce readable-ish JSON; output file will be properly terminated, diagnostics from each iteration are on their own line.
How to Verify
Unit tests.
Side Effects
N/A
Documentation
N/A
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: