add option to pass 'api_key' to gen_answers, judge_answers#128
Merged
mergify[bot] merged 1 commit intoinstructlab:maininstructlab/eval:mainfrom Sep 13, 2024
Merged
add option to pass 'api_key' to gen_answers, judge_answers#128mergify[bot] merged 1 commit intoinstructlab:maininstructlab/eval:mainfrom
mergify[bot] merged 1 commit intoinstructlab:maininstructlab/eval:mainfrom
Conversation
danmcp
reviewed
Sep 11, 2024
Contributor
danmcp
left a comment
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.
9261d6c to
a4f3f7b
Compare
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
6b6af51 to
2a0ba52
Compare
danmcp
suggested changes
Sep 12, 2024
danmcp
reviewed
Sep 13, 2024
Contributor
danmcp
left a comment
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.
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>
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
Member
nathan-weinberg
left a comment
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.