Flush JSON after top level finishes - #3418
Conversation
closing top level should flush once, don't flush when closing a nested object
|
only flushing at the top level is fine. I'm honestly not sure this kind of mocked counter test actually adds much value (for example, if it gets flushed more than once, do we really care?) |
|
Yeah fair point, I can remove the test |
This reverts commit 75d9cd0.
|
and did you confirm that this fixes the behavior you were seeing up in cmdstan? |
|
In the process of testing it right now, will report back |
|
Ok I built cmdstan using this stan branch and I can successfully read the JSON during sampling, so I think it's working as intended |
Jenkins Console Log Machine informationNo LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.3 LTS Release: 20.04 Codename: focalCPU: G++: Clang: |
Submission Checklist
./runTests.py src/test/unitmake cpplintSummary
stan-dev/cmdstan#1349 has the context.
Flush when the top level JSON object is finished. @WardBrian I guess this is slightly different than your suggestion, but I think equivalent for the metric JSON files. I wasn't sure if there are ever nested JSON objects in other contexts.
Intended Effect
Make it so that metric JSON files are readable after warmup but before sampling finishes
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):
Jonah Gabry
By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses: