Skip to content
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

Adds Improved Error Handling, Documentation, and Tests For The Refine Module #7926

Merged
merged 5 commits into from
Mar 12, 2025

Conversation

cezarc1
Copy link
Contributor

@cezarc1 cezarc1 commented Mar 9, 2025

Of note: Adds configurable fail_count parameter to Refine to control how many errors are tolerated before throwing. By default we will throw once if all of the underlying module's calls fails.

Adds in-line documentation to both Refine and BestOfN and in the cheatsheet.

@okhat
Copy link
Collaborator

okhat commented Mar 10, 2025

This is amazing, thanks so much @cezarc1 ! Timing is interesting because we're considering how to act on this and #7922 together. We will merge both PRs, but the question is what's the final design that emerges from that.

@cezarc1
Copy link
Contributor Author

cezarc1 commented Mar 10, 2025

@okhat . I see! I missed #7922. As I think it was mentioned in #7922 I still see the benefits of Refine and BestofN still existing as my understanding is that the retry mechanism in that PR requires a new adapter, while Refine and BestOfN do not require a new adapter in order to work.

My $0.02 is that, from a design perspective, both Refine and BestofN (or other mechanisms) should work without any special new Adapters.

An alternative is for feedback, as a concept, should be implemented into the Adapter system, similar to how demos currently are.

@okhat okhat merged commit ef32f66 into stanfordnlp:main Mar 12, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants