Updates
Sep 28, 2024:
If you want to use agent with the OpenAI o1 models, please run these installation commands to update packages pip install git+https://github.com/wenting-zhao/aider.git.
Commit0
Commit0 is a from scratch AI coding challenge. Can you create a library from commit 0?
The benchmark consists of 57 core Python libraries. The challenge is to rebuild these libraries and pass their unit tests. All libraries have:
- Significant test coverage
- Detailed specification and documentation
- Lint and type checking
Commit0 is an interactive environment that makes it easy to design and test new agents. You can:
- Efficiently run tests in isolated environments
- Distribute testing and development across cloud systems
- Track and log all changes made throughout.
To install Commit0, run:
pip install commit0
Commit0 provides several commands to facilitate the process of cloning, building, testing, and evaluating repositories. Here's an overview of the available commands:
Setup
Use commit0 setup [OPTIONS] REPO_SPLIT to clone a repository split.
Available options include:
| Argument | Type | Description | Default |
|---|---|---|---|
repo_split |
str | Split of repositories to clone | |
--dataset-name |
str | Name of the Huggingface dataset | wentingzhao/commit0_combined |
--dataset-split |
str | Split of the Huggingface dataset | test |
--base-dir |
str | Base directory to clone repos to | repos/ |
--commit0-config-file |
str | Storing path for stateful commit0 configs | .commit0.yaml |
Build
Use commit0 build [OPTIONS] to build the Commit0 split chosen in the Setup stage.
Available options include:
| Argument | Type | Description | Default |
|---|---|---|---|
--num-workers |
int | Number of workers | 8 |
--commit0-config-file |
str | Path to the commit0 dot file | .commit0.yaml |
--verbose |
int | Verbosity level (1 or 2) | 1 |
Get Tests
Use commit0 get-tests REPO_NAME to get tests for a Commit0 repository.
| Argument | Type | Description | Default |
|---|---|---|---|
repo_name |
str | Name of the repository to get tests for |
Test
Use commit0 test [OPTIONS] REPO_OR_REPO_PATH [TEST_IDS] to run tests on a Commit0 repository.
Available options include:
| Argument | Type | Description | Default |
|---|---|---|---|
repo_or_repo_path |
str | Directory of the repository to test | |
test_ids |
str | Test IDs to run | |
--branch |
str | Branch to test | |
--backend |
str | Backend to use for testing | modal |
--timeout |
int | Timeout for tests in seconds | 1800 |
--num-cpus |
int | Number of CPUs to use | 1 |
--reference |
bool | Test the reference commit | False |
--coverage |
bool | Get coverage information | False |
--rebuild |
bool | Rebuild an image | False |
--commit0-config-file |
str | Path to the commit0 dot file | .commit0.yaml |
--verbose |
int | Verbosity level (1 or 2) | 1 |
--stdin |
bool | Read test names from stdin | False |
Evaluate
Use commit0 evaluate [OPTIONS] to evaluate the Commit0 split chosen in the Setup stage.
Available options include:
| Argument | Type | Description | Default |
|---|---|---|---|
--branch |
str | Branch to evaluate | |
--backend |
str | Backend to use for evaluation | modal |
--timeout |
int | Timeout for evaluation in seconds | 1800 |
--num-cpus |
int | Number of CPUs to use | 1 |
--num-workers |
int | Number of workers to use | 8 |
--reference |
bool | Evaluate the reference commit | False |
--coverage |
bool | Get coverage information | False |
--commit0-config-file |
str | Path to the commit0 dot file | .commit0.yaml |
--rebuild |
bool | Rebuild images | False |
Lint
Use commit0 lint [OPTIONS] REPO_OR_REPO_DIR to lint files in a repository.
Available options include:
| Argument | Type | Description | Default |
|---|---|---|---|
repo_or_repo_dir |
str | Directory of the repository to test | |
--files |
List[Path] | Files to lint (optional) | |
--commit0-config-file |
str | Path to the commit0 dot file | .commit0.yaml |
--verbose |
int | Verbosity level (1 or 2) | 1 |
Save
Use commit0 save [OPTIONS] OWNER BRANCH to save the Commit0 split to GitHub.
Available options include:
| Argument | Type | Description | Default |
|---|---|---|---|
owner |
str | Owner of the repository | |
branch |
str | Branch to save | |
--github-token |
str | GitHub token for authentication | |
--commit0-config-file |
str | Path to the commit0 dot file | .commit0.yaml |
Agent
Config
Use agent config [OPTIONS] AGENT_NAME to set up the configuration for an agent.
Available options include:
| Argument | Type | Description | Default |
|---|---|---|---|
agent_name |
str | Agent to use, we only support aider for now. | aider |
--model-name |
str | LLM model to use, check here for all supported models. | claude-3-5-sonnet-20240620 |
--use-user-prompt |
bool | Use a custom prompt instead of the default prompt. | False |
--user-prompt |
str | The prompt sent to agent. | See code for details. |
--run-tests |
bool | Run tests after code modifications for feedback. You need to set up docker or modal before running tests, refer to commit0 docs. |
False |
--max-iteration |
int | Maximum number of agent iterations. | 3 |
--use-repo-info |
bool | Include the repository information. | False |
--max-repo-info-length |
int | Maximum length of the repository information to use. | 10000 |
--use-unit-tests-info |
bool | Include the unit tests information. | False |
--max-unit-tests-info-length |
int | Maximum length of the unit tests information to use. | 10000 |
--use-spec-info |
bool | Include the spec information. | False |
--max-spec-info-length |
int | Maximum length of the spec information to use. | 10000 |
--use-lint-info |
bool | Include the lint information. | False |
--max-lint-info-length |
int | Maximum length of the lint information to use. | 10000 |
--pre-commit-config-path |
str | Path to the pre-commit config file. This is needed for running lint. |
.pre-commit-config.yaml |
--agent-config-file |
str | Path to write the agent config. | .agent.yaml |
Running
Use agent run [OPTIONS] BRANCH to execute an agent on a specific branch.
Available options include:
| Argument | Type | Description | Default |
|---|---|---|---|
branch |
str | Branch to run the agent on, you can specific the name of the branch | |
--backend |
str | Test backend to run the agent on, ignore this option if you are not adding run_tests option to agent. |
modal |
--log-dir |
str | Log directory to store the logs. | logs/aider |
--max-parallel-repos |
int | Maximum number of repositories for agent to run in parallel. Running in sequential if set to 1. | 1 |
--display-repo-progress-num |
int | Number of repo progress displayed when running. | 5 |
Metadata
Release files for commit0 0.1.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| commit0-0.1.8.tar.gz | 25.2 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| commit0-0.1.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 26.2 MB
Release files / commit0-0.1.8.tar.gz
| Download URL | commit0-0.1.8.tar.gz |
|---|---|
| Size | 25.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fd6402381df7daf29f3d5d423c1e1d7b26e8e9e9b506d5dfa7a3f0e724ec87fd
|
|
BLAKE2b-256 checksum How to use checksums |
a425a45fdc46056f033ec9df463ace94f6815005a77c50bc5cf521a57b3e7da2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.4.16
|
Release files / commit0-0.1.8-py3-none-any.whl
| Download URL | commit0-0.1.8-py3-none-any.whl |
|---|---|
| Size | 1.0 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b5369d7c814d2f2b82f39da60849f7b8519f277a05c5ed91a591b800c4b4d431
|
|
BLAKE2b-256 checksum How to use checksums |
0d77c75d378f784c9e6ecc488721841aac19596763d78370e5ff160409b29564
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.4.16
|