Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0: Library Generation from Scratch

License

NotificationsYou must be signed in to change notification settings

commit-0/commit0

Repository files navigation

Sep 28, 2024:

If you want to use agent with the OpenAI o1 models, please run these installation commands to update packagespip 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

Usecommit0 setup [OPTIONS] REPO_SPLIT to clone a repository split.Available options include:

ArgumentTypeDescriptionDefault
repo_splitstrSplit of repositories to clone
--dataset-namestrName of the Huggingface datasetwentingzhao/commit0_combined
--dataset-splitstrSplit of the Huggingface datasettest
--base-dirstrBase directory to clone repos torepos/
--commit0-config-filestrStoring path for stateful commit0 configs.commit0.yaml

Build

Usecommit0 build [OPTIONS] to build the Commit0 split chosen in the Setup stage.Available options include:

ArgumentTypeDescriptionDefault
--num-workersintNumber of workers8
--commit0-config-filestrPath to the commit0 dot file.commit0.yaml
--verboseintVerbosity level (1 or 2)1

Get Tests

Usecommit0 get-tests REPO_NAME to get tests for a Commit0 repository.

ArgumentTypeDescriptionDefault
repo_namestrName of the repository to get tests for

Test

Usecommit0 test [OPTIONS] REPO_OR_REPO_PATH [TEST_IDS] to run tests on a Commit0 repository.Available options include:

ArgumentTypeDescriptionDefault
repo_or_repo_pathstrDirectory of the repository to test
test_idsstrTest IDs to run
--branchstrBranch to test
--backendstrBackend to use for testingmodal
--timeoutintTimeout for tests in seconds1800
--num-cpusintNumber of CPUs to use1
--referenceboolTest the reference commitFalse
--coverageboolGet coverage informationFalse
--rebuildboolRebuild an imageFalse
--commit0-config-filestrPath to the commit0 dot file.commit0.yaml
--verboseintVerbosity level (1 or 2)1
--stdinboolRead test names from stdinFalse

Evaluate

Usecommit0 evaluate [OPTIONS] to evaluate the Commit0 split chosen in the Setup stage.Available options include:

ArgumentTypeDescriptionDefault
--branchstrBranch to evaluate
--backendstrBackend to use for evaluationmodal
--timeoutintTimeout for evaluation in seconds1800
--num-cpusintNumber of CPUs to use1
--num-workersintNumber of workers to use8
--referenceboolEvaluate the reference commitFalse
--coverageboolGet coverage informationFalse
--commit0-config-filestrPath to the commit0 dot file.commit0.yaml
--rebuildboolRebuild imagesFalse

Lint

Usecommit0 lint [OPTIONS] REPO_OR_REPO_DIR to lint files in a repository.Available options include:

ArgumentTypeDescriptionDefault
repo_or_repo_dirstrDirectory of the repository to test
--filesList[Path]Files to lint (optional)
--commit0-config-filestrPath to the commit0 dot file.commit0.yaml
--verboseintVerbosity level (1 or 2)1

Save

Usecommit0 save [OPTIONS] OWNER BRANCH to save the Commit0 split to GitHub.Available options include:

ArgumentTypeDescriptionDefault
ownerstrOwner of the repository
branchstrBranch to save
--github-tokenstrGitHub token for authentication
--commit0-config-filestrPath to the commit0 dot file.commit0.yaml

Agent

Config

Useagent config [OPTIONS] AGENT_NAME to set up the configuration for an agent.Available options include:

ArgumentTypeDescriptionDefault
agent_namestrAgent to use, we only supportaider for now.aider
--model-namestrLLM model to use, checkhere for all supported models.claude-3-5-sonnet-20240620
--use-user-promptboolUse a custom prompt instead of the default prompt.False
--user-promptstrThe prompt sent to agent.See code for details.
--run-testsboolRun tests after code modifications for feedback. You need to set updocker ormodal before running tests, refer to commit0 docs.False
--max-iterationintMaximum number of agent iterations.3
--use-repo-infoboolInclude the repository information.False
--max-repo-info-lengthintMaximum length of the repository information to use.10000
--use-unit-tests-infoboolInclude the unit tests information.False
--max-unit-tests-info-lengthintMaximum length of the unit tests information to use.10000
--use-spec-infoboolInclude the spec information.False
--max-spec-info-lengthintMaximum length of the spec information to use.10000
--use-lint-infoboolInclude the lint information.False
--max-lint-info-lengthintMaximum length of the lint information to use.10000
--pre-commit-config-pathstrPath to the pre-commit config file. This is needed for runninglint..pre-commit-config.yaml
--agent-config-filestrPath to write the agent config..agent.yaml

Running

Useagent run [OPTIONS] BRANCH to execute an agent on a specific branch.Available options include:

ArgumentTypeDescriptionDefault
branchstrBranch to run the agent on, you can specific the name of the branch
--backendstrTest backend to run the agent on, ignore this option if you are not addingrun_tests option to agent.modal
--log-dirstrLog directory to store the logs.logs/aider
--max-parallel-reposintMaximum number of repositories for agent to run in parallel. Running in sequential if set to 1.1
--display-repo-progress-numintNumber of repo progress displayed when running.5

About

Commit0: Library Generation from Scratch

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors5

Languages


[8]ページ先頭

©2009-2025 Movatter.jp