Skip to content

Conversation

lukasugar
Copy link
Contributor

@lukasugar lukasugar commented Jun 12, 2025

Bunch of small things:

  • huggingface-cli command downloads the dataset to the current folder, as expected in the rest of the codebase
  • Change names of scripts in readme to reflect the actual names in the repo
  • Fixes extra comma in json file -> run_eval.py fails otherwise
  • Azure credentials are optional if not using Azure models
  • Add pricing for the newer Gemini models
    • introduce timeout, so requests can't wait indefinitely

@lukasugar lukasugar changed the title Readme fixes Small fixes Jun 12, 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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to the Claudette client, azure client/endpoint is needed only when running OpenAI, so it's optional

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})
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

"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}"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The extra comma made it an invalid json file

@lukasugar lukasugar changed the title Small fixes Gemini 2.5 support + small fixes Jun 23, 2025
@lukasugar lukasugar changed the title Gemini 2.5 support + small fixes Small fixes + gemini 2.5 Jun 23, 2025
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.

1 participant