From ea38b16c11b89e7e86ea9ae6ff2b1c144994a991 Mon Sep 17 00:00:00 2001 From: jemeza-codegen Date: Thu, 20 Feb 2025 12:21:28 -0800 Subject: [PATCH 1/4] feat: swe bench evals on modal --- .gitignore | 6 + .../examples/swebench_agent_run/.env.template | 4 + .../examples/swebench_agent_run/README.md | 9 + .../swebench_agent_run/entry_point.py | 21 ++ .../examples/swebench_agent_run/eval_run.py | 154 ++++++++++++ .../swebench_agent_run/pyproject.toml | 7 + codegen-examples/pyproject.toml | 3 + codegen-examples/uv.lock | 12 +- pyproject.toml | 2 + src/codegen/extensions/langchain/utils.py | 4 +- src/codegen/extensions/swebench/README.md | 29 +++ src/codegen/extensions/swebench/agent.py | 101 ++++++++ src/codegen/extensions/swebench/constants.py | 5 + src/codegen/extensions/swebench/harness.py | 211 ++++++++++++++++ src/codegen/extensions/swebench/report.py | 218 +++++++++++++++++ src/codegen/extensions/swebench/tests.py | 36 +++ src/codegen/extensions/swebench/utils.py | 179 ++++++++++++++ uv.lock | 229 ++++++++++++++++++ 18 files changed, 1227 insertions(+), 3 deletions(-) create mode 100644 codegen-examples/examples/swebench_agent_run/.env.template create mode 100644 codegen-examples/examples/swebench_agent_run/README.md create mode 100644 codegen-examples/examples/swebench_agent_run/entry_point.py create mode 100644 codegen-examples/examples/swebench_agent_run/eval_run.py create mode 100644 codegen-examples/examples/swebench_agent_run/pyproject.toml create mode 100644 src/codegen/extensions/swebench/README.md create mode 100644 src/codegen/extensions/swebench/agent.py create mode 100644 src/codegen/extensions/swebench/constants.py create mode 100644 src/codegen/extensions/swebench/harness.py create mode 100755 src/codegen/extensions/swebench/report.py create mode 100755 src/codegen/extensions/swebench/tests.py create mode 100644 src/codegen/extensions/swebench/utils.py diff --git a/.gitignore b/.gitignore index 1f54b61cc..54c7b88c0 100644 --- a/.gitignore +++ b/.gitignore @@ -65,3 +65,9 @@ graph-sitter-types/typings/** coverage.json tests/integration/verified_codemods/codemod_data/repo_commits.json .benchmarks/* + +# SWE Bench results +results.*.json +codegen-examples/examples/swebench_agent_run/results/* +codegen-examples/examples/swebench_agent_run/predictions/* +codegen-examples/examples/swebench_agent_run/logs/* diff --git a/codegen-examples/examples/swebench_agent_run/.env.template b/codegen-examples/examples/swebench_agent_run/.env.template new file mode 100644 index 000000000..3e799557e --- /dev/null +++ b/codegen-examples/examples/swebench_agent_run/.env.template @@ -0,0 +1,4 @@ +OPENAI_API_KEY= # Your OpenAI API key +ANTHROPIC_API_KEY= # Your Anthropic API key +LANGSMITH_API_KEY= # Your Langsmith API key +LANGCHAIN_TRACING_V2= # `true` for tracing, `false` for no tracing diff --git a/codegen-examples/examples/swebench_agent_run/README.md b/codegen-examples/examples/swebench_agent_run/README.md new file mode 100644 index 000000000..e7eaaaa98 --- /dev/null +++ b/codegen-examples/examples/swebench_agent_run/README.md @@ -0,0 +1,9 @@ +# INSTRUCTIONS + +1. Create a `.env` file in the root directory and add your API keys. +1. cd into the `examples/swebench_agent_run` directory +1. Create a `.venv` with `uv venv` and activate it with `source .venv/bin/activate` +1. Install the codegen dependencies with `uv pip install -e ../../../` +1. Activate the appropriate modal environment. +1. Launch the modal app with `uv run modal deploy --env= webhooks.py` +1. Run the script with `python eval_run.py` diff --git a/codegen-examples/examples/swebench_agent_run/entry_point.py b/codegen-examples/examples/swebench_agent_run/entry_point.py new file mode 100644 index 000000000..ba09e6359 --- /dev/null +++ b/codegen-examples/examples/swebench_agent_run/entry_point.py @@ -0,0 +1,21 @@ +from codegen.extensions.langchain.utils import SweBenchExample +from codegen.extensions.swebench.harness import process_one_instance +import modal + +image = ( + modal.Image.debian_slim(python_version="3.13") + .apt_install("git") + .pip_install("fastapi[standard]") + .copy_local_dir("../../../", "/root/codegen", ignore=[".venv", "**/.venv", "tests", "**/tests"]) + .run_commands("pip install -e /root/codegen") +) +app = modal.App(name="swebench-agent-run", image=image, secrets=[modal.Secret.from_dotenv()]) + +# Here is an example implementation of setting up an endpoint for receiving webhook events from Linear. +# The @app.linear.event() decorator takes care of subscribing to the webhook and also unsubscribing when the deployment spun +# Load environment variables from .env file + + +@app.function(timeout=5 * 60) +async def process_entry(entry: SweBenchExample): + return process_one_instance(entry) diff --git a/codegen-examples/examples/swebench_agent_run/eval_run.py b/codegen-examples/examples/swebench_agent_run/eval_run.py new file mode 100644 index 000000000..6a6735267 --- /dev/null +++ b/codegen-examples/examples/swebench_agent_run/eval_run.py @@ -0,0 +1,154 @@ +import asyncio +import json +import traceback +from pathlib import Path +import modal +from datetime import datetime +from codegen.extensions.langchain.utils import get_swe_bench_examples +from codegen.extensions.swebench.report import generate_report + +PREDS_DNAME = Path(__file__).parent / "predictions" +LOG_DIR = Path(__file__).parent / "logs" + +process_entry = modal.Function.lookup("swebench-agent-run", "process_entry") + + +async def process_batch(examples, batch_size=50): + """Process a batch of examples concurrently. + + Args: + examples: List of SweBenchExample objects to process + batch_size: Number of examples to process concurrently. + Default is 50 which provides good parallelization + while staying well within Modal's limits. + """ + results = [] + + # Process examples in batches + for i in range(0, len(examples), batch_size): + batch = examples[i : i + batch_size] + + # Create tasks for this batch + batch_tasks = [process_entry.remote.aio(example) for example in batch] + + # Wait for all tasks in this batch to complete + print(f"Processing batch {i // batch_size + 1}/{len(examples) // batch_size + 1} (examples {i + 1}-{min(i + batch_size, len(examples))})") + + try: + batch_results = await asyncio.gather(*batch_tasks, return_exceptions=True) + + # Store results + for example, result in zip(batch, batch_results): + error_info = None + + if isinstance(result, Exception): + error_type = type(result).__name__ + error_info = { + "error_type": error_type, + "error_message": str(result), + "traceback": traceback.format_exception(type(result), result, result.__traceback__), + } + + if isinstance(result, modal.exception.ModalClientError): + error_info["modal_error_code"] = getattr(result, "code", None) + error_info["modal_error_details"] = getattr(result, "details", None) + + print(f"Error processing {example.instance_id}:") + print(f"Type: {error_type}") + print(f"Message: {str(result)}") + print("Traceback:") + print("".join(error_info["traceback"])) + + results.append({"instance_id": example.instance_id, "status": "error", "error_info": error_info}) + else: + if result is None: + print(f"Warning: Null result for {example.instance_id}") + results.append({"instance_id": example.instance_id, "status": "error", "error_info": {"error_type": "NullResult", "error_message": "Process returned None"}}) + else: + results.append(result) + + except Exception as e: + print("Batch processing error:") + print(f"Type: {type(e).__name__}") + print(f"Message: {str(e)}") + traceback.print_exc() + + # Mark all examples in the batch as failed + for example in batch: + results.append( + { + "instance_id": example.instance_id, + "status": "error", + "error_info": {"error_type": type(e).__name__, "error_message": str(e), "traceback": traceback.format_exc(), "batch_failure": True}, + } + ) + + return results + + +async def run_eval(use_existing_preds=False): + try: + if not use_existing_preds: + # Get all examples + examples = get_swe_bench_examples()[:1] + print(f"Processing {len(examples)} examples...") + + # Create output directory if it doesn't exist + PREDS_DNAME.mkdir(exist_ok=True) + results_dir = PREDS_DNAME / "results" + results_dir.mkdir(exist_ok=True) + + # Create a timestamp for this run + timestamp = datetime.now().strftime("%Y%m%d_%H%M%S") + + # Process all examples in parallel batches + results = await process_batch(examples) + + # Save individual results + for result in results: + if result and "instance_id" in result: + instance_id = result["instance_id"] + output_file = results_dir / f"{instance_id}.json" + with open(output_file, "w") as f: + json.dump(result, f, indent=4) + + # Save summary file + summary_file = results_dir / f"summary_{timestamp}.json" + summary = { + "timestamp": timestamp, + "total_examples": len(examples), + "successful": len([r for r in results if r and "status" not in r]), + "failed": len([r for r in results if r and "status" in r and r["status"] == "error"]), + "error_types": {}, + "results": results, + } + + # Collect error statistics + for result in results: + if result and "status" in result and result["status"] == "error": + error_type = result.get("error_info", {}).get("error_type", "Unknown") + summary["error_types"][error_type] = summary["error_types"].get(error_type, 0) + 1 + + with open(summary_file, "w") as f: + json.dump(summary, f, indent=4) + + print("\nProcessing complete!") + print(f"Results saved to: {results_dir}") + print(f"Summary saved to: {summary_file}") + print(f"Successful: {summary['successful']}/{summary['total_examples']}") + print(f"Failed: {summary['failed']}/{summary['total_examples']}") + if summary["error_types"]: + print("\nError type distribution:") + for error_type, count in summary["error_types"].items(): + print(f" {error_type}: {count}") + + # Generate Report on Modal + generate_report(PREDS_DNAME, LOG_DIR) + except Exception: + print("Fatal error in run_eval:") + traceback.print_exc() + raise + + +if __name__ == "__main__": + asyncio.run(run_eval()) diff --git a/codegen-examples/examples/swebench_agent_run/pyproject.toml b/codegen-examples/examples/swebench_agent_run/pyproject.toml new file mode 100644 index 000000000..dd1b0587c --- /dev/null +++ b/codegen-examples/examples/swebench_agent_run/pyproject.toml @@ -0,0 +1,7 @@ +[project] +name = "swebench-agent-run" +version = "0.1.0" +description = "Add your description here" +readme = "README.md" +requires-python = ">=3.12, <3.14" +dependencies = [] diff --git a/codegen-examples/pyproject.toml b/codegen-examples/pyproject.toml index 8f61c5735..9074b1b5e 100644 --- a/codegen-examples/pyproject.toml +++ b/codegen-examples/pyproject.toml @@ -31,6 +31,9 @@ dev-dependencies = [ "deptry>=0.22.0", ] +[tool.uv.workspace] +members = ["examples/swebench_agent_run"] + [tool.pre-commit-uv] requirements = ["strict-requirements"] diff --git a/codegen-examples/uv.lock b/codegen-examples/uv.lock index 152d3beaa..5f962f29b 100644 --- a/codegen-examples/uv.lock +++ b/codegen-examples/uv.lock @@ -1,11 +1,16 @@ version = 1 -revision = 1 requires-python = ">=3.12, <3.14" resolution-markers = [ "python_full_version >= '3.12.4'", "python_full_version < '3.12.4'", ] +[manifest] +members = [ + "codegen-examples", + "swebench-agent-run", +] + [[package]] name = "aiohappyeyeballs" version = "2.4.6" @@ -3197,6 +3202,11 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/d9/61/f2b52e107b1fc8944b33ef56bf6ac4ebbe16d91b94d2b87ce013bf63fb84/starlette-0.45.3-py3-none-any.whl", hash = "sha256:dfb6d332576f136ec740296c7e8bb8c8a7125044e7c6da30744718880cdd059d", size = 71507 }, ] +[[package]] +name = "swebench-agent-run" +version = "0.1.0" +source = { virtual = "examples/swebench_agent_run" } + [[package]] name = "synchronicity" version = "0.9.11" diff --git a/pyproject.toml b/pyproject.toml index 422eb12b6..38a9b34bc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -70,6 +70,8 @@ dependencies = [ "modal>=0.73.45", "slack-sdk", "langchain-anthropic>=0.3.7", + "lox>=0.12.0", + "datasets", ] license = { text = "Apache-2.0" } diff --git a/src/codegen/extensions/langchain/utils.py b/src/codegen/extensions/langchain/utils.py index 7e60734a0..785a57ea7 100644 --- a/src/codegen/extensions/langchain/utils.py +++ b/src/codegen/extensions/langchain/utils.py @@ -35,9 +35,9 @@ def get_swe_bench_examples() -> list[SweBenchExample]: """ url = "https://datasets-server.huggingface.co/rows" params = { - "dataset": "princeton-nlp/SWE-bench", + "dataset": "princeton-nlp/SWE-bench_Lite", "config": "default", - "split": "dev", + "split": "test", "offset": 0, "length": 100, } diff --git a/src/codegen/extensions/swebench/README.md b/src/codegen/extensions/swebench/README.md new file mode 100644 index 000000000..12063180d --- /dev/null +++ b/src/codegen/extensions/swebench/README.md @@ -0,0 +1,29 @@ +## Codegen Harness and Evaluator for SWE Bennch Development Tool + +This folder contains a harness and evaluator for the SWE Bench leaderboard, and enables developers to test and evaluate their codegen models on the SWE Bench leaderboard. + +It integrates directly into the Codegen agentic framework and can be built on top of. + +### Setup + +Remember to install all the dependencies for the environment. + +### Usage + +#### Edit agent.py, your codegen agent + +This file contains the main logic for the agent. + +The agent taps into the tree sitter using codegen. You can modify this by adding additional tools, extending its capabilities, prompts, and more. + +It is invoked in the harness script. + +#### Run harness.py to run the agent + +This script will gather the correct dataset, run the agent, and save the results. + +#### Run report.py to generate a report + +This script will generate a report from the results. It will loop through all the results and generate a report to evaluate each. Currently, there is an error in the docker image. + +There are currently example predictions in the `predictions/results` folder. diff --git a/src/codegen/extensions/swebench/agent.py b/src/codegen/extensions/swebench/agent.py new file mode 100644 index 000000000..06d057d58 --- /dev/null +++ b/src/codegen/extensions/swebench/agent.py @@ -0,0 +1,101 @@ +from langchain.agents import AgentExecutor +from langchain.agents.openai_functions_agent.base import OpenAIFunctionsAgent +from langchain.hub import pull +from langchain_core.chat_history import InMemoryChatMessageHistory +from langchain_core.messages import BaseMessage +from langchain_core.runnables.history import RunnableWithMessageHistory +from langchain_openai import ChatOpenAI + +from codegen import Codebase +from codegen.extensions.langchain.tools import ( + CommitTool, + CreateFileTool, + DeleteFileTool, + EditFileTool, + GithubCreatePRCommentTool, + GithubCreatePRReviewCommentTool, + GithubCreatePRTool, + GithubViewPRTool, + ListDirectoryTool, + MoveSymbolTool, + RenameFileTool, + SearchTool, + SemanticEditTool, + SemanticSearchTool, + ViewFileTool, +) + +"""Demo implementation of an agent with Codegen tools.""" + + +def create_codebase_agent( + codebase: Codebase, + model_name: str = "gpt-4o", + temperature: float = 0, + verbose: bool = True, + chat_history: list[BaseMessage] = [], +) -> RunnableWithMessageHistory: + """Create an agent with all codebase tools. + + Args: + codebase: The codebase to operate on + model_name: Name of the model to use (default: gpt-4) + temperature: Model temperature (default: 0) + verbose: Whether to print agent's thought process (default: True) + + Returns: + Initialized agent with message history + """ + # Initialize language model + llm = ChatOpenAI( + model_name=model_name, + temperature=temperature, + ) + + # Get all codebase tools + tools = [ + ViewFileTool(codebase), + ListDirectoryTool(codebase), + SearchTool(codebase), + EditFileTool(codebase), + CreateFileTool(codebase), + DeleteFileTool(codebase), + RenameFileTool(codebase), + MoveSymbolTool(codebase), + # RevealSymbolTool(codebase), + SemanticEditTool(codebase), + SemanticSearchTool(codebase), + CommitTool(codebase), + GithubCreatePRTool(codebase), + GithubViewPRTool(codebase), + GithubCreatePRCommentTool(codebase), + GithubCreatePRReviewCommentTool(codebase), + ] + + # Get the prompt to use + prompt = pull("hwchase17/openai-functions-agent") + + # Create the agent + agent = OpenAIFunctionsAgent( + llm=llm, + tools=tools, + prompt=prompt, + ) + + # Create the agent executor + agent_executor = AgentExecutor( + agent=agent, + tools=tools, + verbose=verbose, + ) + + # Create message history handler + message_history = InMemoryChatMessageHistory(messages=chat_history) + + # Wrap with message history + return RunnableWithMessageHistory( + agent_executor, + lambda session_id: message_history, + input_messages_key="input", + history_messages_key="chat_history", + ) diff --git a/src/codegen/extensions/swebench/constants.py b/src/codegen/extensions/swebench/constants.py new file mode 100644 index 000000000..8c3c4b56c --- /dev/null +++ b/src/codegen/extensions/swebench/constants.py @@ -0,0 +1,5 @@ +from pathlib import Path + +PARENT_DIR = Path(__file__).parent + +PREDS_DNAME = PARENT_DIR / "predictions" diff --git a/src/codegen/extensions/swebench/harness.py b/src/codegen/extensions/swebench/harness.py new file mode 100644 index 000000000..59d3a7bb5 --- /dev/null +++ b/src/codegen/extensions/swebench/harness.py @@ -0,0 +1,211 @@ +"""This is the harness for running an AI agent on the SWE Bench dataset.""" + +#!/usr/bin/env python +import json +import pprint +import random +import subprocess +import sys + +import lox + +from codegen import Codebase + +# coding agent +from codegen.agents.code_agent import CodeAgent +from codegen.extensions.langchain.utils import SweBenchExample, get_swe_bench_examples +from codegen.extensions.swebench.constants import PREDS_DNAME + +# Replace the dump import with pprint +# from dump import dump +# from tests import run_tests +from codegen.extensions.swebench.utils import ( + get_full_dataset, # noqa: F401 + load_predictions, +) + + +def diff_versus_commit(git_dname, commit): + """Take a diff of `git_dname` current contents versus the `commit`.""" + diff_cmd = f"git -C {git_dname} diff {commit}" + diff_output = subprocess.check_output(diff_cmd.split()).decode() + return diff_output + + +def files_in_patch(patch): + """Extract the list of modified files from a unified diff patch string.""" + files = [] + for line in patch.split("\n"): + if line.startswith("--- a/") or line.startswith("+++ b/"): + fname = line.split("/", 1)[1] + if fname not in files: + files.append(fname) + return files + + +def show_problems(dataset): + """Print out all the instance_id and problem_descriptions.""" + for inst, entry in dataset.items(): + problem = entry.problem_statement.splitlines()[0] + print(f"{inst}: {problem}") + + +def process_one_instance(entry: SweBenchExample): + """Process one `entry` from SWE Bench using the LLM `models` at the + given `temperature`. Set `model_name_or_path` in the result json. + """ + instance_id = entry.instance_id + base_commit = entry.base_commit + + print("=" * 60) + pprint.pprint(instance_id) + print("=" * 60) + problem_statement = entry.problem_statement + print(problem_statement) + + gold_files = files_in_patch(entry.patch) + + results = [] + cost = 0 + winner = None + + codebase = Codebase.from_repo(repo_full_name=entry.repo, commit=base_commit, language="python") # check out the repo + + agent = CodeAgent(codebase=codebase) + + pprint.pprint(instance_id) + pprint.pprint(gold_files) + + message = """Below is a real GitHub issue from a popular GitHub repository. +The issue was filed some time ago. +The repo has been checked out at the commit that existed at the moment the issue was filed. +If you are already familiar with this repo, be cautious! +You are working with an old version of the repo! +Filenames, directory names, file contents, etc may be different than what you're used to. + +Propose changes to update the repo to fix the problem below. + +""" + message += problem_statement + + try: + result = agent.run(prompt=message, session_id="swebench") + except Exception as agent_error: + pprint.pprint(f"Instance ID: {instance_id} terminated with error: {agent_error}") + raise agent_error + + # Get the diff between the current state and the original commit + model_patch = codebase.get_diff(base=base_commit) + pprint.pprint(model_patch) + + # Record the results for the logs + result = dict( + # Required args for running eval tests + instance_id=instance_id, + model_patch=model_patch, + # For computing stats + gold_files=gold_files, + edited_files=files_in_patch(model_patch), + ) + results.append(result) + + pprint.pprint(result) + + # Did we get a successful patch? + if model_patch: + winner = result + + # If there's no clear winner, look for the most viable result we got... + if not winner: + msg = "No winner found" + raise ValueError(msg) + + # Avoid circular reference when we save to json + winner = dict(winner) + + winner.update( + dict( + all_results=results, # Record all the results for later analysis + cost=cost, # total cost across all results + ) + ) + + return winner + + +def process_instances(dataset: dict[str, SweBenchExample], threads: int): + """Dataset - The subset of the SWE Bench dataset to process. + threads - How many problems to attempt concurrently. + prior_dnames - Names of predictions/ dirnames from previous runs. + If they contain a plausible solution for an instance, + don't continue looking. + """ + # Create the predictions directory if it doesn't exist + PREDS_DNAME.mkdir(exist_ok=True) + out_dname = PREDS_DNAME / "results" + out_dname.mkdir(exist_ok=True) + + pprint.pprint(out_dname) + + # If we are restarting this run, figure out which instances are already done. + done_preds = load_predictions([out_dname]) + done_instances = set(done_preds.keys()) + pprint.pprint(len(done_instances)) + + all_instances = set(dataset.keys()) + + remaining_instances = set(all_instances) + remaining_instances -= done_instances + + remaining_instances = list(remaining_instances) + random.shuffle(remaining_instances) + + pprint.pprint(sorted(remaining_instances)) + pprint.pprint(len(remaining_instances)) + + print() + print("press enter...") + input() + + if threads > 1: + process_one_instance_lox = lox.process(threads)(process_one_instance) + process_one_instance_func = process_one_instance_lox.scatter + gather = process_one_instance_lox.gather + else: + process_one_instance_func = process_one_instance + + for instance_id in remaining_instances: + if instance_id in done_instances: + print("skipping", instance_id) + continue + + result = process_one_instance_func( + dataset[instance_id], + ) + with open(out_dname / f"{instance_id}.json", "w") as f: + json.dump(result, f) + + print("#" * 60) + # input() + + if threads > 1: + gather() + + +def main(): + # Load the SWE Bench dataset + dataset = {} + for example in get_swe_bench_examples(): + # codegen-sdk currently fails on this repo + if example.repo == "django/django": + continue + dataset[example.instance_id] = example + + threads = 1 + + process_instances(dataset, threads) + + +if __name__ == "__main__": + status = main() + sys.exit(status) diff --git a/src/codegen/extensions/swebench/report.py b/src/codegen/extensions/swebench/report.py new file mode 100755 index 000000000..05e833582 --- /dev/null +++ b/src/codegen/extensions/swebench/report.py @@ -0,0 +1,218 @@ +#!/usr/bin/env python + +import json +import shutil +import subprocess +import uuid +from collections import defaultdict +from pathlib import Path +from pprint import pprint + +from codegen.extensions.swebench.tests import remove_patches_to_tests +from codegen.extensions.swebench.utils import ( + load_predictions, +) + +using_dataset = "lite" +LOG_DIR = Path(__file__).parent / "logs" +NUM_EVAL_PROCS = 5 + + +def run_evals(predictions_jsonl, logs_dir: Path): + run_evals_cmd = f""" +python -m swebench.harness.run_evaluation + --predictions_path {predictions_jsonl} + --run_id {uuid.uuid4()!s} + --dataset_name princeton-nlp/SWE-bench_Lite + --cache_level instance + --report_dir {logs_dir} + --modal true +""" + run_evals_cmd = " ".join([line.strip() for line in run_evals_cmd.split() if line.strip()]) + print("Running evaluation command:", run_evals_cmd) + + subprocess.run(run_evals_cmd.split(), check=True) + + +def get_report(predictions_jsonl): + # Load and parse the evaluation results directly from the predictions file + results = defaultdict(list) + + with open(predictions_jsonl) as f: + for line in f: + pred = json.loads(line) + instance_id = pred["instance_id"] + + # Track basic stats + results["generated"].append(instance_id) + + # Check for evaluation logs + log_file = LOG_DIR / f"{instance_id}.eval.log" + if log_file.exists(): + results["with_logs"].append(instance_id) + log_content = log_file.read_text() + + if "PASS" in log_content: + results["resolved"].append(instance_id) + results["applied"].append(instance_id) + elif "FAIL" in log_content: + results["applied"].append(instance_id) + else: + results["no_apply"].append(instance_id) + else: + results["no_logs"].append(instance_id) + + # Convert lists to sets for compatibility with existing code + return {k: set(v) for k, v in results.items()} + + +def update_pred_json(predictions, report, predictions_dir: Path): + all_instances = set(report.get("generated", [])) + all_instances.update(set(report.get("no_generation", []))) + + for instance_id, pred in predictions.items(): + # Use get() to handle missing 'resolved' key, defaulting to empty set + was_resolved = instance_id in report.get("resolved", set()) + if "resolved" in pred and pred["resolved"] == was_resolved: + continue + + assert instance_id in all_instances, instance_id + + pred["resolved"] = was_resolved + save = dict(pred) + + # Construct json_fname if it doesn't exist + if "json_fname" not in pred: + json_fname = predictions_dir / "results" / f"{instance_id}.json" + else: + json_fname = pred["json_fname"] + del save["json_fname"] # Remove from save data if it exists + + Path(json_fname).write_text(json.dumps(save, indent=4)) + + return predictions + + +def preds_to_jsonl(predictions, predictions_dir: Path): + dname = predictions_dir / "results" + + predictions_jsonl = str(dname / "all_preds.jsonl") + print(f"Creating JSONL file: {predictions_jsonl}") + + # Use a default model name since it's not in the predictions + model_name = "results" + + with open(predictions_jsonl, "w") as fh: + for inst, pred in predictions.items(): + minimal_pred = { + "model_name_or_path": model_name, # Use default model name + "model_patch": remove_patches_to_tests(pred["model_patch"]) if "model_patch" in pred else pred.get("patch", ""), + "instance_id": pred["instance_id"], + } + fh.write(json.dumps(minimal_pred) + "\n") + return predictions_jsonl + + +def run_evals_on_dname(dname, predictions_dir: Path): + dname = Path(dname) + + predictions = load_predictions([dname], devin_only=(using_dataset == "devin")) + + predictions_jsonl = preds_to_jsonl(predictions) + pprint(predictions_jsonl) + + LOG_DIR.mkdir(exist_ok=True, parents=True) + + any_need_evals = any("resolved" not in pred for pred in predictions.values()) + any_need_evals = True + if any_need_evals: + run_evals(predictions_jsonl) + + model_name_or_path = next(iter(predictions.values()))["model_name_or_path"] + report = get_report(predictions_jsonl) + predictions = update_pred_json(predictions, report, predictions_dir) + + return predictions_jsonl, LOG_DIR + + +def combine_jsonl_logs(predictions, model_name_or_path): + logs = Path("logs") + log_dir = logs / model_name_or_path + + log_dir.mkdir(exist_ok=True) + pprint(log_dir) + + predictions_jsonl = preds_to_jsonl(predictions) + for inst, pred in predictions.items(): + from_fname = logs / pred["dname"] + # dump(from_fname, inst) + from_fname = list(from_fname.glob(f"{inst}.*.log")) + assert len(from_fname) <= 1, from_fname + if not len(from_fname): + print("Missing", pred["dname"], inst) + continue + from_fname = from_fname[0] + # dump(from_fname) + + to_fname = log_dir / f"{inst}.{model_name_or_path}.eval.log" + # dump(from_fname, to_fname) + shutil.copyfile(from_fname, to_fname) + + return predictions_jsonl, log_dir + + +def generate_report(predictions_dir: Path, logs_dir: Path): + # Automatically find all JSON files in predictions/results + results_dir = predictions_dir / "results" + if not results_dir.exists(): + print(f"Directory does not exist: {results_dir}") + return 1 + + prediction_files = list(results_dir.glob("*.json")) + print(f"Found {len(prediction_files)} prediction files") + + predictions = {} + for file_path in prediction_files: + try: + with open(file_path) as f: + prediction = json.load(f) + if isinstance(prediction, dict) and "instance_id" in prediction: + predictions[prediction["instance_id"]] = prediction + except json.JSONDecodeError: + print(f"Error reading JSON from {file_path}") + continue + + print(f"Successfully loaded {len(predictions)} predictions") + + if predictions: + # Create predictions JSONL file + predictions_jsonl = preds_to_jsonl(predictions, predictions_dir) + print(f"\nCreated predictions JSONL: {predictions_jsonl}") + + # Setup log directory + log_dir = logs_dir / "results" + log_dir.mkdir(exist_ok=True, parents=True) + print(f"Using log directory: {log_dir}") + + # Run evaluations + run_evals(predictions_jsonl, logs_dir) + + # Get and display report + model_name = "results" # or whatever model name you want to use + report = get_report(predictions_jsonl) + + print("\nEvaluation Results:") + print(f"Total predictions: {len(predictions)}") + print(f"Successfully applied: {len(report.get('applied', []))}") + print(f"Resolved: {len(report.get('resolved', []))}") + print(f"Failed to apply: {len(report.get('no_apply', []))}") + print(f"With logs: {len(report.get('with_logs', []))}") + print(f"No logs: {len(report.get('no_logs', []))}") + + # Update prediction JSONs with results + predictions = update_pred_json(predictions, report, predictions_dir) + else: + print("No valid predictions found") + return 1 + + return 0 diff --git a/src/codegen/extensions/swebench/tests.py b/src/codegen/extensions/swebench/tests.py new file mode 100755 index 000000000..f6338fbc3 --- /dev/null +++ b/src/codegen/extensions/swebench/tests.py @@ -0,0 +1,36 @@ +#!/usr/bin/env python + + +from codegen.extensions.swebench.utils import get_dataset, load_predictions # noqa: F401 + +# A no-op patch which creates an empty file is used to stand in for +# the `model_patch` and/or `test_patch` when running SWE Bench tests +# without one or both of those patches. +NOOP_PATCH = "diff --git a/empty.file.{nonce}.ignore b/empty.file.{nonce}.ignore\nnew file mode 100644\nindex 0000000..e69de29\n" + + +def remove_patches_to_tests(model_patch): + """Remove any changes to the tests directory from the provided patch. + This is to ensure that the model_patch does not disturb the repo's + tests when doing acceptance testing with the `test_patch`. + """ + if not model_patch: + return model_patch + + lines = model_patch.splitlines(keepends=True) + filtered_lines = [] + is_tests = False + + for line in lines: + if line.startswith("diff --git a/"): + pieces = line.split() + to = pieces[-1] + if to.startswith("b/") and ("/test/" in to or "/tests/" in to or "/testing/" in to or "/test_" in to or "/tox.ini" in to): + is_tests = True + else: + is_tests = False + + if not is_tests: + filtered_lines.append(line) + + return "".join(filtered_lines) diff --git a/src/codegen/extensions/swebench/utils.py b/src/codegen/extensions/swebench/utils.py new file mode 100644 index 000000000..05419a0bf --- /dev/null +++ b/src/codegen/extensions/swebench/utils.py @@ -0,0 +1,179 @@ +import json +import shutil +from pathlib import Path +from pprint import pprint + +from datasets import load_dataset + +FULL_DATASET = "princeton-nlp/SWE-bench" +FULL_DATASET_FNAME = FULL_DATASET.replace("/", "--") + ".json" + + +VERIFIED_DATASET = "princeton-nlp/SWE-bench-verified" +VERIFIED_DATASET_FNAME = VERIFIED_DATASET.replace("/", "--") + ".json" + +LITE_DATASET = "princeton-nlp/SWE-bench_Lite" +LITE_DATASET_FNAME = LITE_DATASET.replace("/", "--") + ".json" + + +def dump_dataset(dataset, fname): + """Save the dataset to json.""" + entries = list(dataset) + for entry in entries: + entry["FAIL_TO_PASS"] = json.loads(entry["FAIL_TO_PASS"]) + entry["PASS_TO_PASS"] = json.loads(entry["PASS_TO_PASS"]) + + with open(fname, "w") as f: + json.dump(entries, f, indent=4) + + +def get_full_dataset(): + return get_dataset(FULL_DATASET, FULL_DATASET_FNAME) + + +def get_lite_dataset(): + return get_dataset(LITE_DATASET, LITE_DATASET_FNAME) + + +def get_verified_dataset(): + return get_dataset(VERIFIED_DATASET, VERIFIED_DATASET_FNAME) + + +def get_dataset(dataset, fname): + """Load the `DATASET` from hugging face, and turn it into a dict + keyed on `instance_id`. + Cache the dict locally in a json file. + """ + fname = Path(fname) + if fname.exists(): + dataset = json.loads(fname.read_text()) + else: + pprint(dataset) + dataset = load_dataset(dataset) + dataset = dataset["test"] + dump_dataset(dataset, fname) + pprint(dataset) + + res = dict() + for entry in dataset: + res[entry["instance_id"]] = entry + + return res + + +def load_predictions(paths): + prediction_paths = [] + for path in paths: + path = Path(path) + if path.is_file(): + prediction_paths.append(path) + elif path.is_dir(): + prediction_paths += list(path.glob("*.json")) + else: + assert False, path + + # prediction_paths.sort(key=lambda p: p.stat().st_mtime) + + predictions = dict() + for fname in prediction_paths: + try: + pred = json.loads(fname.read_text()) + except json.decoder.JSONDecodeError as err: + pprint(fname) + raise err + + if "instance_id" not in pred: + print("Skipping json without instance_id", fname) + continue + + inst = pred["instance_id"] + pred["json_fname"] = str(fname) + predictions[inst] = pred + + return predictions + + +def is_plausible(pred): + attrs = "model_patch edit_outcome lint_outcome test_outcome".split() + for attr in attrs: + if not pred.get(attr): + return + return True + + +def get_plausible(preds): + return set(inst for inst, pred in preds.items() if is_plausible(pred)) + + +def check_criteria(pred, criteria): + attrs = criteria.split() + for attr in attrs: + if not pred[attr]: + return False + return True + + +def pick_winner(results): + """Given that we didn't obtain a result with all good outcomes, + try a series of weaker outcome sets to find the strongest result. + """ + priority = ( + "model_patch edit_outcome lint_outcome test_outcome", # all good! + "model_patch edit_outcome lint_outcome", # all good but test_outcome + "model_patch lint_outcome", # a patch that lints? + "model_patch edit_outcome", # a patch that had no edit errors? + "model_patch", # anything with an actual patch! + ) + + # choose the best result available + for criteria in priority: + for res in results: + if check_criteria(res, criteria): + return res + + # choose the first result as a last resort + if results: + return results[0] + + +def choose_pred(inst, all_preds, dnames): + results = [] + for i in range(len(all_preds)): + preds = all_preds[i] + dname = dnames[i] + + if inst not in preds: + continue + pred = dict(preds[inst]) + pred["dname"] = Path(dname).name + results.append(pred) + + return pick_winner(results) + + +def choose_predictions(dnames, model_name_or_path=None, copy_md=False, devin_only=False): + all_preds = [load_predictions([dname], devin_only=devin_only) for dname in dnames] + all_instances = set() + for preds in all_preds: + all_instances.update(preds.keys()) + + chosen = dict() + for inst in all_instances: + res = choose_pred(inst, all_preds, dnames) + chosen[inst] = res + + if copy_md: + pred_dname = Path("predictions") + md_fname = pred_dname / res["dname"] / (inst + ".md") + assert md_fname.exists(), md_fname + new_md_fname = pred_dname / model_name_or_path / (inst + ".md") + shutil.copyfile(md_fname, new_md_fname) + + for inst in chosen: + pred = dict(chosen[inst]) + pred["model_name_or_path"] = model_name_or_path + chosen[inst] = pred + + pprint(len(chosen)) + pprint(chosen) + return chosen diff --git a/uv.lock b/uv.lock index a7e7d5d03..adc45dead 100644 --- a/uv.lock +++ b/uv.lock @@ -1,4 +1,5 @@ version = 1 +revision = 1 requires-python = ">=3.12, <3.14" resolution-markers = [ "python_full_version >= '3.12.4'", @@ -75,6 +76,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/ec/6a/bc7e17a3e87a2985d3e8f4da4cd0f481060eb78fb08596c42be62c90a4d9/aiosignal-1.3.2-py2.py3-none-any.whl", hash = "sha256:45cde58e409a301715980c2b01d0c28bdde3770d8290b5eb2173759d9acb31a5", size = 7597 }, ] +[[package]] +name = "alabaster" +version = "1.0.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/a6/f8/d9c74d0daf3f742840fd818d69cfae176fa332022fd44e3469487d5a9420/alabaster-1.0.0.tar.gz", hash = "sha256:c00dca57bca26fa62a6d7d0a9fcce65f3e026e9bfe33e9c538fd3fbb2144fd9e", size = 24210 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7e/b3/6b4067be973ae96ba0d615946e314c5ae35f9f993eca561b356540bb0c2b/alabaster-1.0.0-py3-none-any.whl", hash = "sha256:fc6786402dc3fcb2de3cabd5fe455a2db534b371124f1f21de8731783dec828b", size = 13929 }, +] + [[package]] name = "annotated-types" version = "0.7.0" @@ -548,6 +558,7 @@ dependencies = [ { name = "langchain-core" }, { name = "langchain-openai" }, { name = "lazy-object-proxy" }, + { name = "lox" }, { name = "mcp", extra = ["cli"] }, { name = "mini-racer" }, { name = "modal" }, @@ -668,6 +679,7 @@ requires-dist = [ { name = "langchain-core" }, { name = "langchain-openai" }, { name = "lazy-object-proxy", specifier = ">=0.0.0" }, + { name = "lox", specifier = ">=0.12.0" }, { name = "lsprotocol", marker = "extra == 'lsp'", specifier = "==2024.0.0b1" }, { name = "mcp", extras = ["cli"] }, { name = "mini-racer", specifier = ">=0.12.4" }, @@ -721,6 +733,7 @@ requires-dist = [ { name = "wrapt", specifier = ">=1.16.0,<2.0.0" }, { name = "xmltodict", specifier = ">=0.13.0,<1.0.0" }, ] +provides-extras = ["lsp", "types"] [package.metadata.requires-dev] dev = [ @@ -1015,6 +1028,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/09/40/9d521973cae7f7ef8b1f0d0e28a3db0f851c1f1dca45d4c2ed5360bb7246/dicttoxml-1.7.16-py3-none-any.whl", hash = "sha256:8677671496d0d38e66c7179f82a7e9059f94887777955dc71b0ac602ee637c26", size = 24155 }, ] +[[package]] +name = "dill" +version = "0.3.9" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/70/43/86fe3f9e130c4137b0f1b50784dd70a5087b911fe07fa81e53e0c4c47fea/dill-0.3.9.tar.gz", hash = "sha256:81aa267dddf68cbfe8029c42ca9ec6a4ab3b22371d1c450abc54422577b4512c", size = 187000 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/46/d1/e73b6ad76f0b1fb7f23c35c6d95dbc506a9c8804f43dda8cb5b0fa6331fd/dill-0.3.9-py3-none-any.whl", hash = "sha256:468dff3b89520b474c0397703366b7b95eebe6303f108adf9b19da1f702be87a", size = 119418 }, +] + [[package]] name = "distlib" version = "0.3.9" @@ -1051,6 +1073,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/d5/7c/e9fcff7623954d86bdc17782036cbf715ecab1bec4847c008557affe1ca8/docstring_parser-0.16-py3-none-any.whl", hash = "sha256:bf0a1387354d3691d102edef7ec124f219ef639982d096e26e3b60aeffa90637", size = 36533 }, ] +[[package]] +name = "docutils" +version = "0.21.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/ae/ed/aefcc8cd0ba62a0560c3c18c33925362d46c6075480bfa4df87b28e169a9/docutils-0.21.2.tar.gz", hash = "sha256:3a6b18732edf182daa3cd12775bbb338cf5691468f91eeeb109deff6ebfa986f", size = 2204444 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/8f/d7/9322c609343d929e75e7e5e6255e614fcc67572cfd083959cdef3b7aad79/docutils-0.21.2-py3-none-any.whl", hash = "sha256:dafca5b9e384f0e419294eb4d2ff9fa826435bf15f15b7bd45723e8ad76811b2", size = 587408 }, +] + [[package]] name = "dotty-dict" version = "1.3.1" @@ -1466,6 +1497,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/76/c6/c88e154df9c4e1a2a66ccf0005a88dfb2650c1dffb6f5ce603dfbd452ce3/idna-3.10-py3-none-any.whl", hash = "sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3", size = 70442 }, ] +[[package]] +name = "imagesize" +version = "1.4.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/a7/84/62473fb57d61e31fef6e36d64a179c8781605429fd927b5dd608c997be31/imagesize-1.4.1.tar.gz", hash = "sha256:69150444affb9cb0d5cc5a92b3676f0b2fb7cd9ae39e947a5e11a36b4497cd4a", size = 1280026 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ff/62/85c4c919272577931d407be5ba5d71c20f0b616d31a0befe0ae45bb79abd/imagesize-1.4.1-py2.py3-none-any.whl", hash = "sha256:0d8d18d08f840c19d0ee7ca1fd82490fdc3729b7ac93f49870406ddde8ef8d8b", size = 8769 }, +] + [[package]] name = "importlib-metadata" version = "8.6.1" @@ -2046,6 +2086,19 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/0c/29/0348de65b8cc732daa3e33e67806420b2ae89bdce2b04af740289c5c6c8c/loguru-0.7.3-py3-none-any.whl", hash = "sha256:31a33c10c8e1e10422bfd431aeb5d351c7cf7fa671e3c4df004162264b28220c", size = 61595 }, ] +[[package]] +name = "lox" +version = "0.12.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pathos" }, + { name = "sphinx-rtd-theme" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/0f/b5/2bfa8da2a1dd6647c3ea0b8d7ae366bbb36b49f9f3858a253199daacb860/lox-0.12.0.tar.gz", hash = "sha256:cc7d5f867afb4dc7c2bce7bd6e90f4665c6df492863f35ff63229300b7219977", size = 37579 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/02/9a/cc790ca4b853821b76acb5944d32036590a789e5f3b9e4f10a8962bcfda5/lox-0.12.0-py2.py3-none-any.whl", hash = "sha256:ac0a392662f3a75cc9097655d26169d5e3564e2670431fd9884a7a09a09f6921", size = 25372 }, +] + [[package]] name = "lsprotocol" version = "2024.0.0b1" @@ -2255,6 +2308,23 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/99/b7/b9e70fde2c0f0c9af4cc5277782a89b66d35948ea3369ec9f598358c3ac5/multidict-6.1.0-py3-none-any.whl", hash = "sha256:48e171e52d1c4d33888e529b999e5900356b9ae588c2f09a52dcefb158b27506", size = 10051 }, ] +[[package]] +name = "multiprocess" +version = "0.70.17" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "dill" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/e9/34/1acca6e18697017ad5c8b45279b59305d660ecf2fbed13e5f406f69890e4/multiprocess-0.70.17.tar.gz", hash = "sha256:4ae2f11a3416809ebc9a48abfc8b14ecce0652a0944731a1493a3c1ba44ff57a", size = 1785744 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e7/a9/39cf856d03690af6fd570cf40331f1f79acdbb3132a9c35d2c5002f7f30b/multiprocess-0.70.17-py310-none-any.whl", hash = "sha256:38357ca266b51a2e22841b755d9a91e4bb7b937979a54d411677111716c32744", size = 134830 }, + { url = "https://files.pythonhosted.org/packages/b2/07/8cbb75d6cfbe8712d8f7f6a5615f083c6e710ab916b748fbb20373ddb142/multiprocess-0.70.17-py311-none-any.whl", hash = "sha256:2884701445d0177aec5bd5f6ee0df296773e4fb65b11903b94c613fb46cfb7d1", size = 144346 }, + { url = "https://files.pythonhosted.org/packages/a4/69/d3f343a61a2f86ef10ed7865a26beda7c71554136ce187b0384b1c2c9ca3/multiprocess-0.70.17-py312-none-any.whl", hash = "sha256:2818af14c52446b9617d1b0755fa70ca2f77c28b25ed97bdaa2c69a22c47b46c", size = 147990 }, + { url = "https://files.pythonhosted.org/packages/c8/b7/2e9a4fcd871b81e1f2a812cd5c6fb52ad1e8da7bf0d7646c55eaae220484/multiprocess-0.70.17-py313-none-any.whl", hash = "sha256:20c28ca19079a6c879258103a6d60b94d4ffe2d9da07dda93fb1c8bc6243f522", size = 149843 }, + { url = "https://files.pythonhosted.org/packages/ae/d7/fd7a092fc0ab1845a1a97ca88e61b9b7cc2e9d6fcf0ed24e9480590c2336/multiprocess-0.70.17-py38-none-any.whl", hash = "sha256:1d52f068357acd1e5bbc670b273ef8f81d57863235d9fbf9314751886e141968", size = 132635 }, + { url = "https://files.pythonhosted.org/packages/f9/41/0618ac724b8a56254962c143759e04fa01c73b37aa69dd433f16643bd38b/multiprocess-0.70.17-py39-none-any.whl", hash = "sha256:c3feb874ba574fbccfb335980020c1ac631fbf2a3f7bee4e2042ede62558a021", size = 133359 }, +] + [[package]] name = "mypy" version = "1.15.0" @@ -2539,6 +2609,21 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/c6/ac/dac4a63f978e4dcb3c6d3a78c4d8e0192a113d288502a1216950c41b1027/parso-0.8.4-py2.py3-none-any.whl", hash = "sha256:a418670a20291dacd2dddc80c377c5c3791378ee1e8d12bffc35420643d43f18", size = 103650 }, ] +[[package]] +name = "pathos" +version = "0.3.3" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "dill" }, + { name = "multiprocess" }, + { name = "pox" }, + { name = "ppft" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/5b/a4/6274bddc49a00873d3269b7612c1553763bae6466c0c82913e16810abd51/pathos-0.3.3.tar.gz", hash = "sha256:dcb2a5f321aa34ca541c1c1861011ea49df357bb908379c21dd5741f666e0a58", size = 166953 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/77/f6/a459cf58ff6b2d1c0a1961ee7084f4bb549d50e288f064e7e7be5ae3a7ab/pathos-0.3.3-py3-none-any.whl", hash = "sha256:e04616c6448608ad1f809360be22e3f2078d949a36a81e6991da6c2dd1f82513", size = 82142 }, +] + [[package]] name = "pathspec" version = "0.12.1" @@ -2600,6 +2685,24 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/88/5f/e351af9a41f866ac3f1fac4ca0613908d9a41741cfcf2228f4ad853b697d/pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669", size = 20556 }, ] +[[package]] +name = "pox" +version = "0.3.5" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/2e/0d/f2eb94b4d1358a60f3539a6abcbbd757fbcb78538fe8d4cfa49850356ccf/pox-0.3.5.tar.gz", hash = "sha256:8120ee4c94e950e6e0483e050a4f0e56076e590ba0a9add19524c254bd23c2d1", size = 119452 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/1d/4c/490d8f7825f38fa77bff188c568163f222d01f6c6d76f574429135edfc49/pox-0.3.5-py3-none-any.whl", hash = "sha256:9e82bcc9e578b43e80a99cad80f0d8f44f4d424f0ee4ee8d4db27260a6aa365a", size = 29492 }, +] + +[[package]] +name = "ppft" +version = "1.7.6.9" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/2b/06/305532df3e1b0c601f60854b6e080991835809d077934cf41976d0f224ce/ppft-1.7.6.9.tar.gz", hash = "sha256:73161c67474ea9d81d04bcdad166d399cff3f084d5d2dc21ebdd46c075bbc265", size = 136395 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/02/b3/45a04dabc39d93ad4836d99625e7c5350257b48e9ae2c5b701f3d5da6960/ppft-1.7.6.9-py3-none-any.whl", hash = "sha256:dab36548db5ca3055067fbe6b1a17db5fee29f3c366c579a9a27cebb52ed96f0", size = 56792 }, +] + [[package]] name = "pre-commit" version = "4.1.0" @@ -3549,6 +3652,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/7e/1b/1c2f43af46456050b27810a7a013af8a7e12bc545a0cdc00eb0df55eb769/rich_toolkit-0.13.2-py3-none-any.whl", hash = "sha256:f3f6c583e5283298a2f7dbd3c65aca18b7f818ad96174113ab5bec0b0e35ed61", size = 13566 }, ] +[[package]] +name = "roman-numerals-py" +version = "3.0.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/9e/78/9491ab144c9cb2d97aa74d6f632bd6f4be67957de03f945a23a67415d859/roman_numerals_py-3.0.0.tar.gz", hash = "sha256:91199c4373658c03d87d9fe004f4a5120a20f6cb192be745c2377cce274ef41c", size = 8970 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/27/d0/a3a2fed015e95b9e81619182adc472540f9786183febfaef8b7c5e909418/roman_numerals_py-3.0.0-py3-none-any.whl", hash = "sha256:a1421ce66b3eab7e8735065458de3fa5c4a46263d50f9f4ac8f0e5e7701dd125", size = 4416 }, +] + [[package]] name = "rpds-py" version = "0.22.3" @@ -3759,6 +3871,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/e9/44/75a9c9421471a6c4805dbf2356f7c181a29c1879239abab1ea2cc8f38b40/sniffio-1.3.1-py3-none-any.whl", hash = "sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2", size = 10235 }, ] +[[package]] +name = "snowballstemmer" +version = "2.2.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/44/7b/af302bebf22c749c56c9c3e8ae13190b5b5db37a33d9068652e8f73b7089/snowballstemmer-2.2.0.tar.gz", hash = "sha256:09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1", size = 86699 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ed/dc/c02e01294f7265e63a7315fe086dd1df7dacb9f840a804da846b96d01b96/snowballstemmer-2.2.0-py2.py3-none-any.whl", hash = "sha256:c8e1716e83cc398ae16824e5572ae04e0d9fc2c6b985fb0f900f5f0c96ecba1a", size = 93002 }, +] + [[package]] name = "soupsieve" version = "2.6" @@ -3768,6 +3889,114 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/d1/c2/fe97d779f3ef3b15f05c94a2f1e3d21732574ed441687474db9d342a7315/soupsieve-2.6-py3-none-any.whl", hash = "sha256:e72c4ff06e4fb6e4b5a9f0f55fe6e81514581fca1515028625d0f299c602ccc9", size = 36186 }, ] +[[package]] +name = "sphinx" +version = "8.2.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "alabaster" }, + { name = "babel" }, + { name = "colorama", marker = "sys_platform == 'win32'" }, + { name = "docutils" }, + { name = "imagesize" }, + { name = "jinja2" }, + { name = "packaging" }, + { name = "pygments" }, + { name = "requests" }, + { name = "roman-numerals-py" }, + { name = "snowballstemmer" }, + { name = "sphinxcontrib-applehelp" }, + { name = "sphinxcontrib-devhelp" }, + { name = "sphinxcontrib-htmlhelp" }, + { name = "sphinxcontrib-jsmath" }, + { name = "sphinxcontrib-qthelp" }, + { name = "sphinxcontrib-serializinghtml" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/81/46/08fe30fc7a6b0e8ff1f502e44133d3a1bd9453d7ab884c2ac7f0ef280920/sphinx-8.2.0.tar.gz", hash = "sha256:5b0067853d6e97f3fa87563e3404ebd008fce03525b55b25da90706764da6215", size = 8321764 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ef/4d/bbe0250199b9dfa8b25a1949ff13d81e7a6f3bfde37fe373a881bd78a37a/sphinx-8.2.0-py3-none-any.whl", hash = "sha256:3c0a40ff71ace28b316bde7387d93b9249a3688c202181519689b66d5d0aed53", size = 3589193 }, +] + +[[package]] +name = "sphinx-rtd-theme" +version = "3.0.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "docutils" }, + { name = "sphinx" }, + { name = "sphinxcontrib-jquery" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/91/44/c97faec644d29a5ceddd3020ae2edffa69e7d00054a8c7a6021e82f20335/sphinx_rtd_theme-3.0.2.tar.gz", hash = "sha256:b7457bc25dda723b20b086a670b9953c859eab60a2a03ee8eb2bb23e176e5f85", size = 7620463 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/85/77/46e3bac77b82b4df5bb5b61f2de98637724f246b4966cfc34bc5895d852a/sphinx_rtd_theme-3.0.2-py2.py3-none-any.whl", hash = "sha256:422ccc750c3a3a311de4ae327e82affdaf59eb695ba4936538552f3b00f4ee13", size = 7655561 }, +] + +[[package]] +name = "sphinxcontrib-applehelp" +version = "2.0.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/ba/6e/b837e84a1a704953c62ef8776d45c3e8d759876b4a84fe14eba2859106fe/sphinxcontrib_applehelp-2.0.0.tar.gz", hash = "sha256:2f29ef331735ce958efa4734873f084941970894c6090408b079c61b2e1c06d1", size = 20053 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/5d/85/9ebeae2f76e9e77b952f4b274c27238156eae7979c5421fba91a28f4970d/sphinxcontrib_applehelp-2.0.0-py3-none-any.whl", hash = "sha256:4cd3f0ec4ac5dd9c17ec65e9ab272c9b867ea77425228e68ecf08d6b28ddbdb5", size = 119300 }, +] + +[[package]] +name = "sphinxcontrib-devhelp" +version = "2.0.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f6/d2/5beee64d3e4e747f316bae86b55943f51e82bb86ecd325883ef65741e7da/sphinxcontrib_devhelp-2.0.0.tar.gz", hash = "sha256:411f5d96d445d1d73bb5d52133377b4248ec79db5c793ce7dbe59e074b4dd1ad", size = 12967 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/35/7a/987e583882f985fe4d7323774889ec58049171828b58c2217e7f79cdf44e/sphinxcontrib_devhelp-2.0.0-py3-none-any.whl", hash = "sha256:aefb8b83854e4b0998877524d1029fd3e6879210422ee3780459e28a1f03a8a2", size = 82530 }, +] + +[[package]] +name = "sphinxcontrib-htmlhelp" +version = "2.1.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/43/93/983afd9aa001e5201eab16b5a444ed5b9b0a7a010541e0ddfbbfd0b2470c/sphinxcontrib_htmlhelp-2.1.0.tar.gz", hash = "sha256:c9e2916ace8aad64cc13a0d233ee22317f2b9025b9cf3295249fa985cc7082e9", size = 22617 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/0a/7b/18a8c0bcec9182c05a0b3ec2a776bba4ead82750a55ff798e8d406dae604/sphinxcontrib_htmlhelp-2.1.0-py3-none-any.whl", hash = "sha256:166759820b47002d22914d64a075ce08f4c46818e17cfc9470a9786b759b19f8", size = 98705 }, +] + +[[package]] +name = "sphinxcontrib-jquery" +version = "4.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "sphinx" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/de/f3/aa67467e051df70a6330fe7770894b3e4f09436dea6881ae0b4f3d87cad8/sphinxcontrib-jquery-4.1.tar.gz", hash = "sha256:1620739f04e36a2c779f1a131a2dfd49b2fd07351bf1968ced074365933abc7a", size = 122331 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/76/85/749bd22d1a68db7291c89e2ebca53f4306c3f205853cf31e9de279034c3c/sphinxcontrib_jquery-4.1-py2.py3-none-any.whl", hash = "sha256:f936030d7d0147dd026a4f2b5a57343d233f1fc7b363f68b3d4f1cb0993878ae", size = 121104 }, +] + +[[package]] +name = "sphinxcontrib-jsmath" +version = "1.0.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/b2/e8/9ed3830aeed71f17c026a07a5097edcf44b692850ef215b161b8ad875729/sphinxcontrib-jsmath-1.0.1.tar.gz", hash = "sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8", size = 5787 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c2/42/4c8646762ee83602e3fb3fbe774c2fac12f317deb0b5dbeeedd2d3ba4b77/sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl", hash = "sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178", size = 5071 }, +] + +[[package]] +name = "sphinxcontrib-qthelp" +version = "2.0.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/68/bc/9104308fc285eb3e0b31b67688235db556cd5b0ef31d96f30e45f2e51cae/sphinxcontrib_qthelp-2.0.0.tar.gz", hash = "sha256:4fe7d0ac8fc171045be623aba3e2a8f613f8682731f9153bb2e40ece16b9bbab", size = 17165 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/27/83/859ecdd180cacc13b1f7e857abf8582a64552ea7a061057a6c716e790fce/sphinxcontrib_qthelp-2.0.0-py3-none-any.whl", hash = "sha256:b18a828cdba941ccd6ee8445dbe72ffa3ef8cbe7505d8cd1fa0d42d3f2d5f3eb", size = 88743 }, +] + +[[package]] +name = "sphinxcontrib-serializinghtml" +version = "2.0.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/3b/44/6716b257b0aa6bfd51a1b31665d1c205fb12cb5ad56de752dfa15657de2f/sphinxcontrib_serializinghtml-2.0.0.tar.gz", hash = "sha256:e9d912827f872c029017a53f0ef2180b327c3f7fd23c87229f7a8e8b70031d4d", size = 16080 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/52/a7/d2782e4e3f77c8450f727ba74a8f12756d5ba823d81b941f1b04da9d033a/sphinxcontrib_serializinghtml-2.0.0-py3-none-any.whl", hash = "sha256:6e2cb0eef194e10c27ec0023bfeb25badbbb5868244cf5bc5bdc04e4464bf331", size = 92072 }, +] + [[package]] name = "sqlalchemy" version = "2.0.38" From 8a34d44b8d8ad36782110094a02daa6e38b18215 Mon Sep 17 00:00:00 2001 From: jemeza-codegen Date: Thu, 20 Feb 2025 12:31:14 -0800 Subject: [PATCH 2/4] chore: updated the docs --- .../examples/swebench_agent_run/README.md | 6 +- uv.lock | 195 ++++++++++++++++-- 2 files changed, 184 insertions(+), 17 deletions(-) diff --git a/codegen-examples/examples/swebench_agent_run/README.md b/codegen-examples/examples/swebench_agent_run/README.md index e7eaaaa98..8ae37c34d 100644 --- a/codegen-examples/examples/swebench_agent_run/README.md +++ b/codegen-examples/examples/swebench_agent_run/README.md @@ -1,9 +1,9 @@ # INSTRUCTIONS 1. Create a `.env` file in the root directory and add your API keys. -1. cd into the `examples/swebench_agent_run` directory +1. cd into the `codegen-examples/examples/swebench_agent_run` directory 1. Create a `.venv` with `uv venv` and activate it with `source .venv/bin/activate` 1. Install the codegen dependencies with `uv pip install -e ../../../` -1. Activate the appropriate modal environment. -1. Launch the modal app with `uv run modal deploy --env= webhooks.py` +1. Activate the appropriate modal profile `uv modal profile activate ` +1. Launch the modal app with `uv run modal deploy --env= entry_point.py` 1. Run the script with `python eval_run.py` diff --git a/uv.lock b/uv.lock index adc45dead..db5f6f420 100644 --- a/uv.lock +++ b/uv.lock @@ -545,6 +545,7 @@ dependencies = [ { name = "codeowners" }, { name = "dataclasses-json" }, { name = "datamodel-code-generator" }, + { name = "datasets" }, { name = "dicttoxml" }, { name = "docstring-parser" }, { name = "fastapi", extra = ["standard"] }, @@ -666,6 +667,7 @@ requires-dist = [ { name = "codeowners", specifier = ">=0.6.0,<1.0.0" }, { name = "dataclasses-json", specifier = ">=0.6.4,<1.0.0" }, { name = "datamodel-code-generator", specifier = ">=0.26.5" }, + { name = "datasets" }, { name = "dicttoxml", specifier = ">=1.7.16,<2.0.0" }, { name = "docstring-parser", specifier = ">=0.16,<1.0" }, { name = "fastapi", extras = ["standard"], specifier = ">=0.115.2,<1.0.0" }, @@ -938,6 +940,31 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/c8/17/2876ca0a4ac7dd7cb5f56a2f0f6d9ac910969f467e8142c847c45a76b897/datamodel_code_generator-0.28.1-py3-none-any.whl", hash = "sha256:1ff8a56f9550a82bcba3e1ad7ebdb89bc655eeabbc4bc6acfb05977cbdc6381c", size = 115601 }, ] +[[package]] +name = "datasets" +version = "3.3.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "aiohttp" }, + { name = "dill" }, + { name = "filelock" }, + { name = "fsspec", extra = ["http"] }, + { name = "huggingface-hub" }, + { name = "multiprocess" }, + { name = "numpy" }, + { name = "packaging" }, + { name = "pandas" }, + { name = "pyarrow" }, + { name = "pyyaml" }, + { name = "requests" }, + { name = "tqdm" }, + { name = "xxhash" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/73/0c/dc3d172104e78e68f7a60386664adbf61db5d10c2246b31ddad06c2d1cb3/datasets-3.3.2.tar.gz", hash = "sha256:20901a97da870fb80b407ccc45f034a7ac99accd07da897ed42f11641bdb8c6e", size = 564352 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/4c/37/22ef7675bef4ffe9577b937ddca2e22791534cbbe11c30714972a91532dc/datasets-3.3.2-py3-none-any.whl", hash = "sha256:fdaf3d5d70242621210b044e9b9b15a56e908bfc3e9d077bcf5605ac390f70bd", size = 485360 }, +] + [[package]] name = "debugpy" version = "1.8.12" @@ -1030,11 +1057,11 @@ wheels = [ [[package]] name = "dill" -version = "0.3.9" +version = "0.3.8" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/70/43/86fe3f9e130c4137b0f1b50784dd70a5087b911fe07fa81e53e0c4c47fea/dill-0.3.9.tar.gz", hash = "sha256:81aa267dddf68cbfe8029c42ca9ec6a4ab3b22371d1c450abc54422577b4512c", size = 187000 } +sdist = { url = "https://files.pythonhosted.org/packages/17/4d/ac7ffa80c69ea1df30a8aa11b3578692a5118e7cd1aa157e3ef73b092d15/dill-0.3.8.tar.gz", hash = "sha256:3ebe3c479ad625c4553aca177444d89b486b1d84982eeacded644afc0cf797ca", size = 184847 } wheels = [ - { url = "https://files.pythonhosted.org/packages/46/d1/e73b6ad76f0b1fb7f23c35c6d95dbc506a9c8804f43dda8cb5b0fa6331fd/dill-0.3.9-py3-none-any.whl", hash = "sha256:468dff3b89520b474c0397703366b7b95eebe6303f108adf9b19da1f702be87a", size = 119418 }, + { url = "https://files.pythonhosted.org/packages/c9/7a/cef76fd8438a42f96db64ddaa85280485a9c395e7df3db8158cfec1eee34/dill-0.3.8-py3-none-any.whl", hash = "sha256:c36ca9ffb54365bdd2f8eb3eff7d2a21237f8452b57ace88b1ac615b7e815bd7", size = 116252 }, ] [[package]] @@ -1258,6 +1285,20 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/c6/c8/a5be5b7550c10858fcf9b0ea054baccab474da77d37f1e828ce043a3a5d4/frozenlist-1.5.0-py3-none-any.whl", hash = "sha256:d994863bba198a4a518b467bb971c56e1db3f180a25c6cf7bb1949c267f748c3", size = 11901 }, ] +[[package]] +name = "fsspec" +version = "2024.12.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/ee/11/de70dee31455c546fbc88301971ec03c328f3d1138cfba14263f651e9551/fsspec-2024.12.0.tar.gz", hash = "sha256:670700c977ed2fb51e0d9f9253177ed20cbde4a3e5c0283cc5385b5870c8533f", size = 291600 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/de/86/5486b0188d08aa643e127774a99bac51ffa6cf343e3deb0583956dca5b22/fsspec-2024.12.0-py3-none-any.whl", hash = "sha256:b520aed47ad9804237ff878b504267a3b0b441e97508bd6d2d8774e3db85cee2", size = 183862 }, +] + +[package.optional-dependencies] +http = [ + { name = "aiohttp" }, +] + [[package]] name = "genson" version = "1.3.0" @@ -1461,6 +1502,24 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/e1/9b/a181f281f65d776426002f330c31849b86b31fc9d848db62e16f03ff739f/httpx_sse-0.4.0-py3-none-any.whl", hash = "sha256:f329af6eae57eaa2bdfd962b42524764af68075ea87370a2de920af5341e318f", size = 7819 }, ] +[[package]] +name = "huggingface-hub" +version = "0.29.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "filelock" }, + { name = "fsspec" }, + { name = "packaging" }, + { name = "pyyaml" }, + { name = "requests" }, + { name = "tqdm" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/22/37/797d6476f13e5ef6af5fc48a5d641d32b39c37e166ccf40c3714c5854a85/huggingface_hub-0.29.1.tar.gz", hash = "sha256:9524eae42077b8ff4fc459ceb7a514eca1c1232b775276b009709fe2a084f250", size = 389776 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ae/05/75b90de9093de0aadafc868bb2fa7c57651fd8f45384adf39bd77f63980d/huggingface_hub-0.29.1-py3-none-any.whl", hash = "sha256:352f69caf16566c7b6de84b54a822f6238e17ddd8ae3da4f8f2272aea5b198d5", size = 468049 }, +] + [[package]] name = "humanize" version = "4.12.1" @@ -2310,19 +2369,18 @@ wheels = [ [[package]] name = "multiprocess" -version = "0.70.17" +version = "0.70.16" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "dill" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/e9/34/1acca6e18697017ad5c8b45279b59305d660ecf2fbed13e5f406f69890e4/multiprocess-0.70.17.tar.gz", hash = "sha256:4ae2f11a3416809ebc9a48abfc8b14ecce0652a0944731a1493a3c1ba44ff57a", size = 1785744 } +sdist = { url = "https://files.pythonhosted.org/packages/b5/ae/04f39c5d0d0def03247c2893d6f2b83c136bf3320a2154d7b8858f2ba72d/multiprocess-0.70.16.tar.gz", hash = "sha256:161af703d4652a0e1410be6abccecde4a7ddffd19341be0a7011b94aeb171ac1", size = 1772603 } wheels = [ - { url = "https://files.pythonhosted.org/packages/e7/a9/39cf856d03690af6fd570cf40331f1f79acdbb3132a9c35d2c5002f7f30b/multiprocess-0.70.17-py310-none-any.whl", hash = "sha256:38357ca266b51a2e22841b755d9a91e4bb7b937979a54d411677111716c32744", size = 134830 }, - { url = "https://files.pythonhosted.org/packages/b2/07/8cbb75d6cfbe8712d8f7f6a5615f083c6e710ab916b748fbb20373ddb142/multiprocess-0.70.17-py311-none-any.whl", hash = "sha256:2884701445d0177aec5bd5f6ee0df296773e4fb65b11903b94c613fb46cfb7d1", size = 144346 }, - { url = "https://files.pythonhosted.org/packages/a4/69/d3f343a61a2f86ef10ed7865a26beda7c71554136ce187b0384b1c2c9ca3/multiprocess-0.70.17-py312-none-any.whl", hash = "sha256:2818af14c52446b9617d1b0755fa70ca2f77c28b25ed97bdaa2c69a22c47b46c", size = 147990 }, - { url = "https://files.pythonhosted.org/packages/c8/b7/2e9a4fcd871b81e1f2a812cd5c6fb52ad1e8da7bf0d7646c55eaae220484/multiprocess-0.70.17-py313-none-any.whl", hash = "sha256:20c28ca19079a6c879258103a6d60b94d4ffe2d9da07dda93fb1c8bc6243f522", size = 149843 }, - { url = "https://files.pythonhosted.org/packages/ae/d7/fd7a092fc0ab1845a1a97ca88e61b9b7cc2e9d6fcf0ed24e9480590c2336/multiprocess-0.70.17-py38-none-any.whl", hash = "sha256:1d52f068357acd1e5bbc670b273ef8f81d57863235d9fbf9314751886e141968", size = 132635 }, - { url = "https://files.pythonhosted.org/packages/f9/41/0618ac724b8a56254962c143759e04fa01c73b37aa69dd433f16643bd38b/multiprocess-0.70.17-py39-none-any.whl", hash = "sha256:c3feb874ba574fbccfb335980020c1ac631fbf2a3f7bee4e2042ede62558a021", size = 133359 }, + { url = "https://files.pythonhosted.org/packages/bc/f7/7ec7fddc92e50714ea3745631f79bd9c96424cb2702632521028e57d3a36/multiprocess-0.70.16-py310-none-any.whl", hash = "sha256:c4a9944c67bd49f823687463660a2d6daae94c289adff97e0f9d696ba6371d02", size = 134824 }, + { url = "https://files.pythonhosted.org/packages/50/15/b56e50e8debaf439f44befec5b2af11db85f6e0f344c3113ae0be0593a91/multiprocess-0.70.16-py311-none-any.whl", hash = "sha256:af4cabb0dac72abfb1e794fa7855c325fd2b55a10a44628a3c1ad3311c04127a", size = 143519 }, + { url = "https://files.pythonhosted.org/packages/0a/7d/a988f258104dcd2ccf1ed40fdc97e26c4ac351eeaf81d76e266c52d84e2f/multiprocess-0.70.16-py312-none-any.whl", hash = "sha256:fc0544c531920dde3b00c29863377f87e1632601092ea2daca74e4beb40faa2e", size = 146741 }, + { url = "https://files.pythonhosted.org/packages/ea/89/38df130f2c799090c978b366cfdf5b96d08de5b29a4a293df7f7429fa50b/multiprocess-0.70.16-py38-none-any.whl", hash = "sha256:a71d82033454891091a226dfc319d0cfa8019a4e888ef9ca910372a446de4435", size = 132628 }, + { url = "https://files.pythonhosted.org/packages/da/d9/f7f9379981e39b8c2511c9e0326d212accacb82f12fbfdc1aa2ce2a7b2b6/multiprocess-0.70.16-py39-none-any.whl", hash = "sha256:a0bafd3ae1b732eac64be2e72038231c1ba97724b60b09400d68f229fcc2fbf3", size = 133351 }, ] [[package]] @@ -2591,6 +2649,40 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/88/ef/eb23f262cca3c0c4eb7ab1933c3b1f03d021f2c48f54763065b6f0e321be/packaging-24.2-py3-none-any.whl", hash = "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759", size = 65451 }, ] +[[package]] +name = "pandas" +version = "2.2.3" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "numpy" }, + { name = "python-dateutil" }, + { name = "pytz" }, + { name = "tzdata" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/9c/d6/9f8431bacc2e19dca897724cd097b1bb224a6ad5433784a44b587c7c13af/pandas-2.2.3.tar.gz", hash = "sha256:4f18ba62b61d7e192368b84517265a99b4d7ee8912f8708660fb4a366cc82667", size = 4399213 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/17/a3/fb2734118db0af37ea7433f57f722c0a56687e14b14690edff0cdb4b7e58/pandas-2.2.3-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:b1d432e8d08679a40e2a6d8b2f9770a5c21793a6f9f47fdd52c5ce1948a5a8a9", size = 12529893 }, + { url = "https://files.pythonhosted.org/packages/e1/0c/ad295fd74bfac85358fd579e271cded3ac969de81f62dd0142c426b9da91/pandas-2.2.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a5a1595fe639f5988ba6a8e5bc9649af3baf26df3998a0abe56c02609392e0a4", size = 11363475 }, + { url = "https://files.pythonhosted.org/packages/c6/2a/4bba3f03f7d07207481fed47f5b35f556c7441acddc368ec43d6643c5777/pandas-2.2.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:5de54125a92bb4d1c051c0659e6fcb75256bf799a732a87184e5ea503965bce3", size = 15188645 }, + { url = "https://files.pythonhosted.org/packages/38/f8/d8fddee9ed0d0c0f4a2132c1dfcf0e3e53265055da8df952a53e7eaf178c/pandas-2.2.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fffb8ae78d8af97f849404f21411c95062db1496aeb3e56f146f0355c9989319", size = 12739445 }, + { url = "https://files.pythonhosted.org/packages/20/e8/45a05d9c39d2cea61ab175dbe6a2de1d05b679e8de2011da4ee190d7e748/pandas-2.2.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:6dfcb5ee8d4d50c06a51c2fffa6cff6272098ad6540aed1a76d15fb9318194d8", size = 16359235 }, + { url = "https://files.pythonhosted.org/packages/1d/99/617d07a6a5e429ff90c90da64d428516605a1ec7d7bea494235e1c3882de/pandas-2.2.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:062309c1b9ea12a50e8ce661145c6aab431b1e99530d3cd60640e255778bd43a", size = 14056756 }, + { url = "https://files.pythonhosted.org/packages/29/d4/1244ab8edf173a10fd601f7e13b9566c1b525c4f365d6bee918e68381889/pandas-2.2.3-cp312-cp312-win_amd64.whl", hash = "sha256:59ef3764d0fe818125a5097d2ae867ca3fa64df032331b7e0917cf5d7bf66b13", size = 11504248 }, + { url = "https://files.pythonhosted.org/packages/64/22/3b8f4e0ed70644e85cfdcd57454686b9057c6c38d2f74fe4b8bc2527214a/pandas-2.2.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f00d1345d84d8c86a63e476bb4955e46458b304b9575dcf71102b5c705320015", size = 12477643 }, + { url = "https://files.pythonhosted.org/packages/e4/93/b3f5d1838500e22c8d793625da672f3eec046b1a99257666c94446969282/pandas-2.2.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:3508d914817e153ad359d7e069d752cdd736a247c322d932eb89e6bc84217f28", size = 11281573 }, + { url = "https://files.pythonhosted.org/packages/f5/94/6c79b07f0e5aab1dcfa35a75f4817f5c4f677931d4234afcd75f0e6a66ca/pandas-2.2.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:22a9d949bfc9a502d320aa04e5d02feab689d61da4e7764b62c30b991c42c5f0", size = 15196085 }, + { url = "https://files.pythonhosted.org/packages/e8/31/aa8da88ca0eadbabd0a639788a6da13bb2ff6edbbb9f29aa786450a30a91/pandas-2.2.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f3a255b2c19987fbbe62a9dfd6cff7ff2aa9ccab3fc75218fd4b7530f01efa24", size = 12711809 }, + { url = "https://files.pythonhosted.org/packages/ee/7c/c6dbdb0cb2a4344cacfb8de1c5808ca885b2e4dcfde8008266608f9372af/pandas-2.2.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:800250ecdadb6d9c78eae4990da62743b857b470883fa27f652db8bdde7f6659", size = 16356316 }, + { url = "https://files.pythonhosted.org/packages/57/b7/8b757e7d92023b832869fa8881a992696a0bfe2e26f72c9ae9f255988d42/pandas-2.2.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:6374c452ff3ec675a8f46fd9ab25c4ad0ba590b71cf0656f8b6daa5202bca3fb", size = 14022055 }, + { url = "https://files.pythonhosted.org/packages/3b/bc/4b18e2b8c002572c5a441a64826252ce5da2aa738855747247a971988043/pandas-2.2.3-cp313-cp313-win_amd64.whl", hash = "sha256:61c5ad4043f791b61dd4752191d9f07f0ae412515d59ba8f005832a532f8736d", size = 11481175 }, + { url = "https://files.pythonhosted.org/packages/76/a3/a5d88146815e972d40d19247b2c162e88213ef51c7c25993942c39dbf41d/pandas-2.2.3-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:3b71f27954685ee685317063bf13c7709a7ba74fc996b84fc6821c59b0f06468", size = 12615650 }, + { url = "https://files.pythonhosted.org/packages/9c/8c/f0fd18f6140ddafc0c24122c8a964e48294acc579d47def376fef12bcb4a/pandas-2.2.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:38cf8125c40dae9d5acc10fa66af8ea6fdf760b2714ee482ca691fc66e6fcb18", size = 11290177 }, + { url = "https://files.pythonhosted.org/packages/ed/f9/e995754eab9c0f14c6777401f7eece0943840b7a9fc932221c19d1abee9f/pandas-2.2.3-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:ba96630bc17c875161df3818780af30e43be9b166ce51c9a18c1feae342906c2", size = 14651526 }, + { url = "https://files.pythonhosted.org/packages/25/b0/98d6ae2e1abac4f35230aa756005e8654649d305df9a28b16b9ae4353bff/pandas-2.2.3-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1db71525a1538b30142094edb9adc10be3f3e176748cd7acc2240c2f2e5aa3a4", size = 11871013 }, + { url = "https://files.pythonhosted.org/packages/cc/57/0f72a10f9db6a4628744c8e8f0df4e6e21de01212c7c981d31e50ffc8328/pandas-2.2.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:15c0e1e02e93116177d29ff83e8b1619c93ddc9c49083f237d4312337a61165d", size = 15711620 }, + { url = "https://files.pythonhosted.org/packages/ab/5f/b38085618b950b79d2d9164a711c52b10aefc0ae6833b96f626b7021b2ed/pandas-2.2.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:ad5b65698ab28ed8d7f18790a0dc58005c7629f227be9ecc1072aa74c0c1d43a", size = 13098436 }, +] + [[package]] name = "pandocfilters" version = "1.5.1" @@ -2611,7 +2703,7 @@ wheels = [ [[package]] name = "pathos" -version = "0.3.3" +version = "0.3.2" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "dill" }, @@ -2619,9 +2711,9 @@ dependencies = [ { name = "pox" }, { name = "ppft" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/5b/a4/6274bddc49a00873d3269b7612c1553763bae6466c0c82913e16810abd51/pathos-0.3.3.tar.gz", hash = "sha256:dcb2a5f321aa34ca541c1c1861011ea49df357bb908379c21dd5741f666e0a58", size = 166953 } +sdist = { url = "https://files.pythonhosted.org/packages/be/99/7fcb91495e40735958a576b9bde930cc402d594e9ad5277bdc9b6326e1c8/pathos-0.3.2.tar.gz", hash = "sha256:4f2a42bc1e10ccf0fe71961e7145fc1437018b6b21bd93b2446abc3983e49a7a", size = 166506 } wheels = [ - { url = "https://files.pythonhosted.org/packages/77/f6/a459cf58ff6b2d1c0a1961ee7084f4bb549d50e288f064e7e7be5ae3a7ab/pathos-0.3.3-py3-none-any.whl", hash = "sha256:e04616c6448608ad1f809360be22e3f2078d949a36a81e6991da6c2dd1f82513", size = 82142 }, + { url = "https://files.pythonhosted.org/packages/f4/7f/cea34872c000d17972dad998575d14656d7c6bcf1a08a8d66d73c1ef2cca/pathos-0.3.2-py3-none-any.whl", hash = "sha256:d669275e6eb4b3fbcd2846d7a6d1bba315fe23add0c614445ba1408d8b38bafe", size = 82075 }, ] [[package]] @@ -2845,6 +2937,34 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/e0/a9/023730ba63db1e494a271cb018dcd361bd2c917ba7004c3e49d5daf795a2/py_cpuinfo-9.0.0-py3-none-any.whl", hash = "sha256:859625bc251f64e21f077d099d4162689c762b5d6a4c3c97553d56241c9674d5", size = 22335 }, ] +[[package]] +name = "pyarrow" +version = "19.0.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/7f/09/a9046344212690f0632b9c709f9bf18506522feb333c894d0de81d62341a/pyarrow-19.0.1.tar.gz", hash = "sha256:3bf266b485df66a400f282ac0b6d1b500b9d2ae73314a153dbe97d6d5cc8a99e", size = 1129437 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/78/b4/94e828704b050e723f67d67c3535cf7076c7432cd4cf046e4bb3b96a9c9d/pyarrow-19.0.1-cp312-cp312-macosx_12_0_arm64.whl", hash = "sha256:80b2ad2b193e7d19e81008a96e313fbd53157945c7be9ac65f44f8937a55427b", size = 30670749 }, + { url = "https://files.pythonhosted.org/packages/7e/3b/4692965e04bb1df55e2c314c4296f1eb12b4f3052d4cf43d29e076aedf66/pyarrow-19.0.1-cp312-cp312-macosx_12_0_x86_64.whl", hash = "sha256:ee8dec072569f43835932a3b10c55973593abc00936c202707a4ad06af7cb294", size = 32128007 }, + { url = "https://files.pythonhosted.org/packages/22/f7/2239af706252c6582a5635c35caa17cb4d401cd74a87821ef702e3888957/pyarrow-19.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4d5d1ec7ec5324b98887bdc006f4d2ce534e10e60f7ad995e7875ffa0ff9cb14", size = 41144566 }, + { url = "https://files.pythonhosted.org/packages/fb/e3/c9661b2b2849cfefddd9fd65b64e093594b231b472de08ff658f76c732b2/pyarrow-19.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f3ad4c0eb4e2a9aeb990af6c09e6fa0b195c8c0e7b272ecc8d4d2b6574809d34", size = 42202991 }, + { url = "https://files.pythonhosted.org/packages/fe/4f/a2c0ed309167ef436674782dfee4a124570ba64299c551e38d3fdaf0a17b/pyarrow-19.0.1-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:d383591f3dcbe545f6cc62daaef9c7cdfe0dff0fb9e1c8121101cabe9098cfa6", size = 40507986 }, + { url = "https://files.pythonhosted.org/packages/27/2e/29bb28a7102a6f71026a9d70d1d61df926887e36ec797f2e6acfd2dd3867/pyarrow-19.0.1-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:b4c4156a625f1e35d6c0b2132635a237708944eb41df5fbe7d50f20d20c17832", size = 42087026 }, + { url = "https://files.pythonhosted.org/packages/16/33/2a67c0f783251106aeeee516f4806161e7b481f7d744d0d643d2f30230a5/pyarrow-19.0.1-cp312-cp312-win_amd64.whl", hash = "sha256:5bd1618ae5e5476b7654c7b55a6364ae87686d4724538c24185bbb2952679960", size = 25250108 }, + { url = "https://files.pythonhosted.org/packages/2b/8d/275c58d4b00781bd36579501a259eacc5c6dfb369be4ddeb672ceb551d2d/pyarrow-19.0.1-cp313-cp313-macosx_12_0_arm64.whl", hash = "sha256:e45274b20e524ae5c39d7fc1ca2aa923aab494776d2d4b316b49ec7572ca324c", size = 30653552 }, + { url = "https://files.pythonhosted.org/packages/a0/9e/e6aca5cc4ef0c7aec5f8db93feb0bde08dbad8c56b9014216205d271101b/pyarrow-19.0.1-cp313-cp313-macosx_12_0_x86_64.whl", hash = "sha256:d9dedeaf19097a143ed6da37f04f4051aba353c95ef507764d344229b2b740ae", size = 32103413 }, + { url = "https://files.pythonhosted.org/packages/6a/fa/a7033f66e5d4f1308c7eb0dfcd2ccd70f881724eb6fd1776657fdf65458f/pyarrow-19.0.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6ebfb5171bb5f4a52319344ebbbecc731af3f021e49318c74f33d520d31ae0c4", size = 41134869 }, + { url = "https://files.pythonhosted.org/packages/2d/92/34d2569be8e7abdc9d145c98dc410db0071ac579b92ebc30da35f500d630/pyarrow-19.0.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f2a21d39fbdb948857f67eacb5bbaaf36802de044ec36fbef7a1c8f0dd3a4ab2", size = 42192626 }, + { url = "https://files.pythonhosted.org/packages/0a/1f/80c617b1084fc833804dc3309aa9d8daacd46f9ec8d736df733f15aebe2c/pyarrow-19.0.1-cp313-cp313-manylinux_2_28_aarch64.whl", hash = "sha256:99bc1bec6d234359743b01e70d4310d0ab240c3d6b0da7e2a93663b0158616f6", size = 40496708 }, + { url = "https://files.pythonhosted.org/packages/e6/90/83698fcecf939a611c8d9a78e38e7fed7792dcc4317e29e72cf8135526fb/pyarrow-19.0.1-cp313-cp313-manylinux_2_28_x86_64.whl", hash = "sha256:1b93ef2c93e77c442c979b0d596af45e4665d8b96da598db145b0fec014b9136", size = 42075728 }, + { url = "https://files.pythonhosted.org/packages/40/49/2325f5c9e7a1c125c01ba0c509d400b152c972a47958768e4e35e04d13d8/pyarrow-19.0.1-cp313-cp313-win_amd64.whl", hash = "sha256:d9d46e06846a41ba906ab25302cf0fd522f81aa2a85a71021826f34639ad31ef", size = 25242568 }, + { url = "https://files.pythonhosted.org/packages/3f/72/135088d995a759d4d916ec4824cb19e066585b4909ebad4ab196177aa825/pyarrow-19.0.1-cp313-cp313t-macosx_12_0_arm64.whl", hash = "sha256:c0fe3dbbf054a00d1f162fda94ce236a899ca01123a798c561ba307ca38af5f0", size = 30702371 }, + { url = "https://files.pythonhosted.org/packages/2e/01/00beeebd33d6bac701f20816a29d2018eba463616bbc07397fdf99ac4ce3/pyarrow-19.0.1-cp313-cp313t-macosx_12_0_x86_64.whl", hash = "sha256:96606c3ba57944d128e8a8399da4812f56c7f61de8c647e3470b417f795d0ef9", size = 32116046 }, + { url = "https://files.pythonhosted.org/packages/1f/c9/23b1ea718dfe967cbd986d16cf2a31fe59d015874258baae16d7ea0ccabc/pyarrow-19.0.1-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8f04d49a6b64cf24719c080b3c2029a3a5b16417fd5fd7c4041f94233af732f3", size = 41091183 }, + { url = "https://files.pythonhosted.org/packages/3a/d4/b4a3aa781a2c715520aa8ab4fe2e7fa49d33a1d4e71c8fc6ab7b5de7a3f8/pyarrow-19.0.1-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5a9137cf7e1640dce4c190551ee69d478f7121b5c6f323553b319cac936395f6", size = 42171896 }, + { url = "https://files.pythonhosted.org/packages/23/1b/716d4cd5a3cbc387c6e6745d2704c4b46654ba2668260d25c402626c5ddb/pyarrow-19.0.1-cp313-cp313t-manylinux_2_28_aarch64.whl", hash = "sha256:7c1bca1897c28013db5e4c83944a2ab53231f541b9e0c3f4791206d0c0de389a", size = 40464851 }, + { url = "https://files.pythonhosted.org/packages/ed/bd/54907846383dcc7ee28772d7e646f6c34276a17da740002a5cefe90f04f7/pyarrow-19.0.1-cp313-cp313t-manylinux_2_28_x86_64.whl", hash = "sha256:58d9397b2e273ef76264b45531e9d552d8ec8a6688b7390b5be44c02a37aade8", size = 42085744 }, +] + [[package]] name = "pycparser" version = "2.22" @@ -4426,6 +4546,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/65/f3/107a22063bf27bdccf2024833d3445f4eea42b2e598abfbd46f6a63b6cb0/typing_inspect-0.9.0-py3-none-any.whl", hash = "sha256:9ee6fc59062311ef8547596ab6b955e1b8aa46242d854bfc78f4f6b0eff35f9f", size = 8827 }, ] +[[package]] +name = "tzdata" +version = "2025.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/43/0f/fa4723f22942480be4ca9527bbde8d43f6c3f2fe8412f00e7f5f6746bc8b/tzdata-2025.1.tar.gz", hash = "sha256:24894909e88cdb28bd1636c6887801df64cb485bd593f2fd83ef29075a81d694", size = 194950 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/0f/dd/84f10e23edd882c6f968c21c2434fe67bd4a528967067515feca9e611e5e/tzdata-2025.1-py2.py3-none-any.whl", hash = "sha256:7e127113816800496f027041c570f50bcd464a020098a3b6b199517772303639", size = 346762 }, +] + [[package]] name = "unidiff" version = "0.7.5" @@ -4699,6 +4828,44 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/d6/45/fc303eb433e8a2a271739c98e953728422fa61a3c1f36077a49e395c972e/xmltodict-0.14.2-py2.py3-none-any.whl", hash = "sha256:20cc7d723ed729276e808f26fb6b3599f786cbc37e06c65e192ba77c40f20aac", size = 9981 }, ] +[[package]] +name = "xxhash" +version = "3.5.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/00/5e/d6e5258d69df8b4ed8c83b6664f2b47d30d2dec551a29ad72a6c69eafd31/xxhash-3.5.0.tar.gz", hash = "sha256:84f2caddf951c9cbf8dc2e22a89d4ccf5d86391ac6418fe81e3c67d0cf60b45f", size = 84241 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/07/0e/1bfce2502c57d7e2e787600b31c83535af83746885aa1a5f153d8c8059d6/xxhash-3.5.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:14470ace8bd3b5d51318782cd94e6f94431974f16cb3b8dc15d52f3b69df8e00", size = 31969 }, + { url = "https://files.pythonhosted.org/packages/3f/d6/8ca450d6fe5b71ce521b4e5db69622383d039e2b253e9b2f24f93265b52c/xxhash-3.5.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:59aa1203de1cb96dbeab595ded0ad0c0056bb2245ae11fac11c0ceea861382b9", size = 30787 }, + { url = "https://files.pythonhosted.org/packages/5b/84/de7c89bc6ef63d750159086a6ada6416cc4349eab23f76ab870407178b93/xxhash-3.5.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:08424f6648526076e28fae6ea2806c0a7d504b9ef05ae61d196d571e5c879c84", size = 220959 }, + { url = "https://files.pythonhosted.org/packages/fe/86/51258d3e8a8545ff26468c977101964c14d56a8a37f5835bc0082426c672/xxhash-3.5.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:61a1ff00674879725b194695e17f23d3248998b843eb5e933007ca743310f793", size = 200006 }, + { url = "https://files.pythonhosted.org/packages/02/0a/96973bd325412feccf23cf3680fd2246aebf4b789122f938d5557c54a6b2/xxhash-3.5.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f2f2c61bee5844d41c3eb015ac652a0229e901074951ae48581d58bfb2ba01be", size = 428326 }, + { url = "https://files.pythonhosted.org/packages/11/a7/81dba5010f7e733de88af9555725146fc133be97ce36533867f4c7e75066/xxhash-3.5.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9d32a592cac88d18cc09a89172e1c32d7f2a6e516c3dfde1b9adb90ab5df54a6", size = 194380 }, + { url = "https://files.pythonhosted.org/packages/fb/7d/f29006ab398a173f4501c0e4977ba288f1c621d878ec217b4ff516810c04/xxhash-3.5.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:70dabf941dede727cca579e8c205e61121afc9b28516752fd65724be1355cc90", size = 207934 }, + { url = "https://files.pythonhosted.org/packages/8a/6e/6e88b8f24612510e73d4d70d9b0c7dff62a2e78451b9f0d042a5462c8d03/xxhash-3.5.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:e5d0ddaca65ecca9c10dcf01730165fd858533d0be84c75c327487c37a906a27", size = 216301 }, + { url = "https://files.pythonhosted.org/packages/af/51/7862f4fa4b75a25c3b4163c8a873f070532fe5f2d3f9b3fc869c8337a398/xxhash-3.5.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:3e5b5e16c5a480fe5f59f56c30abdeba09ffd75da8d13f6b9b6fd224d0b4d0a2", size = 203351 }, + { url = "https://files.pythonhosted.org/packages/22/61/8d6a40f288f791cf79ed5bb113159abf0c81d6efb86e734334f698eb4c59/xxhash-3.5.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:149b7914451eb154b3dfaa721315117ea1dac2cc55a01bfbd4df7c68c5dd683d", size = 210294 }, + { url = "https://files.pythonhosted.org/packages/17/02/215c4698955762d45a8158117190261b2dbefe9ae7e5b906768c09d8bc74/xxhash-3.5.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:eade977f5c96c677035ff39c56ac74d851b1cca7d607ab3d8f23c6b859379cab", size = 414674 }, + { url = "https://files.pythonhosted.org/packages/31/5c/b7a8db8a3237cff3d535261325d95de509f6a8ae439a5a7a4ffcff478189/xxhash-3.5.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:fa9f547bd98f5553d03160967866a71056a60960be00356a15ecc44efb40ba8e", size = 192022 }, + { url = "https://files.pythonhosted.org/packages/78/e3/dd76659b2811b3fd06892a8beb850e1996b63e9235af5a86ea348f053e9e/xxhash-3.5.0-cp312-cp312-win32.whl", hash = "sha256:f7b58d1fd3551b8c80a971199543379be1cee3d0d409e1f6d8b01c1a2eebf1f8", size = 30170 }, + { url = "https://files.pythonhosted.org/packages/d9/6b/1c443fe6cfeb4ad1dcf231cdec96eb94fb43d6498b4469ed8b51f8b59a37/xxhash-3.5.0-cp312-cp312-win_amd64.whl", hash = "sha256:fa0cafd3a2af231b4e113fba24a65d7922af91aeb23774a8b78228e6cd785e3e", size = 30040 }, + { url = "https://files.pythonhosted.org/packages/0f/eb/04405305f290173acc0350eba6d2f1a794b57925df0398861a20fbafa415/xxhash-3.5.0-cp312-cp312-win_arm64.whl", hash = "sha256:586886c7e89cb9828bcd8a5686b12e161368e0064d040e225e72607b43858ba2", size = 26796 }, + { url = "https://files.pythonhosted.org/packages/c9/b8/e4b3ad92d249be5c83fa72916c9091b0965cb0faeff05d9a0a3870ae6bff/xxhash-3.5.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:37889a0d13b0b7d739cfc128b1c902f04e32de17b33d74b637ad42f1c55101f6", size = 31795 }, + { url = "https://files.pythonhosted.org/packages/fc/d8/b3627a0aebfbfa4c12a41e22af3742cf08c8ea84f5cc3367b5de2d039cce/xxhash-3.5.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:97a662338797c660178e682f3bc180277b9569a59abfb5925e8620fba00b9fc5", size = 30792 }, + { url = "https://files.pythonhosted.org/packages/c3/cc/762312960691da989c7cd0545cb120ba2a4148741c6ba458aa723c00a3f8/xxhash-3.5.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7f85e0108d51092bdda90672476c7d909c04ada6923c14ff9d913c4f7dc8a3bc", size = 220950 }, + { url = "https://files.pythonhosted.org/packages/fe/e9/cc266f1042c3c13750e86a535496b58beb12bf8c50a915c336136f6168dc/xxhash-3.5.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cd2fd827b0ba763ac919440042302315c564fdb797294d86e8cdd4578e3bc7f3", size = 199980 }, + { url = "https://files.pythonhosted.org/packages/bf/85/a836cd0dc5cc20376de26b346858d0ac9656f8f730998ca4324921a010b9/xxhash-3.5.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:82085c2abec437abebf457c1d12fccb30cc8b3774a0814872511f0f0562c768c", size = 428324 }, + { url = "https://files.pythonhosted.org/packages/b4/0e/15c243775342ce840b9ba34aceace06a1148fa1630cd8ca269e3223987f5/xxhash-3.5.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:07fda5de378626e502b42b311b049848c2ef38784d0d67b6f30bb5008642f8eb", size = 194370 }, + { url = "https://files.pythonhosted.org/packages/87/a1/b028bb02636dfdc190da01951d0703b3d904301ed0ef6094d948983bef0e/xxhash-3.5.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c279f0d2b34ef15f922b77966640ade58b4ccdfef1c4d94b20f2a364617a493f", size = 207911 }, + { url = "https://files.pythonhosted.org/packages/80/d5/73c73b03fc0ac73dacf069fdf6036c9abad82de0a47549e9912c955ab449/xxhash-3.5.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:89e66ceed67b213dec5a773e2f7a9e8c58f64daeb38c7859d8815d2c89f39ad7", size = 216352 }, + { url = "https://files.pythonhosted.org/packages/b6/2a/5043dba5ddbe35b4fe6ea0a111280ad9c3d4ba477dd0f2d1fe1129bda9d0/xxhash-3.5.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:bcd51708a633410737111e998ceb3b45d3dbc98c0931f743d9bb0a209033a326", size = 203410 }, + { url = "https://files.pythonhosted.org/packages/a2/b2/9a8ded888b7b190aed75b484eb5c853ddd48aa2896e7b59bbfbce442f0a1/xxhash-3.5.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:3ff2c0a34eae7df88c868be53a8dd56fbdf592109e21d4bfa092a27b0bf4a7bf", size = 210322 }, + { url = "https://files.pythonhosted.org/packages/98/62/440083fafbc917bf3e4b67c2ade621920dd905517e85631c10aac955c1d2/xxhash-3.5.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:4e28503dccc7d32e0b9817aa0cbfc1f45f563b2c995b7a66c4c8a0d232e840c7", size = 414725 }, + { url = "https://files.pythonhosted.org/packages/75/db/009206f7076ad60a517e016bb0058381d96a007ce3f79fa91d3010f49cc2/xxhash-3.5.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:a6c50017518329ed65a9e4829154626f008916d36295b6a3ba336e2458824c8c", size = 192070 }, + { url = "https://files.pythonhosted.org/packages/1f/6d/c61e0668943a034abc3a569cdc5aeae37d686d9da7e39cf2ed621d533e36/xxhash-3.5.0-cp313-cp313-win32.whl", hash = "sha256:53a068fe70301ec30d868ece566ac90d873e3bb059cf83c32e76012c889b8637", size = 30172 }, + { url = "https://files.pythonhosted.org/packages/96/14/8416dce965f35e3d24722cdf79361ae154fa23e2ab730e5323aa98d7919e/xxhash-3.5.0-cp313-cp313-win_amd64.whl", hash = "sha256:80babcc30e7a1a484eab952d76a4f4673ff601f54d5142c26826502740e70b43", size = 30041 }, + { url = "https://files.pythonhosted.org/packages/27/ee/518b72faa2073f5aa8e3262408d284892cb79cf2754ba0c3a5870645ef73/xxhash-3.5.0-cp313-cp313-win_arm64.whl", hash = "sha256:4811336f1ce11cac89dcbd18f3a25c527c16311709a89313c3acaf771def2d4b", size = 26801 }, +] + [[package]] name = "yarl" version = "1.18.3" From 19361ec679d3b81b47281239be315c2d9fb856bd Mon Sep 17 00:00:00 2001 From: jemeza-codegen Date: Thu, 20 Feb 2025 16:14:39 -0800 Subject: [PATCH 3/4] chore: added command line arguments, removed dead code --- .../examples/swebench_agent_run/README.md | 28 +- .../swebench_agent_run/entry_point.py | 14 +- .../{eval_run.py => run_eval.py} | 34 ++- pyproject.toml | 1 - src/codegen/extensions/langchain/utils.py | 115 --------- src/codegen/extensions/swebench/agent.py | 101 -------- src/codegen/extensions/swebench/constants.py | 5 - src/codegen/extensions/swebench/harness.py | 61 ++--- src/codegen/extensions/swebench/report.py | 63 +---- src/codegen/extensions/swebench/tests.py | 3 - src/codegen/extensions/swebench/utils.py | 241 ++++++++---------- uv.lock | 168 ------------ 12 files changed, 186 insertions(+), 648 deletions(-) rename codegen-examples/examples/swebench_agent_run/{eval_run.py => run_eval.py} (80%) delete mode 100644 src/codegen/extensions/langchain/utils.py delete mode 100644 src/codegen/extensions/swebench/agent.py delete mode 100644 src/codegen/extensions/swebench/constants.py diff --git a/codegen-examples/examples/swebench_agent_run/README.md b/codegen-examples/examples/swebench_agent_run/README.md index 8ae37c34d..11f756038 100644 --- a/codegen-examples/examples/swebench_agent_run/README.md +++ b/codegen-examples/examples/swebench_agent_run/README.md @@ -1,9 +1,33 @@ # INSTRUCTIONS 1. Create a `.env` file in the root directory and add your API keys. + 1. cd into the `codegen-examples/examples/swebench_agent_run` directory + 1. Create a `.venv` with `uv venv` and activate it with `source .venv/bin/activate` -1. Install the codegen dependencies with `uv pip install -e ../../../` + +1. Install the codegen dependencies with `uv pip install codegen` + +- Note: If you'd like to install the dependencies in the global environment, you can use `uv pip install -e ../../../`. This will allow you to test modifications to the codegen codebase. You will need to run `uv pip install -e ../../../` each time you make changes to the codebase. + +5. Ensure that you have a modal account and profile set up. If you don't have one, you can create one at https://modal.com/ + 1. Activate the appropriate modal profile `uv modal profile activate ` + 1. Launch the modal app with `uv run modal deploy --env= entry_point.py` -1. Run the script with `python eval_run.py` + +1. Run the evaluation with `python run_eval.py` with the desired options: + +- ```bash + $ python run_eval.py --help + Usage: run_eval.py [OPTIONS] + + Options: + --use-existing-preds Use existing predictions instead of + generating new ones. + --dataset [princeton-nlp/SWE-bench_Lite|princeton-nlp/SWE-bench|princeton-nlp/SWE-bench-verified] + The dataset to use. + --length INTEGER The number of examples to process. + --instance-id TEXT The instance ID of the example to process. + --help Show this message and exit. + ``` diff --git a/codegen-examples/examples/swebench_agent_run/entry_point.py b/codegen-examples/examples/swebench_agent_run/entry_point.py index ba09e6359..0d5007419 100644 --- a/codegen-examples/examples/swebench_agent_run/entry_point.py +++ b/codegen-examples/examples/swebench_agent_run/entry_point.py @@ -1,5 +1,5 @@ -from codegen.extensions.langchain.utils import SweBenchExample -from codegen.extensions.swebench.harness import process_one_instance +from codegen.extensions.swebench.utils import SweBenchExample +from codegen.extensions.swebench.harness import run_agent_on_entry import modal image = ( @@ -9,13 +9,11 @@ .copy_local_dir("../../../", "/root/codegen", ignore=[".venv", "**/.venv", "tests", "**/tests"]) .run_commands("pip install -e /root/codegen") ) -app = modal.App(name="swebench-agent-run", image=image, secrets=[modal.Secret.from_dotenv()]) -# Here is an example implementation of setting up an endpoint for receiving webhook events from Linear. -# The @app.linear.event() decorator takes care of subscribing to the webhook and also unsubscribing when the deployment spun -# Load environment variables from .env file +app = modal.App(name="swebench-agent-run", image=image, secrets=[modal.Secret.from_dotenv()]) @app.function(timeout=5 * 60) -async def process_entry(entry: SweBenchExample): - return process_one_instance(entry) +async def run_agent_modal(entry: SweBenchExample): + """Modal function to process a single example from the SWE-bench dataset.""" + return run_agent_on_entry(entry) diff --git a/codegen-examples/examples/swebench_agent_run/eval_run.py b/codegen-examples/examples/swebench_agent_run/run_eval.py similarity index 80% rename from codegen-examples/examples/swebench_agent_run/eval_run.py rename to codegen-examples/examples/swebench_agent_run/run_eval.py index 6a6735267..d339b4418 100644 --- a/codegen-examples/examples/swebench_agent_run/eval_run.py +++ b/codegen-examples/examples/swebench_agent_run/run_eval.py @@ -3,17 +3,18 @@ import traceback from pathlib import Path import modal +import click from datetime import datetime -from codegen.extensions.langchain.utils import get_swe_bench_examples +from codegen.extensions.swebench.utils import SWEBenchDataset, get_swe_bench_example, get_swe_bench_examples from codegen.extensions.swebench.report import generate_report PREDS_DNAME = Path(__file__).parent / "predictions" LOG_DIR = Path(__file__).parent / "logs" -process_entry = modal.Function.lookup("swebench-agent-run", "process_entry") +run_agent_modal = modal.Function.lookup("swebench-agent-run", "run_agent_modal") -async def process_batch(examples, batch_size=50): +async def process_batch(examples, batch_size=10): """Process a batch of examples concurrently. Args: @@ -29,7 +30,7 @@ async def process_batch(examples, batch_size=50): batch = examples[i : i + batch_size] # Create tasks for this batch - batch_tasks = [process_entry.remote.aio(example) for example in batch] + batch_tasks = [run_agent_modal.remote.aio(example) for example in batch] # Wait for all tasks in this batch to complete print(f"Processing batch {i // batch_size + 1}/{len(examples) // batch_size + 1} (examples {i + 1}-{min(i + batch_size, len(examples))})") @@ -49,7 +50,7 @@ async def process_batch(examples, batch_size=50): "traceback": traceback.format_exception(type(result), result, result.__traceback__), } - if isinstance(result, modal.exception.ModalClientError): + if isinstance(result, modal.exception.Error): error_info["modal_error_code"] = getattr(result, "code", None) error_info["modal_error_details"] = getattr(result, "details", None) @@ -86,11 +87,15 @@ async def process_batch(examples, batch_size=50): return results -async def run_eval(use_existing_preds=False): +async def run_eval(use_existing_preds, dataset, length, instance_id=None): + dataset = SWEBenchDataset(dataset) + if instance_id: + examples = [get_swe_bench_example(instance_id, dataset=dataset)] + else: + examples = get_swe_bench_examples(dataset=dataset, length=length) + try: if not use_existing_preds: - # Get all examples - examples = get_swe_bench_examples()[:1] print(f"Processing {len(examples)} examples...") # Create output directory if it doesn't exist @@ -143,12 +148,21 @@ async def run_eval(use_existing_preds=False): print(f" {error_type}: {count}") # Generate Report on Modal - generate_report(PREDS_DNAME, LOG_DIR) + generate_report(PREDS_DNAME, LOG_DIR, dataset) except Exception: print("Fatal error in run_eval:") traceback.print_exc() raise +@click.command() +@click.option("--use-existing-preds", is_flag=True, help="Use existing predictions instead of generating new ones.") +@click.option("--dataset", help="The dataset to use.", type=click.Choice([dataset.value for dataset in SWEBenchDataset]), default=SWEBenchDataset.LITE.value) +@click.option("--length", help="The number of examples to process.", type=int, default=10) +@click.option("--instance-id", help="The instance ID of the example to process.") +def run_eval_command(use_existing_preds, dataset, length, instance_id): + asyncio.run(run_eval(use_existing_preds, dataset, length, instance_id)) + + if __name__ == "__main__": - asyncio.run(run_eval()) + run_eval_command() diff --git a/pyproject.toml b/pyproject.toml index 38a9b34bc..6d4ffec89 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -71,7 +71,6 @@ dependencies = [ "slack-sdk", "langchain-anthropic>=0.3.7", "lox>=0.12.0", - "datasets", ] license = { text = "Apache-2.0" } diff --git a/src/codegen/extensions/langchain/utils.py b/src/codegen/extensions/langchain/utils.py deleted file mode 100644 index 785a57ea7..000000000 --- a/src/codegen/extensions/langchain/utils.py +++ /dev/null @@ -1,115 +0,0 @@ -"""Utilities for working with language models and datasets.""" - -from dataclasses import dataclass -from typing import Optional - -import requests - - -@dataclass -class SweBenchExample: - """A single example from the SWE-bench dataset.""" - - repo: str - instance_id: str - base_commit: str - patch: str - test_patch: str - problem_statement: str - hints_text: Optional[str] - created_at: str - version: str - fail_to_pass: str - pass_to_pass: Optional[str] - environment_setup_commit: Optional[str] - - -def get_swe_bench_examples() -> list[SweBenchExample]: - """Fetch examples from the SWE-bench dataset. - - Returns: - List of SweBenchExample objects - - Raises: - requests.RequestException: If the API request fails - """ - url = "https://datasets-server.huggingface.co/rows" - params = { - "dataset": "princeton-nlp/SWE-bench_Lite", - "config": "default", - "split": "test", - "offset": 0, - "length": 100, - } - - response = requests.get(url, params=params) - response.raise_for_status() - data = response.json() - - examples = [] - for row in data["rows"]: - example = SweBenchExample( - repo=row["row"]["repo"], - instance_id=row["row"]["instance_id"], - base_commit=row["row"]["base_commit"], - patch=row["row"]["patch"], - test_patch=row["row"]["test_patch"], - problem_statement=row["row"]["problem_statement"], - hints_text=row["row"].get("hints_text"), - created_at=row["row"]["created_at"], - version=row["row"]["version"], - fail_to_pass=row["row"]["FAIL_TO_PASS"], - pass_to_pass=row["row"].get("PASS_TO_PASS"), - environment_setup_commit=row["row"].get("environment_setup_commit"), - ) - examples.append(example) - - return examples - - -def get_swe_bench_example(instance_id: str) -> SweBenchExample: - """Fetch a single example from the SWE-bench dataset by its instance ID. - - Args: - instance_id: The unique identifier of the example to fetch - - Returns: - SweBenchExample object - - Raises: - ValueError: If no example found with the given ID - requests.RequestException: If the API request fails - """ - url = "https://datasets-server.huggingface.co/filter" - params = { - "dataset": "princeton-nlp/SWE-bench", - "config": "default", - "split": "dev", - "where": f"instance_id='{instance_id}'", - "offset": 0, - "length": 1, - } - - response = requests.get(url, params=params) - response.raise_for_status() - data = response.json() - - if not data["rows"]: - msg = f"No example found with instance_id: {instance_id}" - raise ValueError(msg) - - row = data["rows"][0]["row"] - return SweBenchExample( - repo=row["repo"], - instance_id=row["instance_id"], - base_commit=row["base_commit"], - patch=row["patch"], - test_patch=row["test_patch"], - problem_statement=row["problem_statement"], - hints_text=row.get("hints_text"), - created_at=row["created_at"], - version=row["version"], - fail_to_pass=row["FAIL_TO_PASS"], - pass_to_pass=row.get("PASS_TO_PASS"), - environment_setup_commit=row.get("environment_setup_commit"), - ) diff --git a/src/codegen/extensions/swebench/agent.py b/src/codegen/extensions/swebench/agent.py deleted file mode 100644 index 06d057d58..000000000 --- a/src/codegen/extensions/swebench/agent.py +++ /dev/null @@ -1,101 +0,0 @@ -from langchain.agents import AgentExecutor -from langchain.agents.openai_functions_agent.base import OpenAIFunctionsAgent -from langchain.hub import pull -from langchain_core.chat_history import InMemoryChatMessageHistory -from langchain_core.messages import BaseMessage -from langchain_core.runnables.history import RunnableWithMessageHistory -from langchain_openai import ChatOpenAI - -from codegen import Codebase -from codegen.extensions.langchain.tools import ( - CommitTool, - CreateFileTool, - DeleteFileTool, - EditFileTool, - GithubCreatePRCommentTool, - GithubCreatePRReviewCommentTool, - GithubCreatePRTool, - GithubViewPRTool, - ListDirectoryTool, - MoveSymbolTool, - RenameFileTool, - SearchTool, - SemanticEditTool, - SemanticSearchTool, - ViewFileTool, -) - -"""Demo implementation of an agent with Codegen tools.""" - - -def create_codebase_agent( - codebase: Codebase, - model_name: str = "gpt-4o", - temperature: float = 0, - verbose: bool = True, - chat_history: list[BaseMessage] = [], -) -> RunnableWithMessageHistory: - """Create an agent with all codebase tools. - - Args: - codebase: The codebase to operate on - model_name: Name of the model to use (default: gpt-4) - temperature: Model temperature (default: 0) - verbose: Whether to print agent's thought process (default: True) - - Returns: - Initialized agent with message history - """ - # Initialize language model - llm = ChatOpenAI( - model_name=model_name, - temperature=temperature, - ) - - # Get all codebase tools - tools = [ - ViewFileTool(codebase), - ListDirectoryTool(codebase), - SearchTool(codebase), - EditFileTool(codebase), - CreateFileTool(codebase), - DeleteFileTool(codebase), - RenameFileTool(codebase), - MoveSymbolTool(codebase), - # RevealSymbolTool(codebase), - SemanticEditTool(codebase), - SemanticSearchTool(codebase), - CommitTool(codebase), - GithubCreatePRTool(codebase), - GithubViewPRTool(codebase), - GithubCreatePRCommentTool(codebase), - GithubCreatePRReviewCommentTool(codebase), - ] - - # Get the prompt to use - prompt = pull("hwchase17/openai-functions-agent") - - # Create the agent - agent = OpenAIFunctionsAgent( - llm=llm, - tools=tools, - prompt=prompt, - ) - - # Create the agent executor - agent_executor = AgentExecutor( - agent=agent, - tools=tools, - verbose=verbose, - ) - - # Create message history handler - message_history = InMemoryChatMessageHistory(messages=chat_history) - - # Wrap with message history - return RunnableWithMessageHistory( - agent_executor, - lambda session_id: message_history, - input_messages_key="input", - history_messages_key="chat_history", - ) diff --git a/src/codegen/extensions/swebench/constants.py b/src/codegen/extensions/swebench/constants.py deleted file mode 100644 index 8c3c4b56c..000000000 --- a/src/codegen/extensions/swebench/constants.py +++ /dev/null @@ -1,5 +0,0 @@ -from pathlib import Path - -PARENT_DIR = Path(__file__).parent - -PREDS_DNAME = PARENT_DIR / "predictions" diff --git a/src/codegen/extensions/swebench/harness.py b/src/codegen/extensions/swebench/harness.py index 59d3a7bb5..7445df7e9 100644 --- a/src/codegen/extensions/swebench/harness.py +++ b/src/codegen/extensions/swebench/harness.py @@ -6,24 +6,22 @@ import random import subprocess import sys +from pathlib import Path import lox from codegen import Codebase - -# coding agent from codegen.agents.code_agent import CodeAgent -from codegen.extensions.langchain.utils import SweBenchExample, get_swe_bench_examples -from codegen.extensions.swebench.constants import PREDS_DNAME - -# Replace the dump import with pprint -# from dump import dump -# from tests import run_tests from codegen.extensions.swebench.utils import ( - get_full_dataset, # noqa: F401 + SweBenchExample, + get_swe_bench_examples, load_predictions, ) +PARENT_DIR = Path(__file__).parent + +PREDS_DNAME = PARENT_DIR / "predictions" + def diff_versus_commit(git_dname, commit): """Take a diff of `git_dname` current contents versus the `commit`.""" @@ -50,7 +48,7 @@ def show_problems(dataset): print(f"{inst}: {problem}") -def process_one_instance(entry: SweBenchExample): +def run_agent_on_entry(entry: SweBenchExample): """Process one `entry` from SWE Bench using the LLM `models` at the given `temperature`. Set `model_name_or_path` in the result json. """ @@ -65,10 +63,6 @@ def process_one_instance(entry: SweBenchExample): gold_files = files_in_patch(entry.patch) - results = [] - cost = 0 - winner = None - codebase = Codebase.from_repo(repo_full_name=entry.repo, commit=base_commit, language="python") # check out the repo agent = CodeAgent(codebase=codebase) @@ -107,30 +101,13 @@ def process_one_instance(entry: SweBenchExample): gold_files=gold_files, edited_files=files_in_patch(model_patch), ) - results.append(result) - - pprint.pprint(result) # Did we get a successful patch? - if model_patch: - winner = result - - # If there's no clear winner, look for the most viable result we got... - if not winner: - msg = "No winner found" + if not model_patch: + msg = "Failed to generate a patch" raise ValueError(msg) - # Avoid circular reference when we save to json - winner = dict(winner) - - winner.update( - dict( - all_results=results, # Record all the results for later analysis - cost=cost, # total cost across all results - ) - ) - - return winner + return result def process_instances(dataset: dict[str, SweBenchExample], threads: int): @@ -168,11 +145,11 @@ def process_instances(dataset: dict[str, SweBenchExample], threads: int): input() if threads > 1: - process_one_instance_lox = lox.process(threads)(process_one_instance) + process_one_instance_lox = lox.process(threads)(run_agent_on_entry) process_one_instance_func = process_one_instance_lox.scatter gather = process_one_instance_lox.gather else: - process_one_instance_func = process_one_instance + process_one_instance_func = run_agent_on_entry for instance_id in remaining_instances: if instance_id in done_instances: @@ -194,16 +171,8 @@ def process_instances(dataset: dict[str, SweBenchExample], threads: int): def main(): # Load the SWE Bench dataset - dataset = {} - for example in get_swe_bench_examples(): - # codegen-sdk currently fails on this repo - if example.repo == "django/django": - continue - dataset[example.instance_id] = example - - threads = 1 - - process_instances(dataset, threads) + dataset = {example.instance_id: example for example in get_swe_bench_examples()} + process_instances(dataset, threads=10) if __name__ == "__main__": diff --git a/src/codegen/extensions/swebench/report.py b/src/codegen/extensions/swebench/report.py index 05e833582..f89a97cef 100755 --- a/src/codegen/extensions/swebench/report.py +++ b/src/codegen/extensions/swebench/report.py @@ -1,29 +1,26 @@ #!/usr/bin/env python import json -import shutil import subprocess import uuid from collections import defaultdict from pathlib import Path -from pprint import pprint from codegen.extensions.swebench.tests import remove_patches_to_tests -from codegen.extensions.swebench.utils import ( - load_predictions, -) +from codegen.extensions.swebench.utils import SWEBenchDataset using_dataset = "lite" LOG_DIR = Path(__file__).parent / "logs" NUM_EVAL_PROCS = 5 -def run_evals(predictions_jsonl, logs_dir: Path): +def run_evals(predictions_jsonl, logs_dir: Path, dataset: SWEBenchDataset): + """Run the evaluations on the predictions on modal.""" run_evals_cmd = f""" python -m swebench.harness.run_evaluation --predictions_path {predictions_jsonl} --run_id {uuid.uuid4()!s} - --dataset_name princeton-nlp/SWE-bench_Lite + --dataset_name {dataset.value} --cache_level instance --report_dir {logs_dir} --modal true @@ -113,55 +110,7 @@ def preds_to_jsonl(predictions, predictions_dir: Path): return predictions_jsonl -def run_evals_on_dname(dname, predictions_dir: Path): - dname = Path(dname) - - predictions = load_predictions([dname], devin_only=(using_dataset == "devin")) - - predictions_jsonl = preds_to_jsonl(predictions) - pprint(predictions_jsonl) - - LOG_DIR.mkdir(exist_ok=True, parents=True) - - any_need_evals = any("resolved" not in pred for pred in predictions.values()) - any_need_evals = True - if any_need_evals: - run_evals(predictions_jsonl) - - model_name_or_path = next(iter(predictions.values()))["model_name_or_path"] - report = get_report(predictions_jsonl) - predictions = update_pred_json(predictions, report, predictions_dir) - - return predictions_jsonl, LOG_DIR - - -def combine_jsonl_logs(predictions, model_name_or_path): - logs = Path("logs") - log_dir = logs / model_name_or_path - - log_dir.mkdir(exist_ok=True) - pprint(log_dir) - - predictions_jsonl = preds_to_jsonl(predictions) - for inst, pred in predictions.items(): - from_fname = logs / pred["dname"] - # dump(from_fname, inst) - from_fname = list(from_fname.glob(f"{inst}.*.log")) - assert len(from_fname) <= 1, from_fname - if not len(from_fname): - print("Missing", pred["dname"], inst) - continue - from_fname = from_fname[0] - # dump(from_fname) - - to_fname = log_dir / f"{inst}.{model_name_or_path}.eval.log" - # dump(from_fname, to_fname) - shutil.copyfile(from_fname, to_fname) - - return predictions_jsonl, log_dir - - -def generate_report(predictions_dir: Path, logs_dir: Path): +def generate_report(predictions_dir: Path, logs_dir: Path, dataset: SWEBenchDataset): # Automatically find all JSON files in predictions/results results_dir = predictions_dir / "results" if not results_dir.exists(): @@ -195,7 +144,7 @@ def generate_report(predictions_dir: Path, logs_dir: Path): print(f"Using log directory: {log_dir}") # Run evaluations - run_evals(predictions_jsonl, logs_dir) + run_evals(predictions_jsonl, logs_dir, dataset) # Get and display report model_name = "results" # or whatever model name you want to use diff --git a/src/codegen/extensions/swebench/tests.py b/src/codegen/extensions/swebench/tests.py index f6338fbc3..9233f0c07 100755 --- a/src/codegen/extensions/swebench/tests.py +++ b/src/codegen/extensions/swebench/tests.py @@ -1,8 +1,5 @@ #!/usr/bin/env python - -from codegen.extensions.swebench.utils import get_dataset, load_predictions # noqa: F401 - # A no-op patch which creates an empty file is used to stand in for # the `model_patch` and/or `test_patch` when running SWE Bench tests # without one or both of those patches. diff --git a/src/codegen/extensions/swebench/utils.py b/src/codegen/extensions/swebench/utils.py index 05419a0bf..91e42c464 100644 --- a/src/codegen/extensions/swebench/utils.py +++ b/src/codegen/extensions/swebench/utils.py @@ -1,64 +1,35 @@ import json -import shutil +from dataclasses import dataclass +from enum import Enum from pathlib import Path from pprint import pprint +from typing import Literal, Optional -from datasets import load_dataset +import requests -FULL_DATASET = "princeton-nlp/SWE-bench" -FULL_DATASET_FNAME = FULL_DATASET.replace("/", "--") + ".json" +class SWEBenchDataset(Enum): + LITE = "princeton-nlp/SWE-bench_Lite" + FULL = "princeton-nlp/SWE-bench" + VERIFIED = "princeton-nlp/SWE-bench-verified" -VERIFIED_DATASET = "princeton-nlp/SWE-bench-verified" -VERIFIED_DATASET_FNAME = VERIFIED_DATASET.replace("/", "--") + ".json" -LITE_DATASET = "princeton-nlp/SWE-bench_Lite" -LITE_DATASET_FNAME = LITE_DATASET.replace("/", "--") + ".json" +@dataclass +class SweBenchExample: + """A single example from the SWE-bench dataset.""" - -def dump_dataset(dataset, fname): - """Save the dataset to json.""" - entries = list(dataset) - for entry in entries: - entry["FAIL_TO_PASS"] = json.loads(entry["FAIL_TO_PASS"]) - entry["PASS_TO_PASS"] = json.loads(entry["PASS_TO_PASS"]) - - with open(fname, "w") as f: - json.dump(entries, f, indent=4) - - -def get_full_dataset(): - return get_dataset(FULL_DATASET, FULL_DATASET_FNAME) - - -def get_lite_dataset(): - return get_dataset(LITE_DATASET, LITE_DATASET_FNAME) - - -def get_verified_dataset(): - return get_dataset(VERIFIED_DATASET, VERIFIED_DATASET_FNAME) - - -def get_dataset(dataset, fname): - """Load the `DATASET` from hugging face, and turn it into a dict - keyed on `instance_id`. - Cache the dict locally in a json file. - """ - fname = Path(fname) - if fname.exists(): - dataset = json.loads(fname.read_text()) - else: - pprint(dataset) - dataset = load_dataset(dataset) - dataset = dataset["test"] - dump_dataset(dataset, fname) - pprint(dataset) - - res = dict() - for entry in dataset: - res[entry["instance_id"]] = entry - - return res + repo: str + instance_id: str + base_commit: str + patch: str + test_patch: str + problem_statement: str + hints_text: Optional[str] + created_at: str + version: str + fail_to_pass: str + pass_to_pass: Optional[str] + environment_setup_commit: Optional[str] def load_predictions(paths): @@ -93,87 +64,93 @@ def load_predictions(paths): return predictions -def is_plausible(pred): - attrs = "model_patch edit_outcome lint_outcome test_outcome".split() - for attr in attrs: - if not pred.get(attr): - return - return True - - -def get_plausible(preds): - return set(inst for inst, pred in preds.items() if is_plausible(pred)) +def get_swe_bench_examples(dataset: SWEBenchDataset = SWEBenchDataset.LITE, split: Literal["train", "dev", "test"] = "test", offset: int = 0, length: int = 100) -> list[SweBenchExample]: + """Fetch examples from the SWE-bench dataset. + Returns: + List of SweBenchExample objects -def check_criteria(pred, criteria): - attrs = criteria.split() - for attr in attrs: - if not pred[attr]: - return False - return True - - -def pick_winner(results): - """Given that we didn't obtain a result with all good outcomes, - try a series of weaker outcome sets to find the strongest result. + Raises: + requests.RequestException: If the API request fails + """ + url = "https://datasets-server.huggingface.co/rows" + params = { + "dataset": dataset.value, + "config": "default", + "split": split, + "offset": offset, + "length": length, + } + + response = requests.get(url, params=params) + response.raise_for_status() + data = response.json() + + examples = [] + for row in data["rows"]: + example = SweBenchExample( + repo=row["row"]["repo"], + instance_id=row["row"]["instance_id"], + base_commit=row["row"]["base_commit"], + patch=row["row"]["patch"], + test_patch=row["row"]["test_patch"], + problem_statement=row["row"]["problem_statement"], + hints_text=row["row"].get("hints_text"), + created_at=row["row"]["created_at"], + version=row["row"]["version"], + fail_to_pass=row["row"]["FAIL_TO_PASS"], + pass_to_pass=row["row"].get("PASS_TO_PASS"), + environment_setup_commit=row["row"].get("environment_setup_commit"), + ) + examples.append(example) + + return examples + + +def get_swe_bench_example( + instance_id: str, + dataset: SWEBenchDataset = SWEBenchDataset.LITE, +) -> SweBenchExample: + """Fetch a single example from the SWE-bench dataset by its instance ID. + + Args: + instance_id: The unique identifier of the example to fetch + + Returns: + SweBenchExample object + + Raises: + ValueError: If no example found with the given ID + requests.RequestException: If the API request fails """ - priority = ( - "model_patch edit_outcome lint_outcome test_outcome", # all good! - "model_patch edit_outcome lint_outcome", # all good but test_outcome - "model_patch lint_outcome", # a patch that lints? - "model_patch edit_outcome", # a patch that had no edit errors? - "model_patch", # anything with an actual patch! + url = "https://datasets-server.huggingface.co/filter" + params = { + "dataset": dataset.value, + "config": "default", + "split": "dev", + "where": f"instance_id='{instance_id}'", + } + + response = requests.get(url, params=params) + response.raise_for_status() + data = response.json() + + if not data["rows"]: + msg = f"No example found with instance_id: {instance_id}" + raise ValueError(msg) + + row = data["rows"][0]["row"] + return SweBenchExample( + repo=row["repo"], + instance_id=row["instance_id"], + base_commit=row["base_commit"], + patch=row["patch"], + test_patch=row["test_patch"], + problem_statement=row["problem_statement"], + hints_text=row.get("hints_text"), + created_at=row["created_at"], + version=row["version"], + fail_to_pass=row["FAIL_TO_PASS"], + pass_to_pass=row.get("PASS_TO_PASS"), + environment_setup_commit=row.get("environment_setup_commit"), ) - - # choose the best result available - for criteria in priority: - for res in results: - if check_criteria(res, criteria): - return res - - # choose the first result as a last resort - if results: - return results[0] - - -def choose_pred(inst, all_preds, dnames): - results = [] - for i in range(len(all_preds)): - preds = all_preds[i] - dname = dnames[i] - - if inst not in preds: - continue - pred = dict(preds[inst]) - pred["dname"] = Path(dname).name - results.append(pred) - - return pick_winner(results) - - -def choose_predictions(dnames, model_name_or_path=None, copy_md=False, devin_only=False): - all_preds = [load_predictions([dname], devin_only=devin_only) for dname in dnames] - all_instances = set() - for preds in all_preds: - all_instances.update(preds.keys()) - - chosen = dict() - for inst in all_instances: - res = choose_pred(inst, all_preds, dnames) - chosen[inst] = res - - if copy_md: - pred_dname = Path("predictions") - md_fname = pred_dname / res["dname"] / (inst + ".md") - assert md_fname.exists(), md_fname - new_md_fname = pred_dname / model_name_or_path / (inst + ".md") - shutil.copyfile(md_fname, new_md_fname) - - for inst in chosen: - pred = dict(chosen[inst]) - pred["model_name_or_path"] = model_name_or_path - chosen[inst] = pred - - pprint(len(chosen)) - pprint(chosen) - return chosen diff --git a/uv.lock b/uv.lock index db5f6f420..bf83931ec 100644 --- a/uv.lock +++ b/uv.lock @@ -545,7 +545,6 @@ dependencies = [ { name = "codeowners" }, { name = "dataclasses-json" }, { name = "datamodel-code-generator" }, - { name = "datasets" }, { name = "dicttoxml" }, { name = "docstring-parser" }, { name = "fastapi", extra = ["standard"] }, @@ -667,7 +666,6 @@ requires-dist = [ { name = "codeowners", specifier = ">=0.6.0,<1.0.0" }, { name = "dataclasses-json", specifier = ">=0.6.4,<1.0.0" }, { name = "datamodel-code-generator", specifier = ">=0.26.5" }, - { name = "datasets" }, { name = "dicttoxml", specifier = ">=1.7.16,<2.0.0" }, { name = "docstring-parser", specifier = ">=0.16,<1.0" }, { name = "fastapi", extras = ["standard"], specifier = ">=0.115.2,<1.0.0" }, @@ -940,31 +938,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/c8/17/2876ca0a4ac7dd7cb5f56a2f0f6d9ac910969f467e8142c847c45a76b897/datamodel_code_generator-0.28.1-py3-none-any.whl", hash = "sha256:1ff8a56f9550a82bcba3e1ad7ebdb89bc655eeabbc4bc6acfb05977cbdc6381c", size = 115601 }, ] -[[package]] -name = "datasets" -version = "3.3.2" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "aiohttp" }, - { name = "dill" }, - { name = "filelock" }, - { name = "fsspec", extra = ["http"] }, - { name = "huggingface-hub" }, - { name = "multiprocess" }, - { name = "numpy" }, - { name = "packaging" }, - { name = "pandas" }, - { name = "pyarrow" }, - { name = "pyyaml" }, - { name = "requests" }, - { name = "tqdm" }, - { name = "xxhash" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/73/0c/dc3d172104e78e68f7a60386664adbf61db5d10c2246b31ddad06c2d1cb3/datasets-3.3.2.tar.gz", hash = "sha256:20901a97da870fb80b407ccc45f034a7ac99accd07da897ed42f11641bdb8c6e", size = 564352 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/4c/37/22ef7675bef4ffe9577b937ddca2e22791534cbbe11c30714972a91532dc/datasets-3.3.2-py3-none-any.whl", hash = "sha256:fdaf3d5d70242621210b044e9b9b15a56e908bfc3e9d077bcf5605ac390f70bd", size = 485360 }, -] - [[package]] name = "debugpy" version = "1.8.12" @@ -1285,20 +1258,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/c6/c8/a5be5b7550c10858fcf9b0ea054baccab474da77d37f1e828ce043a3a5d4/frozenlist-1.5.0-py3-none-any.whl", hash = "sha256:d994863bba198a4a518b467bb971c56e1db3f180a25c6cf7bb1949c267f748c3", size = 11901 }, ] -[[package]] -name = "fsspec" -version = "2024.12.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/ee/11/de70dee31455c546fbc88301971ec03c328f3d1138cfba14263f651e9551/fsspec-2024.12.0.tar.gz", hash = "sha256:670700c977ed2fb51e0d9f9253177ed20cbde4a3e5c0283cc5385b5870c8533f", size = 291600 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/de/86/5486b0188d08aa643e127774a99bac51ffa6cf343e3deb0583956dca5b22/fsspec-2024.12.0-py3-none-any.whl", hash = "sha256:b520aed47ad9804237ff878b504267a3b0b441e97508bd6d2d8774e3db85cee2", size = 183862 }, -] - -[package.optional-dependencies] -http = [ - { name = "aiohttp" }, -] - [[package]] name = "genson" version = "1.3.0" @@ -1502,24 +1461,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/e1/9b/a181f281f65d776426002f330c31849b86b31fc9d848db62e16f03ff739f/httpx_sse-0.4.0-py3-none-any.whl", hash = "sha256:f329af6eae57eaa2bdfd962b42524764af68075ea87370a2de920af5341e318f", size = 7819 }, ] -[[package]] -name = "huggingface-hub" -version = "0.29.1" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "filelock" }, - { name = "fsspec" }, - { name = "packaging" }, - { name = "pyyaml" }, - { name = "requests" }, - { name = "tqdm" }, - { name = "typing-extensions" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/22/37/797d6476f13e5ef6af5fc48a5d641d32b39c37e166ccf40c3714c5854a85/huggingface_hub-0.29.1.tar.gz", hash = "sha256:9524eae42077b8ff4fc459ceb7a514eca1c1232b775276b009709fe2a084f250", size = 389776 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/ae/05/75b90de9093de0aadafc868bb2fa7c57651fd8f45384adf39bd77f63980d/huggingface_hub-0.29.1-py3-none-any.whl", hash = "sha256:352f69caf16566c7b6de84b54a822f6238e17ddd8ae3da4f8f2272aea5b198d5", size = 468049 }, -] - [[package]] name = "humanize" version = "4.12.1" @@ -2649,40 +2590,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/88/ef/eb23f262cca3c0c4eb7ab1933c3b1f03d021f2c48f54763065b6f0e321be/packaging-24.2-py3-none-any.whl", hash = "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759", size = 65451 }, ] -[[package]] -name = "pandas" -version = "2.2.3" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "numpy" }, - { name = "python-dateutil" }, - { name = "pytz" }, - { name = "tzdata" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/9c/d6/9f8431bacc2e19dca897724cd097b1bb224a6ad5433784a44b587c7c13af/pandas-2.2.3.tar.gz", hash = "sha256:4f18ba62b61d7e192368b84517265a99b4d7ee8912f8708660fb4a366cc82667", size = 4399213 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/17/a3/fb2734118db0af37ea7433f57f722c0a56687e14b14690edff0cdb4b7e58/pandas-2.2.3-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:b1d432e8d08679a40e2a6d8b2f9770a5c21793a6f9f47fdd52c5ce1948a5a8a9", size = 12529893 }, - { url = "https://files.pythonhosted.org/packages/e1/0c/ad295fd74bfac85358fd579e271cded3ac969de81f62dd0142c426b9da91/pandas-2.2.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a5a1595fe639f5988ba6a8e5bc9649af3baf26df3998a0abe56c02609392e0a4", size = 11363475 }, - { url = "https://files.pythonhosted.org/packages/c6/2a/4bba3f03f7d07207481fed47f5b35f556c7441acddc368ec43d6643c5777/pandas-2.2.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:5de54125a92bb4d1c051c0659e6fcb75256bf799a732a87184e5ea503965bce3", size = 15188645 }, - { url = "https://files.pythonhosted.org/packages/38/f8/d8fddee9ed0d0c0f4a2132c1dfcf0e3e53265055da8df952a53e7eaf178c/pandas-2.2.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fffb8ae78d8af97f849404f21411c95062db1496aeb3e56f146f0355c9989319", size = 12739445 }, - { url = "https://files.pythonhosted.org/packages/20/e8/45a05d9c39d2cea61ab175dbe6a2de1d05b679e8de2011da4ee190d7e748/pandas-2.2.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:6dfcb5ee8d4d50c06a51c2fffa6cff6272098ad6540aed1a76d15fb9318194d8", size = 16359235 }, - { url = "https://files.pythonhosted.org/packages/1d/99/617d07a6a5e429ff90c90da64d428516605a1ec7d7bea494235e1c3882de/pandas-2.2.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:062309c1b9ea12a50e8ce661145c6aab431b1e99530d3cd60640e255778bd43a", size = 14056756 }, - { url = "https://files.pythonhosted.org/packages/29/d4/1244ab8edf173a10fd601f7e13b9566c1b525c4f365d6bee918e68381889/pandas-2.2.3-cp312-cp312-win_amd64.whl", hash = "sha256:59ef3764d0fe818125a5097d2ae867ca3fa64df032331b7e0917cf5d7bf66b13", size = 11504248 }, - { url = "https://files.pythonhosted.org/packages/64/22/3b8f4e0ed70644e85cfdcd57454686b9057c6c38d2f74fe4b8bc2527214a/pandas-2.2.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f00d1345d84d8c86a63e476bb4955e46458b304b9575dcf71102b5c705320015", size = 12477643 }, - { url = "https://files.pythonhosted.org/packages/e4/93/b3f5d1838500e22c8d793625da672f3eec046b1a99257666c94446969282/pandas-2.2.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:3508d914817e153ad359d7e069d752cdd736a247c322d932eb89e6bc84217f28", size = 11281573 }, - { url = "https://files.pythonhosted.org/packages/f5/94/6c79b07f0e5aab1dcfa35a75f4817f5c4f677931d4234afcd75f0e6a66ca/pandas-2.2.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:22a9d949bfc9a502d320aa04e5d02feab689d61da4e7764b62c30b991c42c5f0", size = 15196085 }, - { url = "https://files.pythonhosted.org/packages/e8/31/aa8da88ca0eadbabd0a639788a6da13bb2ff6edbbb9f29aa786450a30a91/pandas-2.2.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f3a255b2c19987fbbe62a9dfd6cff7ff2aa9ccab3fc75218fd4b7530f01efa24", size = 12711809 }, - { url = "https://files.pythonhosted.org/packages/ee/7c/c6dbdb0cb2a4344cacfb8de1c5808ca885b2e4dcfde8008266608f9372af/pandas-2.2.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:800250ecdadb6d9c78eae4990da62743b857b470883fa27f652db8bdde7f6659", size = 16356316 }, - { url = "https://files.pythonhosted.org/packages/57/b7/8b757e7d92023b832869fa8881a992696a0bfe2e26f72c9ae9f255988d42/pandas-2.2.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:6374c452ff3ec675a8f46fd9ab25c4ad0ba590b71cf0656f8b6daa5202bca3fb", size = 14022055 }, - { url = "https://files.pythonhosted.org/packages/3b/bc/4b18e2b8c002572c5a441a64826252ce5da2aa738855747247a971988043/pandas-2.2.3-cp313-cp313-win_amd64.whl", hash = "sha256:61c5ad4043f791b61dd4752191d9f07f0ae412515d59ba8f005832a532f8736d", size = 11481175 }, - { url = "https://files.pythonhosted.org/packages/76/a3/a5d88146815e972d40d19247b2c162e88213ef51c7c25993942c39dbf41d/pandas-2.2.3-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:3b71f27954685ee685317063bf13c7709a7ba74fc996b84fc6821c59b0f06468", size = 12615650 }, - { url = "https://files.pythonhosted.org/packages/9c/8c/f0fd18f6140ddafc0c24122c8a964e48294acc579d47def376fef12bcb4a/pandas-2.2.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:38cf8125c40dae9d5acc10fa66af8ea6fdf760b2714ee482ca691fc66e6fcb18", size = 11290177 }, - { url = "https://files.pythonhosted.org/packages/ed/f9/e995754eab9c0f14c6777401f7eece0943840b7a9fc932221c19d1abee9f/pandas-2.2.3-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:ba96630bc17c875161df3818780af30e43be9b166ce51c9a18c1feae342906c2", size = 14651526 }, - { url = "https://files.pythonhosted.org/packages/25/b0/98d6ae2e1abac4f35230aa756005e8654649d305df9a28b16b9ae4353bff/pandas-2.2.3-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1db71525a1538b30142094edb9adc10be3f3e176748cd7acc2240c2f2e5aa3a4", size = 11871013 }, - { url = "https://files.pythonhosted.org/packages/cc/57/0f72a10f9db6a4628744c8e8f0df4e6e21de01212c7c981d31e50ffc8328/pandas-2.2.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:15c0e1e02e93116177d29ff83e8b1619c93ddc9c49083f237d4312337a61165d", size = 15711620 }, - { url = "https://files.pythonhosted.org/packages/ab/5f/b38085618b950b79d2d9164a711c52b10aefc0ae6833b96f626b7021b2ed/pandas-2.2.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:ad5b65698ab28ed8d7f18790a0dc58005c7629f227be9ecc1072aa74c0c1d43a", size = 13098436 }, -] - [[package]] name = "pandocfilters" version = "1.5.1" @@ -2937,34 +2844,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/e0/a9/023730ba63db1e494a271cb018dcd361bd2c917ba7004c3e49d5daf795a2/py_cpuinfo-9.0.0-py3-none-any.whl", hash = "sha256:859625bc251f64e21f077d099d4162689c762b5d6a4c3c97553d56241c9674d5", size = 22335 }, ] -[[package]] -name = "pyarrow" -version = "19.0.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/7f/09/a9046344212690f0632b9c709f9bf18506522feb333c894d0de81d62341a/pyarrow-19.0.1.tar.gz", hash = "sha256:3bf266b485df66a400f282ac0b6d1b500b9d2ae73314a153dbe97d6d5cc8a99e", size = 1129437 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/78/b4/94e828704b050e723f67d67c3535cf7076c7432cd4cf046e4bb3b96a9c9d/pyarrow-19.0.1-cp312-cp312-macosx_12_0_arm64.whl", hash = "sha256:80b2ad2b193e7d19e81008a96e313fbd53157945c7be9ac65f44f8937a55427b", size = 30670749 }, - { url = "https://files.pythonhosted.org/packages/7e/3b/4692965e04bb1df55e2c314c4296f1eb12b4f3052d4cf43d29e076aedf66/pyarrow-19.0.1-cp312-cp312-macosx_12_0_x86_64.whl", hash = "sha256:ee8dec072569f43835932a3b10c55973593abc00936c202707a4ad06af7cb294", size = 32128007 }, - { url = "https://files.pythonhosted.org/packages/22/f7/2239af706252c6582a5635c35caa17cb4d401cd74a87821ef702e3888957/pyarrow-19.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4d5d1ec7ec5324b98887bdc006f4d2ce534e10e60f7ad995e7875ffa0ff9cb14", size = 41144566 }, - { url = "https://files.pythonhosted.org/packages/fb/e3/c9661b2b2849cfefddd9fd65b64e093594b231b472de08ff658f76c732b2/pyarrow-19.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f3ad4c0eb4e2a9aeb990af6c09e6fa0b195c8c0e7b272ecc8d4d2b6574809d34", size = 42202991 }, - { url = "https://files.pythonhosted.org/packages/fe/4f/a2c0ed309167ef436674782dfee4a124570ba64299c551e38d3fdaf0a17b/pyarrow-19.0.1-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:d383591f3dcbe545f6cc62daaef9c7cdfe0dff0fb9e1c8121101cabe9098cfa6", size = 40507986 }, - { url = "https://files.pythonhosted.org/packages/27/2e/29bb28a7102a6f71026a9d70d1d61df926887e36ec797f2e6acfd2dd3867/pyarrow-19.0.1-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:b4c4156a625f1e35d6c0b2132635a237708944eb41df5fbe7d50f20d20c17832", size = 42087026 }, - { url = "https://files.pythonhosted.org/packages/16/33/2a67c0f783251106aeeee516f4806161e7b481f7d744d0d643d2f30230a5/pyarrow-19.0.1-cp312-cp312-win_amd64.whl", hash = "sha256:5bd1618ae5e5476b7654c7b55a6364ae87686d4724538c24185bbb2952679960", size = 25250108 }, - { url = "https://files.pythonhosted.org/packages/2b/8d/275c58d4b00781bd36579501a259eacc5c6dfb369be4ddeb672ceb551d2d/pyarrow-19.0.1-cp313-cp313-macosx_12_0_arm64.whl", hash = "sha256:e45274b20e524ae5c39d7fc1ca2aa923aab494776d2d4b316b49ec7572ca324c", size = 30653552 }, - { url = "https://files.pythonhosted.org/packages/a0/9e/e6aca5cc4ef0c7aec5f8db93feb0bde08dbad8c56b9014216205d271101b/pyarrow-19.0.1-cp313-cp313-macosx_12_0_x86_64.whl", hash = "sha256:d9dedeaf19097a143ed6da37f04f4051aba353c95ef507764d344229b2b740ae", size = 32103413 }, - { url = "https://files.pythonhosted.org/packages/6a/fa/a7033f66e5d4f1308c7eb0dfcd2ccd70f881724eb6fd1776657fdf65458f/pyarrow-19.0.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6ebfb5171bb5f4a52319344ebbbecc731af3f021e49318c74f33d520d31ae0c4", size = 41134869 }, - { url = "https://files.pythonhosted.org/packages/2d/92/34d2569be8e7abdc9d145c98dc410db0071ac579b92ebc30da35f500d630/pyarrow-19.0.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f2a21d39fbdb948857f67eacb5bbaaf36802de044ec36fbef7a1c8f0dd3a4ab2", size = 42192626 }, - { url = "https://files.pythonhosted.org/packages/0a/1f/80c617b1084fc833804dc3309aa9d8daacd46f9ec8d736df733f15aebe2c/pyarrow-19.0.1-cp313-cp313-manylinux_2_28_aarch64.whl", hash = "sha256:99bc1bec6d234359743b01e70d4310d0ab240c3d6b0da7e2a93663b0158616f6", size = 40496708 }, - { url = "https://files.pythonhosted.org/packages/e6/90/83698fcecf939a611c8d9a78e38e7fed7792dcc4317e29e72cf8135526fb/pyarrow-19.0.1-cp313-cp313-manylinux_2_28_x86_64.whl", hash = "sha256:1b93ef2c93e77c442c979b0d596af45e4665d8b96da598db145b0fec014b9136", size = 42075728 }, - { url = "https://files.pythonhosted.org/packages/40/49/2325f5c9e7a1c125c01ba0c509d400b152c972a47958768e4e35e04d13d8/pyarrow-19.0.1-cp313-cp313-win_amd64.whl", hash = "sha256:d9d46e06846a41ba906ab25302cf0fd522f81aa2a85a71021826f34639ad31ef", size = 25242568 }, - { url = "https://files.pythonhosted.org/packages/3f/72/135088d995a759d4d916ec4824cb19e066585b4909ebad4ab196177aa825/pyarrow-19.0.1-cp313-cp313t-macosx_12_0_arm64.whl", hash = "sha256:c0fe3dbbf054a00d1f162fda94ce236a899ca01123a798c561ba307ca38af5f0", size = 30702371 }, - { url = "https://files.pythonhosted.org/packages/2e/01/00beeebd33d6bac701f20816a29d2018eba463616bbc07397fdf99ac4ce3/pyarrow-19.0.1-cp313-cp313t-macosx_12_0_x86_64.whl", hash = "sha256:96606c3ba57944d128e8a8399da4812f56c7f61de8c647e3470b417f795d0ef9", size = 32116046 }, - { url = "https://files.pythonhosted.org/packages/1f/c9/23b1ea718dfe967cbd986d16cf2a31fe59d015874258baae16d7ea0ccabc/pyarrow-19.0.1-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8f04d49a6b64cf24719c080b3c2029a3a5b16417fd5fd7c4041f94233af732f3", size = 41091183 }, - { url = "https://files.pythonhosted.org/packages/3a/d4/b4a3aa781a2c715520aa8ab4fe2e7fa49d33a1d4e71c8fc6ab7b5de7a3f8/pyarrow-19.0.1-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5a9137cf7e1640dce4c190551ee69d478f7121b5c6f323553b319cac936395f6", size = 42171896 }, - { url = "https://files.pythonhosted.org/packages/23/1b/716d4cd5a3cbc387c6e6745d2704c4b46654ba2668260d25c402626c5ddb/pyarrow-19.0.1-cp313-cp313t-manylinux_2_28_aarch64.whl", hash = "sha256:7c1bca1897c28013db5e4c83944a2ab53231f541b9e0c3f4791206d0c0de389a", size = 40464851 }, - { url = "https://files.pythonhosted.org/packages/ed/bd/54907846383dcc7ee28772d7e646f6c34276a17da740002a5cefe90f04f7/pyarrow-19.0.1-cp313-cp313t-manylinux_2_28_x86_64.whl", hash = "sha256:58d9397b2e273ef76264b45531e9d552d8ec8a6688b7390b5be44c02a37aade8", size = 42085744 }, -] - [[package]] name = "pycparser" version = "2.22" @@ -4546,15 +4425,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/65/f3/107a22063bf27bdccf2024833d3445f4eea42b2e598abfbd46f6a63b6cb0/typing_inspect-0.9.0-py3-none-any.whl", hash = "sha256:9ee6fc59062311ef8547596ab6b955e1b8aa46242d854bfc78f4f6b0eff35f9f", size = 8827 }, ] -[[package]] -name = "tzdata" -version = "2025.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/43/0f/fa4723f22942480be4ca9527bbde8d43f6c3f2fe8412f00e7f5f6746bc8b/tzdata-2025.1.tar.gz", hash = "sha256:24894909e88cdb28bd1636c6887801df64cb485bd593f2fd83ef29075a81d694", size = 194950 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/0f/dd/84f10e23edd882c6f968c21c2434fe67bd4a528967067515feca9e611e5e/tzdata-2025.1-py2.py3-none-any.whl", hash = "sha256:7e127113816800496f027041c570f50bcd464a020098a3b6b199517772303639", size = 346762 }, -] - [[package]] name = "unidiff" version = "0.7.5" @@ -4828,44 +4698,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/d6/45/fc303eb433e8a2a271739c98e953728422fa61a3c1f36077a49e395c972e/xmltodict-0.14.2-py2.py3-none-any.whl", hash = "sha256:20cc7d723ed729276e808f26fb6b3599f786cbc37e06c65e192ba77c40f20aac", size = 9981 }, ] -[[package]] -name = "xxhash" -version = "3.5.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/00/5e/d6e5258d69df8b4ed8c83b6664f2b47d30d2dec551a29ad72a6c69eafd31/xxhash-3.5.0.tar.gz", hash = "sha256:84f2caddf951c9cbf8dc2e22a89d4ccf5d86391ac6418fe81e3c67d0cf60b45f", size = 84241 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/07/0e/1bfce2502c57d7e2e787600b31c83535af83746885aa1a5f153d8c8059d6/xxhash-3.5.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:14470ace8bd3b5d51318782cd94e6f94431974f16cb3b8dc15d52f3b69df8e00", size = 31969 }, - { url = "https://files.pythonhosted.org/packages/3f/d6/8ca450d6fe5b71ce521b4e5db69622383d039e2b253e9b2f24f93265b52c/xxhash-3.5.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:59aa1203de1cb96dbeab595ded0ad0c0056bb2245ae11fac11c0ceea861382b9", size = 30787 }, - { url = "https://files.pythonhosted.org/packages/5b/84/de7c89bc6ef63d750159086a6ada6416cc4349eab23f76ab870407178b93/xxhash-3.5.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:08424f6648526076e28fae6ea2806c0a7d504b9ef05ae61d196d571e5c879c84", size = 220959 }, - { url = "https://files.pythonhosted.org/packages/fe/86/51258d3e8a8545ff26468c977101964c14d56a8a37f5835bc0082426c672/xxhash-3.5.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:61a1ff00674879725b194695e17f23d3248998b843eb5e933007ca743310f793", size = 200006 }, - { url = "https://files.pythonhosted.org/packages/02/0a/96973bd325412feccf23cf3680fd2246aebf4b789122f938d5557c54a6b2/xxhash-3.5.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f2f2c61bee5844d41c3eb015ac652a0229e901074951ae48581d58bfb2ba01be", size = 428326 }, - { url = "https://files.pythonhosted.org/packages/11/a7/81dba5010f7e733de88af9555725146fc133be97ce36533867f4c7e75066/xxhash-3.5.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9d32a592cac88d18cc09a89172e1c32d7f2a6e516c3dfde1b9adb90ab5df54a6", size = 194380 }, - { url = "https://files.pythonhosted.org/packages/fb/7d/f29006ab398a173f4501c0e4977ba288f1c621d878ec217b4ff516810c04/xxhash-3.5.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:70dabf941dede727cca579e8c205e61121afc9b28516752fd65724be1355cc90", size = 207934 }, - { url = "https://files.pythonhosted.org/packages/8a/6e/6e88b8f24612510e73d4d70d9b0c7dff62a2e78451b9f0d042a5462c8d03/xxhash-3.5.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:e5d0ddaca65ecca9c10dcf01730165fd858533d0be84c75c327487c37a906a27", size = 216301 }, - { url = "https://files.pythonhosted.org/packages/af/51/7862f4fa4b75a25c3b4163c8a873f070532fe5f2d3f9b3fc869c8337a398/xxhash-3.5.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:3e5b5e16c5a480fe5f59f56c30abdeba09ffd75da8d13f6b9b6fd224d0b4d0a2", size = 203351 }, - { url = "https://files.pythonhosted.org/packages/22/61/8d6a40f288f791cf79ed5bb113159abf0c81d6efb86e734334f698eb4c59/xxhash-3.5.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:149b7914451eb154b3dfaa721315117ea1dac2cc55a01bfbd4df7c68c5dd683d", size = 210294 }, - { url = "https://files.pythonhosted.org/packages/17/02/215c4698955762d45a8158117190261b2dbefe9ae7e5b906768c09d8bc74/xxhash-3.5.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:eade977f5c96c677035ff39c56ac74d851b1cca7d607ab3d8f23c6b859379cab", size = 414674 }, - { url = "https://files.pythonhosted.org/packages/31/5c/b7a8db8a3237cff3d535261325d95de509f6a8ae439a5a7a4ffcff478189/xxhash-3.5.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:fa9f547bd98f5553d03160967866a71056a60960be00356a15ecc44efb40ba8e", size = 192022 }, - { url = "https://files.pythonhosted.org/packages/78/e3/dd76659b2811b3fd06892a8beb850e1996b63e9235af5a86ea348f053e9e/xxhash-3.5.0-cp312-cp312-win32.whl", hash = "sha256:f7b58d1fd3551b8c80a971199543379be1cee3d0d409e1f6d8b01c1a2eebf1f8", size = 30170 }, - { url = "https://files.pythonhosted.org/packages/d9/6b/1c443fe6cfeb4ad1dcf231cdec96eb94fb43d6498b4469ed8b51f8b59a37/xxhash-3.5.0-cp312-cp312-win_amd64.whl", hash = "sha256:fa0cafd3a2af231b4e113fba24a65d7922af91aeb23774a8b78228e6cd785e3e", size = 30040 }, - { url = "https://files.pythonhosted.org/packages/0f/eb/04405305f290173acc0350eba6d2f1a794b57925df0398861a20fbafa415/xxhash-3.5.0-cp312-cp312-win_arm64.whl", hash = "sha256:586886c7e89cb9828bcd8a5686b12e161368e0064d040e225e72607b43858ba2", size = 26796 }, - { url = "https://files.pythonhosted.org/packages/c9/b8/e4b3ad92d249be5c83fa72916c9091b0965cb0faeff05d9a0a3870ae6bff/xxhash-3.5.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:37889a0d13b0b7d739cfc128b1c902f04e32de17b33d74b637ad42f1c55101f6", size = 31795 }, - { url = "https://files.pythonhosted.org/packages/fc/d8/b3627a0aebfbfa4c12a41e22af3742cf08c8ea84f5cc3367b5de2d039cce/xxhash-3.5.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:97a662338797c660178e682f3bc180277b9569a59abfb5925e8620fba00b9fc5", size = 30792 }, - { url = "https://files.pythonhosted.org/packages/c3/cc/762312960691da989c7cd0545cb120ba2a4148741c6ba458aa723c00a3f8/xxhash-3.5.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7f85e0108d51092bdda90672476c7d909c04ada6923c14ff9d913c4f7dc8a3bc", size = 220950 }, - { url = "https://files.pythonhosted.org/packages/fe/e9/cc266f1042c3c13750e86a535496b58beb12bf8c50a915c336136f6168dc/xxhash-3.5.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cd2fd827b0ba763ac919440042302315c564fdb797294d86e8cdd4578e3bc7f3", size = 199980 }, - { url = "https://files.pythonhosted.org/packages/bf/85/a836cd0dc5cc20376de26b346858d0ac9656f8f730998ca4324921a010b9/xxhash-3.5.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:82085c2abec437abebf457c1d12fccb30cc8b3774a0814872511f0f0562c768c", size = 428324 }, - { url = "https://files.pythonhosted.org/packages/b4/0e/15c243775342ce840b9ba34aceace06a1148fa1630cd8ca269e3223987f5/xxhash-3.5.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:07fda5de378626e502b42b311b049848c2ef38784d0d67b6f30bb5008642f8eb", size = 194370 }, - { url = "https://files.pythonhosted.org/packages/87/a1/b028bb02636dfdc190da01951d0703b3d904301ed0ef6094d948983bef0e/xxhash-3.5.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c279f0d2b34ef15f922b77966640ade58b4ccdfef1c4d94b20f2a364617a493f", size = 207911 }, - { url = "https://files.pythonhosted.org/packages/80/d5/73c73b03fc0ac73dacf069fdf6036c9abad82de0a47549e9912c955ab449/xxhash-3.5.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:89e66ceed67b213dec5a773e2f7a9e8c58f64daeb38c7859d8815d2c89f39ad7", size = 216352 }, - { url = "https://files.pythonhosted.org/packages/b6/2a/5043dba5ddbe35b4fe6ea0a111280ad9c3d4ba477dd0f2d1fe1129bda9d0/xxhash-3.5.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:bcd51708a633410737111e998ceb3b45d3dbc98c0931f743d9bb0a209033a326", size = 203410 }, - { url = "https://files.pythonhosted.org/packages/a2/b2/9a8ded888b7b190aed75b484eb5c853ddd48aa2896e7b59bbfbce442f0a1/xxhash-3.5.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:3ff2c0a34eae7df88c868be53a8dd56fbdf592109e21d4bfa092a27b0bf4a7bf", size = 210322 }, - { url = "https://files.pythonhosted.org/packages/98/62/440083fafbc917bf3e4b67c2ade621920dd905517e85631c10aac955c1d2/xxhash-3.5.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:4e28503dccc7d32e0b9817aa0cbfc1f45f563b2c995b7a66c4c8a0d232e840c7", size = 414725 }, - { url = "https://files.pythonhosted.org/packages/75/db/009206f7076ad60a517e016bb0058381d96a007ce3f79fa91d3010f49cc2/xxhash-3.5.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:a6c50017518329ed65a9e4829154626f008916d36295b6a3ba336e2458824c8c", size = 192070 }, - { url = "https://files.pythonhosted.org/packages/1f/6d/c61e0668943a034abc3a569cdc5aeae37d686d9da7e39cf2ed621d533e36/xxhash-3.5.0-cp313-cp313-win32.whl", hash = "sha256:53a068fe70301ec30d868ece566ac90d873e3bb059cf83c32e76012c889b8637", size = 30172 }, - { url = "https://files.pythonhosted.org/packages/96/14/8416dce965f35e3d24722cdf79361ae154fa23e2ab730e5323aa98d7919e/xxhash-3.5.0-cp313-cp313-win_amd64.whl", hash = "sha256:80babcc30e7a1a484eab952d76a4f4673ff601f54d5142c26826502740e70b43", size = 30041 }, - { url = "https://files.pythonhosted.org/packages/27/ee/518b72faa2073f5aa8e3262408d284892cb79cf2754ba0c3a5870645ef73/xxhash-3.5.0-cp313-cp313-win_arm64.whl", hash = "sha256:4811336f1ce11cac89dcbd18f3a25c527c16311709a89313c3acaf771def2d4b", size = 26801 }, -] - [[package]] name = "yarl" version = "1.18.3" From 69b7bf3bc883987ea2240f41508e8fc8a798906e Mon Sep 17 00:00:00 2001 From: jemeza-codegen Date: Thu, 20 Feb 2025 16:26:53 -0800 Subject: [PATCH 4/4] chore: fixed type in docs --- codegen-examples/examples/swebench_agent_run/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codegen-examples/examples/swebench_agent_run/README.md b/codegen-examples/examples/swebench_agent_run/README.md index 11f756038..daf509e1f 100644 --- a/codegen-examples/examples/swebench_agent_run/README.md +++ b/codegen-examples/examples/swebench_agent_run/README.md @@ -6,7 +6,7 @@ 1. Create a `.venv` with `uv venv` and activate it with `source .venv/bin/activate` -1. Install the codegen dependencies with `uv pip install codegen` +1. Install the codegen dependencies with `uv add codegen` - Note: If you'd like to install the dependencies in the global environment, you can use `uv pip install -e ../../../`. This will allow you to test modifications to the codegen codebase. You will need to run `uv pip install -e ../../../` each time you make changes to the codebase.