-
Notifications
You must be signed in to change notification settings - Fork 19
Provide default progress loggers #21
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
Codecov Report
@@ Coverage Diff @@
## master #21 +/- ##
==========================================
+ Coverage 92.42% 92.85% +0.43%
==========================================
Files 1 1
Lines 66 70 +4
==========================================
+ Hits 61 65 +4
Misses 5 5
Continue to review full report at Codecov.
|
The Travis CI tests show at least that a TerminalLogger is used although it is not set explicitly. |
This seems to be quite an elegant solution, good fix. |
Anything else you want to get into this PR or can I merge it over? |
I just checked that it seems to work as expected when used with downstream packages such as EllipticalSliceSampling (to minimize the possibility that we missed something in the tests). I think this PR can be merged. However, now that I became a bit more familiar with the logging system and we have a (hopefully) reasonable way of providing default loggers, I started wondering if we should remove the whole
If feels like this would clean up the code quite a bit. Moreover, the filtering and dropping of logs happens on the level of the metadata of the logs that can be generated and evaluated efficiently, before the actual log message is evaluated. |
If it'll help things, sure. |
I'll play around with the idea and benchmark it, to make sure it's actually not affecting performance. |
But I think it should be part of a subsequent PR. |
Cool, I'll merge for now. Thanks for this one, @devmotion. |
This PR enables default progress loggers that (should) only handle progress logs generated by AbstractMCMC without handling or modifying any other user generated logs. It is based on the following heuristic:
The main disadvantages of this approach are, as far as I can see:
This PR supersedes #19 and replaces #20.
In my local tests it seems to work as expected inside of Juno, the REPL, and within a Jupyter notebook. I still have to figure out proper CI tests.