Open
Conversation
lukasugar
commented
Jun 23, 2025
Comment on lines
+36
to
+43
| try: | ||
| # Azure secrets should be set if using Azure OpenAI models | ||
| azure_endpoint = AzureOpenAI( | ||
| azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT"), | ||
| api_key=os.getenv("AZURE_OPENAI_API_KEY"), | ||
| api_version="2024-12-01-preview", | ||
| ) | ||
| except Exception as e: pass |
Contributor
Author
There was a problem hiding this comment.
Similar to the Claudette client, azure client/endpoint is needed only when running OpenAI, so it's optional
lukasugar
commented
Jun 23, 2025
Comment on lines
+242
to
+245
| client = genai.Client( | ||
| api_key=os.getenv("GEMINI_API_KEY"), | ||
| # 5 minutes timeout per call | ||
| http_options={"timeout": 5 * 60 * 1000}) |
Contributor
Author
There was a problem hiding this comment.
By default, the timeout was set to None. This caused some bad requests to never fail, and block the eval loop.
I've set a long timeout limit to fix those cases, and not cause timeout of valid requests.
lukasugar
commented
Jun 23, 2025
| "hotpotqa": "Answer the question based on the given passages. Only give me the answer and do not output any other words.\n\nThe following are given passages.\n{context}\n\nAnswer the question based on the given passages. Only give me the answer and do not output any other words.\n\nQuestion: {input}\nAnswer:", | ||
| "2wikimqa": "Answer the question based on the given passages. Only give me the answer and do not output any other words.\n\nThe following are given passages.\n{context}\n\nAnswer the question based on the given passages. Only give me the answer and do not output any other words.\n\nQuestion: {input}\nAnswer:", | ||
| "triviaqa": "Answer the question based on the given passage. Only give me the answer and do not output any other words. The following are some examples.\n\n{context}\n\n{input}", | ||
| "triviaqa": "Answer the question based on the given passage. Only give me the answer and do not output any other words. The following are some examples.\n\n{context}\n\n{input}" |
Contributor
Author
There was a problem hiding this comment.
The extra comma made it an invalid json file
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.
Bunch of small things:
huggingface-clicommand downloads the dataset to the current folder, as expected in the rest of the codebaserun_eval.pyfails otherwise