Merged
Conversation
Co-authored-by: bchen <bchen@fireworks.ai>
|
Cursor Agent can help with this pull request. Just |
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 multiple type errors across the codebase"
labels: ''
assignees: ''
Description
This pull request addresses and resolves at least 10 type errors identified across various files in the codebase. The primary motivations are to improve code robustness, maintainability, and ensure stricter adherence to type hints.
Key changes include:
ep.rolloutAsynchronous Signature Update: Theep.rolloutfunction ineval_protocol/mcp_env.pyhas been updated to be anasyncfunction and now directly returnsList[EvaluationRow]. All call sites have been adjusted toawaitits execution and handle the direct list return.LangGraphRolloutProcessorAwaitable Handling: Modifiedeval_protocol/pytest/default_langchain_rollout_processor.pyto correctly handle callables that may or may not return awaitable objects, preventing "object is not awaitable" errors.SimulationServerBaseTyping Enhancements: Addressed type issues ineval_protocol/mcp/simulation_server.pyby explicitly typing theset_logging_levelparameter, adding an optionalcreate_environment_with_seedhook, and clarifyingAnyUrlusage.EvaluationPipelineType Refinements: Improved typing ineval_protocol/execution/pipeline.pyby assertingself.model_clientbefore use and providing more precise type hints forasyncio.gatherresults and list appends.eval_protocol/benchmarks/test_tau_bench_airline.py,test_tau_bench_retail.py,eval_protocol/mcp_servers/tau2/tests/test_tau2_e2e.py,tests/pytest/test_tau_bench_airline.py) to correctly instantiateTask,ToolCall, andToolMessageobjects with all required and optional fields, such asrequestor,env_assertions,persona,description,ticket, andinitial_state.These changes collectively reduce the number of reported type errors, making the codebase more reliable and easier to reason about.
Fixes # (issue)
Implements # (issue)
Type of change
How Has This Been Tested?
The changes were developed based on static analysis of type checker outputs and manual code inspection.
Test Configuration:
To verify these changes, please run the project's type checker (e.g.,
make pre-commitif configured, ormypy/pyrightdirectly) in your local environment.Checklist:
black .,isort .,flake8 .)Screenshots (if applicable)
Additional context
Due to limitations in the development environment, I was unable to run the type checker locally to confirm the exact reduction in error count. However, the changes directly address the reported type errors based on their descriptions and code context. Running the project's type checker after merging should reflect the intended error reduction.