Conversation
|
Cursor Agent can help with this pull request. Just |
…nctions Co-authored-by: bchen <bchen@fireworks.ai>
43ef3be to
fae0deb
Compare
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.
name: Pull Request
about: Propose changes to the codebase
title: "Fix: Resolve type errors across reward functions and evaluation logic"
labels: ''
assignees: ''
Description
This PR addresses and resolves several type errors identified by static analysis (Pyright) across the codebase, primarily focusing on the
reward_functiondecorator, thetau2_airline_evalfunction, and thelean_prover.pymodule.The changes include:
reward_functiondecorator: Added preciseoverloadsignatures toeval_protocol/typed_interface.pyto correctly handle both bare@reward_functionand parameterized@reward_function(...)usage, satisfying static type checkers.tau2_airline_eval:ToolMessagereceives a non-optionalidby defaultingtool_call_idto an empty string ifNone.env_assertions=Nonewhen constructingEvaluationCriteria.task.evaluation_criteriawhen accessingreward_basis.lean_prover.py: Implemented guards to safely handle potentiallyNonedataset_itemwhen constructing theinfo_payloaddictionary, preventing optional member access errors.These changes improve type safety and eliminate reported type errors without altering runtime behavior.
Fixes # (issue)
Implements # (issue)
Type of change
How Has This Been Tested?
The changes were verified by running static type checks using
pyright. The assistant also attempted to runmake pre-commitanduv run pyrightduring the conversation to confirm fixes.Test Configuration:
Checklist:
black .,isort .,flake8 .)Screenshots (if applicable)
N/A
Additional context
The primary goal was to resolve
pyrighterrors. The user is expected to runmake pre-commitlocally to confirm all checks pass.