Fix timeout parsing and add bounded Ollama generation controls - #303
Open
jamesjennens wants to merge 1 commit into
Open
jamesjennens wants to merge 1 commit into
jamesjennens wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
This PR fixes two reliability issues I hit while running HumanEval with the Ollama backend, and adds token-limit plumbing that is already used by decoders but was not exposed through
run_codegen.What changed
EVALPLUS_TIMEOUT_PER_TASKparsing in evaluationevalplus/eval/__init__.py,os.getenv()returns a string.min(...), which can raiseTypeError.60.0.max_new_tokensin codegen pathmax_new_tokensparameter torun_codegen(...).make_model(...)and into backend decoders.max_new_tokensfor Ollama decoderOllamaChatDecoderpreviously overwroteself.max_new_tokensto-1(unlimited).evalplus/gen/util/ollama_request.py, added env-configurable guardrails:EVALPLUS_OLLAMA_TIMEOUT(default180)EVALPLUS_OLLAMA_MAX_ATTEMPTS(default4)EVALPLUS_OLLAMA_MAX_TOTAL_SECONDS(default900)Why
During long HumanEval runs with Ollama, generation could stall for very long periods around a single task due to retry behavior and lack of hard wall-clock caps. Also, task timeout env parsing had a type bug that could fail when set.
Backward compatibility
max_new_tokenshas a default.