fix(inspect): align GenerateConfig field names with current inspect-ai (fixes #1327) - #1328
Open
sk8ordie84 wants to merge 2 commits into
Open
fix(inspect): align GenerateConfig field names with current inspect-ai (fixes #1327)#1328sk8ordie84 wants to merge 2 commits into
sk8ordie84 wants to merge 2 commits into
Conversation
- rename CLI/eval_set kwarg 'frequence_penalty' -> 'frequency_penalty' (typo; inspect-ai field name) - rename 'log_probs' -> 'logprobs' (inspect-ai field name) - pass 'response_format' only when the installed inspect-ai still accepts it, warn otherwise (removed in >= 0.3.141) Fixes huggingface#1327: a fresh 'pip install lighteval' resolves inspect-ai to the latest release and 'lighteval eval' crashed at startup with a pydantic ValidationError. Verified on inspect-ai 0.3.257: the repro command from the issue now completes.
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.
Fixes #1327.
A fresh
pip install lightevalresolvesinspect-aito the latest release, andlighteval evalcrashes at startup for any model/task with a pydanticValidationError, because threeGenerateConfigfield names inmain_inspect.pyno longer exist upstream.Changes:
frequence_penalty→frequency_penalty(typo; matches the inspect-ai field name)log_probs→logprobs(matches the inspect-ai field name)response_formatis passed through only when the installed inspect-ai still accepts it (GenerateConfig.model_fieldscheck); otherwise it is ignored with a warning. The field was removed upstream in inspect-ai ≥ 0.3.141, so unconditionally passing it can never work there.Verified on inspect-ai 0.3.257 (Python 3.12):
lighteval eval mockllm/model "lighteval|gsm8k|0" --max-samples 4 --log-dir out) now completes and writes results;--frequency-penalty 0.5 --logprobsare accepted and forwarded;--response-format '{"type":"object"}'no longer crashes (ignored with a warning on current inspect-ai).Note: the two renamed CLI flags were unusable on current installs (startup crash), so the rename does not break any working invocation. Happy to add a deprecation alias if preferred.