Conversation
8838ff2 to
d0cd7de
Compare
benjibc
approved these changes
Aug 20, 2025
eval_protocol/pytest/types.py
Outdated
| If your evaluation can be computed pointwise, use "pointwise" as EP can pipeline the rollouts and evals to be faster. | ||
| "pointwise": (default) applies test function to each row (rollout result). | ||
| "groupwise": applies test function to a group of rollout results from the same original row (for use cases such as dpo/grpo). | ||
| "listwise": applies test function to the whole dataset. |
Contributor
There was a problem hiding this comment.
listwise is confusing, probably just "all" or something
|
|
||
| _litellm = importlib.import_module("litellm") | ||
| acompletion = getattr(_litellm, "acompletion") | ||
| logger.debug(f"********** request_params: {request_params} **********") |
| response = await acompletion(**request_params) | ||
|
|
||
| assistant_content = response.choices[0].message.content or "" | ||
| logger.debug(f"********** assistant_content: {assistant_content} **********") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add support for groupwise evaluation
Groupwise is equivalent to the "batch" mode in the old @reward_function use case, in groupwise mode, multiple rollout results by completion_params from the same input row will be sent into user's evaluation function. User can perform side by side comparison within the same group. This mode can provide a easier way to do llm as a judge, as user only need to let the judge to determine which one is better, instead of giving a pointwise score.
Also updated the mode to "pointwise", "groupwise" and "listwise".
Test case output for svg generation:
todo: need better UI rendering for groupwise mode
note: this is not the most optimized way to implement this, ideally rollout and eval should be pipelined, but that will require a huge change on rollout logic.