-
Notifications
You must be signed in to change notification settings - Fork 201
Allow fallback to take more than one iteration to converge #991
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
✅ Deploy Preview for salsa-rs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
CodSpeed Performance ReportMerging #991 will not alter performanceComparing Summary
|
ibraheemdev
left a comment
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.
This makes sense to me. Do you think Fallback is still a good name for the operation, as opposed to something like Restart?
Also, should the test here be using FallbackImmediate?
|
I don't think that test needs to use |
|
Looking at a rename, it seems like maybe I think I'd prefer to land this with minimal API changes for now, and revisit API changes / renames later. I have some other possible features in mind that would also change the API (e.g. having the cycle recovery function accept the latest and previous iterations' values, to help users maintain monotonicity), and it would probably be best to do the API changes together if possible. |
The
Fallbackoption for fixpoint iteration has proved not very useful in practice, due to the requirement that the fallback value must converge in the very next iteration. In order to make it more useful, allow it to converge in any number of iterations. In other words, with this PR it is no longer an immediate fallback (that option is covered byFallbackImmediate), instead it allows "jumping" fixpoint iteration to a new point, and iterating from there. It is up to the user to provide a fallback value that will converge, otherwise it is still possible to reach a "too many iterations" panic after returningFallback.I have a working proof-of-concept in ty of using this new capability to avoid "too many iterations" in divergent cases by falling back to a
Divergenttype.