Skip to content

feat: Implement new SWE-bench rollout function #219

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

bradhilton
Copy link
Collaborator

No description provided.

This commit introduces the `claude_rollout.py` module, which includes an asynchronous function to roll out a Claude agent in a sandbox environment. The function takes a problem statement and executes it using the OpenAI API, with a placeholder for future enhancements. Additionally, a test function is provided to validate the rollout process against specified instances, ensuring that the agent can handle various test scenarios effectively.
This commit expands the `claude_rollout.py` module by implementing a comprehensive rollout process for the Claude agent, including a structured prompt and tool definitions for executing bash commands and editing files. The `claude_rollout` function now supports a maximum step limit and handles tool calls effectively. Additionally, the test function has been updated to include detailed logging and validation of test results before and after applying patches, ensuring robust testing of the rollout process.
This commit introduces the `qwen_rollout.py` module, which implements a rollout process for the Qwen agent, including structured prompts and tool definitions for executing commands in a sandbox environment. The `pyproject.toml` file has been updated to specify optional dependencies for `openpipe-art`, and several new packages have been added to the `uv.lock` file to support the rollout functionality. Additionally, the `sandbox.py` module has been modified to dynamically determine the path for the `str_replace_editor` tool, enhancing the sandbox's flexibility.
This commit adds the `tenacity` library as a dependency to improve error handling in the sandbox creation process. The `qwen_rollout.py` module has been updated to change the model name from `Qwen/Qwen3-32B` to `willcb/Qwen3-32B`, and the test function now runs with a different instance index. Additionally, debug print statements have been removed to clean up the code. The `new.py` file in the sandbox directory has been modified to include a retry mechanism for sandbox creation, enhancing its robustness against failures.
This commit adds several new modules for implementing ART-style training in the SWE-bench framework. Key additions include `art_style_rollout.py`, which defines the core rollout function, and `train_art_style.py`, which serves as the main training script. The `instance_filter.py` module is introduced to filter SWE-bench instances based on test results, ensuring only high-quality instances are used for training.

Additionally, comprehensive test scripts (`test_art_style.py` and `test_instance_filter.py`) have been created to validate the functionality of the new features. The README has been updated to include documentation for the new modules and usage examples, enhancing the overall clarity and usability of the project.
This commit removes the `max_tokens` attribute from the `ARTModelConfig` class and restructures the metadata in the `art_style_rollout` function to include `instance_id`. Additionally, it improves error handling by breaking the loop on exceptions instead of raising them, and adds functionality to serialize the trajectory to a JSON file for debugging purposes, enhancing the overall logging and traceability of the rollout process.
…tiple files

- Standardized string formatting and spacing in print statements for consistency.
- Removed unnecessary parentheses and adjusted line breaks for better readability.
- Updated comments and docstrings to maintain clarity and uniformity.
- Ensured consistent use of double quotes for strings in Python files.
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