add option to pass 'api_key' to gen_answers, judge_answers#128
Merged
Conversation
danmcp
reviewed
Sep 11, 2024
danmcp
left a comment
Contributor
There was a problem hiding this comment.
+1 to moving to judge and generate in mt_bench. Needs to be an option where ever server_url is passed.
sallyom
force-pushed
the
add-api-key
branch
from
September 12, 2024 12:09
9261d6c to
a4f3f7b
Compare
sallyom
force-pushed
the
add-api-key
branch
from
September 12, 2024 13:38
a4f3f7b to
3737621
Compare
Member
|
@sallyom thanks for the contribution! some CI failures here - you can run the checks locally with |
danmcp
suggested changes
Sep 12, 2024
sallyom
force-pushed
the
add-api-key
branch
from
September 12, 2024 21:15
6b6af51 to
2a0ba52
Compare
danmcp
suggested changes
Sep 12, 2024
danmcp
reviewed
Sep 13, 2024
danmcp
left a comment
Contributor
There was a problem hiding this comment.
Looks good except my question around whether the test changes are helpful and the commits need to be squashed and/or made more descriptive.
sallyom
force-pushed
the
add-api-key
branch
from
September 13, 2024 13:29
4d0d0a3 to
1f049cc
Compare
`api_key` is optional and this PR remains backwards compatible. This allows for externally served models that require authentication. A helper function is added in mt_bench_common for creating the openai_client necessary for model requests. Signed-off-by: sallyom <somalley@redhat.com>
sallyom
force-pushed
the
add-api-key
branch
from
September 13, 2024 13:36
1f049cc to
3445ce0
Compare
Contributor
Author
|
thanks for your review @danmcp, I really appreciate your help. |
Contributor
Thanks for the commit and working through the minutia! |
danmcp
approved these changes
Sep 13, 2024
nathan-weinberg
approved these changes
Sep 13, 2024
nathan-weinberg
left a comment
Member
There was a problem hiding this comment.
Appreciate the contribution @sallyom!
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.
I notice the api_key is hard-coded which is preventing from using an external judge server. This adds an optional
api_keyto provide an openai_client in gen_answers and judge_answers. Note, candidate-server & judge-server may have unique tokens so the env var OPENAI_API_KEY should not be used.