-
Notifications
You must be signed in to change notification settings - Fork 41
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
Nondescent direction without warnings #363
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #363 +/- ##
=======================================
Coverage 99.73% 99.73%
=======================================
Files 73 73
Lines 6805 6822 +17
=======================================
+ Hits 6787 6804 +17
Misses 18 18 ☔ View full report in Codecov by Sentry. |
That I why I have a few debugs (I think even a general one for messages) which one can set to I can check whether we can adopt that one here as well. |
We can add a flag to the state that tells whether the warning has been printed but it's still not ideal for my example because there is a lot of optimization calls. Even one warning per optimization is quite a lot. |
That is why I have encapsulated that in a debug action, and use a bit of the message passing pattern to collect those. As I said, I can check what best to do, but probably only Thursday evening (busy teaching week). |
This check is not a debug thing technically so probably there is not much to improve here. Anyway, this can wait. |
Well, We also have WarnDebugs (for example if cost increases), where for some algorithms that helps to set some parameters correctly (when theory says: Chose this correct and cost will always decrease, but you can not directly check what correct means or you are too lazy). Example: Constant Stepsize Gradient Descent has by default such a warning. |
This is not really a matter of choosing parameters correctly; just because you get non-descent directions doesn't mean you're doing something wrong. I'd suggest keeping this check always on unless you're sure your combination of manifold, retraction and vector transport is known to not have this issue. |
What I do not like is that keyword parameters get a bit crowded by now here. |
It's not too much IMO but maybe they could be better organized? Anyway, this is a useful feature. |
Sure. I do not say we should not do this. I would still prefer a |
I just started with a We can go for the generic |
Now the result is stored in a This is only used/set if we do not use test coverage might not yet be given, but I wanted to wait for what you think about the idea. I hopefully adapted the documentation accordingly, already. |
That looks fine. My only suggestion is that maybe the state could just store the inner product |
While I think the storage would not make that much of a difference, a disadvantage might be, that the current message also reports when the direction is reset, so without ignore (but also without the reset) just a warning would be issued but no reset performed. This might be a bit complicated to safe in just a value? |
Whether reset was performed or not could be inferred from |
Oh, indeed. What would be the advantage of only twiddling together the string in |
Putting strings together causes allocations and takes some time, that's the main problem. It's fine in debug or reporting code but I prefer to avoid it in the main computational code. |
Sure, that sounds reasonable. Then the string is only concatenated / interpolated when it is actually needed. We should do that. I can check that tomorrow unless you are faster ;) |
I can do the test coverage for the |
OK, thanks. I think my change should make the qN part of the code covered. |
From my side this is fine and could be merged, but since the last commit is mine, it would be great if you could confirm shortly as well that this is fine with you :) |
Sure, everything looks fine. |
The warnings are quite annoying in the hyperparameter optimization example.