-
Notifications
You must be signed in to change notification settings - Fork 39
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
Change rrule verbosity behaviour #106
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #106 +/- ##
==========================================
+ Coverage 86.08% 87.19% +1.10%
==========================================
Files 32 32
Lines 3385 3381 -4
==========================================
+ Hits 2914 2948 +34
+ Misses 471 433 -38 ☔ View full report in Codecov by Sentry. |
What happens if you just add a -1 setting to disable all warnings, and still have it default to printing the warnings as well? |
Then you get the old behaviour if I understand your suggestion correctly (except then for the |
I am okay with not printing the warnings and having them on an opt-in level, it's just that I don't think I realized I could turn them off by setting the verbosity to -1, and maybe other people also didn't. What I mean then is, that it might not be necessary to change this behavior, if you could just get it to behave like that anyways with a setting. Ultimately though, I have no strong feelings about this, I guess that if things are going wrong I would typically start debugging by setting the verbosity levels higher anyways. |
The |
Thinking some more about it, current behavior for the forward algorithms is that
I could remove the info message at verbosity = 1. Then both the forward algorithm and the reverse rule have "verbosity = 1" being something like "warning mode". No info, only warnings. The question is then if having only the final info requires a separate level (level 2), and so the per iteration info shifts to level 3. |
I think an additional level should be included:
This addition is necessary because there could be numerous iterations that might overwhelm the screen. |
Ok, a long overdue update here: I've also made level 1 the default, so that warnings will be printed if a method does not converge (this is new!). However, also the default ( Finally, for the AD rules, I've taken the following approach: the I realise this will not be the final solution here, and some features might be made nicer (e.g. using Preferences.jl for the defaults). But for know, I think I am happy with this (it also took much more time than anticipated to redesign and in particularly test all the logs). So if the tests turn green, this is good to go for me, unless there are pertinent comments by @lkdvos or @XingyuZhang2018 . |
This drastically changes the behaviour of verbosity in the
rrule
s:rrule
s are now controlled byalg_primal.verbosity
rather thanalg_rrule.verbosity
. This way,alg_rrule
is fully restricted to specifying the linear/eigen subproblem solved in therrule
. I think it is more naturally that warnings or info printed in therrule
of a certain algorithm are controlled by the verbosity setting of that algorithmrrule
s is increased by one, i.e. withverbosity=0
none of the warnings will be printed. I am still not sure if that is the right decision. Some of these warnings could point to errors. Whereas for the primal algorithm, it is the user's responsibility to check for convergence in theinfo
struct, so that it makes sense that warnings about lack of convergence are only printed forverbosity >= 1
, it is impossible to check this for the pullbackAside from this, this PR also removes
MinimalVec
and takes the one from VectorInterface.jl 0.5. Maybe that required a separate PR, but here we are 😸 .