Skip to content

Commit 5943cdf

Browse files
authored
Merge branch 'All-Hands-AI:main' into main
2 parents fc481b9 + ce6939f commit 5943cdf

File tree

117 files changed

+7758
-3237
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+7758
-3237
lines changed

.github/workflows/eval-runner.yml

Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
name: Run Evaluation
2+
3+
on:
4+
pull_request:
5+
types: [labeled]
6+
schedule:
7+
- cron: "0 1 * * *" # Run daily at 1 AM UTC
8+
workflow_dispatch:
9+
inputs:
10+
reason:
11+
description: "Reason for manual trigger"
12+
required: true
13+
default: ""
14+
15+
env:
16+
N_PROCESSES: 32 # Global configuration for number of parallel processes for evaluation
17+
18+
jobs:
19+
run-evaluation:
20+
if: github.event.label.name == 'eval-this' || github.event_name != 'pull_request'
21+
runs-on: ubuntu-latest
22+
permissions:
23+
contents: "read"
24+
id-token: "write"
25+
pull-requests: "write"
26+
issues: "write"
27+
strategy:
28+
matrix:
29+
python-version: ["3.12"]
30+
steps:
31+
- name: Checkout repository
32+
uses: actions/checkout@v4
33+
34+
- name: Install poetry via pipx
35+
run: pipx install poetry
36+
37+
- name: Set up Python
38+
uses: actions/setup-python@v5
39+
with:
40+
python-version: ${{ matrix.python-version }}
41+
cache: "poetry"
42+
43+
- name: Comment on PR if 'eval-this' label is present
44+
if: github.event_name == 'pull_request' && github.event.label.name == 'eval-this'
45+
uses: KeisukeYamashita/create-comment@v1
46+
with:
47+
unique: false
48+
comment: |
49+
Hi! I started running the evaluation on your PR. You will receive a comment with the results shortly.
50+
51+
- name: Install Python dependencies using Poetry
52+
run: poetry install
53+
54+
- name: Configure config.toml for evaluation
55+
env:
56+
DEEPSEEK_API_KEY: ${{ secrets.DEEPSEEK_LLM_API_KEY }}
57+
run: |
58+
echo "[llm.eval]" > config.toml
59+
echo "model = \"deepseek/deepseek-chat\"" >> config.toml
60+
echo "api_key = \"$DEEPSEEK_API_KEY\"" >> config.toml
61+
echo "temperature = 0.0" >> config.toml
62+
63+
- name: Run integration test evaluation
64+
env:
65+
ALLHANDS_API_KEY: ${{ secrets.ALLHANDS_EVAL_RUNTIME_API_KEY }}
66+
RUNTIME: remote
67+
SANDBOX_REMOTE_RUNTIME_API_URL: https://runtime.eval.all-hands.dev
68+
EVAL_DOCKER_IMAGE_PREFIX: us-central1-docker.pkg.dev/evaluation-092424/swe-bench-images
69+
70+
run: |
71+
poetry run ./evaluation/integration_tests/scripts/run_infer.sh llm.eval HEAD CodeActAgent '' $N_PROCESSES
72+
73+
# get evaluation report
74+
REPORT_FILE=$(find evaluation/evaluation_outputs/outputs/integration_tests/CodeActAgent/deepseek-chat_maxiter_10_N* -name "report.md" -type f | head -n 1)
75+
echo "REPORT_FILE: $REPORT_FILE"
76+
echo "INTEGRATION_TEST_REPORT<<EOF" >> $GITHUB_ENV
77+
cat $REPORT_FILE >> $GITHUB_ENV
78+
echo >> $GITHUB_ENV
79+
echo "EOF" >> $GITHUB_ENV
80+
81+
- name: Run SWE-Bench evaluation
82+
env:
83+
ALLHANDS_API_KEY: ${{ secrets.ALLHANDS_EVAL_RUNTIME_API_KEY }}
84+
RUNTIME: remote
85+
SANDBOX_REMOTE_RUNTIME_API_URL: https://runtime.eval.all-hands.dev
86+
EVAL_DOCKER_IMAGE_PREFIX: us-central1-docker.pkg.dev/evaluation-092424/swe-bench-images
87+
88+
run: |
89+
poetry run ./evaluation/swe_bench/scripts/run_infer.sh llm.eval HEAD CodeActAgent 300 30 $N_PROCESSES "princeton-nlp/SWE-bench_Lite" test
90+
OUTPUT_FOLDER=$(find evaluation/evaluation_outputs/outputs/princeton-nlp__SWE-bench_Lite-test/CodeActAgent -name "deepseek-chat_maxiter_50_N_*-no-hint-run_1" -type d | head -n 1)
91+
echo "OUTPUT_FOLDER for SWE-bench evaluation: $OUTPUT_FOLDER"
92+
poetry run ./evaluation/swe_bench/scripts/eval_infer_remote.sh $OUTPUT_FOLDER/output.jsonl $N_PROCESSES "princeton-nlp/SWE-bench_Lite" test
93+
94+
poetry run ./evaluation/swe_bench/scripts/eval/summarize_outputs.py $OUTPUT_FOLDER/output.jsonl > summarize_outputs.log 2>&1
95+
echo "SWEBENCH_REPORT<<EOF" >> $GITHUB_ENV
96+
cat summarize_outputs.log >> $GITHUB_ENV
97+
echo "EOF" >> $GITHUB_ENV
98+
99+
- name: Create tar.gz of evaluation outputs
100+
run: |
101+
TIMESTAMP=$(date +'%y-%m-%d-%H-%M')
102+
tar -czvf evaluation_outputs_${TIMESTAMP}.tar.gz evaluation/evaluation_outputs/outputs
103+
104+
- name: Upload evaluation results as artifact
105+
uses: actions/upload-artifact@v4
106+
id: upload_results_artifact
107+
with:
108+
name: evaluation-outputs
109+
path: evaluation_outputs_*.tar.gz
110+
111+
- name: Get artifact URL
112+
run: echo "ARTIFACT_URL=${{ steps.upload_results_artifact.outputs.artifact-url }}" >> $GITHUB_ENV
113+
114+
- name: Authenticate to Google Cloud
115+
uses: 'google-github-actions/auth@v2'
116+
with:
117+
credentials_json: ${{ secrets.GCP_RESEARCH_OBJECT_CREATOR_SA_KEY }}
118+
119+
- name: Set timestamp and trigger reason
120+
run: |
121+
echo "TIMESTAMP=$(date +'%Y-%m-%d-%H-%M')" >> $GITHUB_ENV
122+
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
123+
echo "TRIGGER_REASON=pr-${{ github.event.pull_request.number }}" >> $GITHUB_ENV
124+
elif [[ "${{ github.event_name }}" == "schedule" ]]; then
125+
echo "TRIGGER_REASON=schedule" >> $GITHUB_ENV
126+
else
127+
echo "TRIGGER_REASON=manual-${{ github.event.inputs.reason }}" >> $GITHUB_ENV
128+
fi
129+
130+
- name: Upload evaluation results to Google Cloud Storage
131+
uses: 'google-github-actions/upload-cloud-storage@v2'
132+
with:
133+
path: 'evaluation/evaluation_outputs/outputs'
134+
destination: 'openhands-oss-eval-results/${{ env.TIMESTAMP }}-${{ env.TRIGGER_REASON }}'
135+
136+
- name: Comment with evaluation results and artifact link
137+
id: create_comment
138+
uses: KeisukeYamashita/create-comment@v1
139+
with:
140+
number: ${{ github.event_name == 'pull_request' && github.event.pull_request.number || 4504 }}
141+
unique: false
142+
comment: |
143+
Trigger by: ${{ github.event_name == 'pull_request' && format('Pull Request (eval-this label on PR #{0})', github.event.pull_request.number) || github.event_name == 'schedule' && 'Daily Schedule' || format('Manual Trigger: {0}', github.event.inputs.reason) }}
144+
Commit: ${{ github.sha }}
145+
**SWE-Bench Evaluation Report**
146+
${{ env.SWEBENCH_REPORT }}
147+
---
148+
**Integration Tests Evaluation Report**
149+
${{ env.INTEGRATION_TEST_REPORT }}
150+
---
151+
You can download the full evaluation outputs [here](${{ env.ARTIFACT_URL }}).
152+
153+
- name: Post to a Slack channel
154+
id: slack
155+
uses: slackapi/[email protected]
156+
with:
157+
channel-id: 'C07SVQSCR6F'
158+
slack-message: "*Evaluation Trigger:* ${{ github.event_name == 'pull_request' && format('Pull Request (eval-this label on PR #{0})', github.event.pull_request.number) || github.event_name == 'schedule' && 'Daily Schedule' || format('Manual Trigger: {0}', github.event.inputs.reason) }}\n\nLink to summary: [here](https://github.com/${{ github.repository }}/issues/${{ github.event_name == 'pull_request' && github.event.pull_request.number || 4504 }}#issuecomment-${{ steps.create_comment.outputs.comment-id }})"
159+
env:
160+
SLACK_BOT_TOKEN: ${{ secrets.EVAL_NOTIF_SLACK_BOT_TOKEN }}

.github/workflows/ghcr-build.yml

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Workflow that builds, tests and then pushes the OpenHands and runtime docker images to the ghcr.io repository
2-
name: Build, Test and Publish RT Image
2+
name: Docker
33

44
# Always run on "main"
55
# Always run on tags
@@ -399,3 +399,49 @@ jobs:
399399
run: |
400400
echo "Some runtime tests failed or were cancelled"
401401
exit 1
402+
update_pr_description:
403+
name: Update PR Description
404+
if: github.event_name == 'pull_request'
405+
needs: [ghcr_build_runtime]
406+
runs-on: ubuntu-latest
407+
steps:
408+
- name: Checkout
409+
uses: actions/checkout@v4
410+
411+
- name: Get short SHA
412+
id: short_sha
413+
run: echo "SHORT_SHA=$(echo ${{ github.event.pull_request.head.sha }} | cut -c1-7)" >> $GITHUB_OUTPUT
414+
415+
- name: Update PR Description
416+
env:
417+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
418+
PR_NUMBER: ${{ github.event.pull_request.number }}
419+
REPO: ${{ github.repository }}
420+
SHORT_SHA: ${{ steps.short_sha.outputs.SHORT_SHA }}
421+
run: |
422+
echo "updating PR description"
423+
DOCKER_RUN_COMMAND="docker run -it --rm \
424+
-p 3000:3000 \
425+
-v /var/run/docker.sock:/var/run/docker.sock \
426+
--add-host host.docker.internal:host-gateway \
427+
-e SANDBOX_RUNTIME_CONTAINER_IMAGE=ghcr.io/all-hands-ai/runtime:$SHORT_SHA-nikolaik \
428+
--name openhands-app-$SHORT_SHA \
429+
ghcr.io/all-hands-ai/runtime:$SHORT_SHA"
430+
431+
PR_BODY=$(gh pr view $PR_NUMBER --json body --jq .body)
432+
433+
if echo "$PR_BODY" | grep -q "To run this PR locally, use the following command:"; then
434+
UPDATED_PR_BODY=$(echo "${PR_BODY}" | sed -E "s|docker run -it --rm.*|$DOCKER_RUN_COMMAND|")
435+
else
436+
UPDATED_PR_BODY="${PR_BODY}
437+
438+
---
439+
440+
To run this PR locally, use the following command:
441+
\`\`\`
442+
$DOCKER_RUN_COMMAND
443+
\`\`\`"
444+
fi
445+
446+
echo "updated body: $UPDATED_PR_BODY"
447+
gh pr edit $PR_NUMBER --body "$UPDATED_PR_BODY"

README.md

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -33,37 +33,33 @@ Learn more at [docs.all-hands.dev](https://docs.all-hands.dev), or jump to the [
3333

3434
## ⚡ Quick Start
3535

36-
The easiest way to run OpenHands is in Docker. You can change `WORKSPACE_BASE` below to
37-
point OpenHands to existing code that you'd like to modify.
38-
36+
The easiest way to run OpenHands is in Docker.
3937
See the [Installation](https://docs.all-hands.dev/modules/usage/installation) guide for
4038
system requirements and more information.
4139

4240
```bash
43-
export WORKSPACE_BASE=$(pwd)/workspace
44-
45-
docker pull ghcr.io/all-hands-ai/runtime:0.11-nikolaik
41+
docker pull docker.all-hands.dev/all-hands-ai/runtime:0.12-nikolaik
4642

47-
docker run -it --pull=always \
48-
-e SANDBOX_RUNTIME_CONTAINER_IMAGE=ghcr.io/all-hands-ai/runtime:0.11-nikolaik \
49-
-e SANDBOX_USER_ID=$(id -u) \
50-
-e WORKSPACE_MOUNT_PATH=$WORKSPACE_BASE \
51-
-v $WORKSPACE_BASE:/opt/workspace_base \
43+
docker run -it --rm --pull=always \
44+
-e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.12-nikolaik \
5245
-v /var/run/docker.sock:/var/run/docker.sock \
5346
-p 3000:3000 \
5447
--add-host host.docker.internal:host-gateway \
55-
--name openhands-app-$(date +%Y%m%d%H%M%S) \
56-
ghcr.io/all-hands-ai/openhands:0.11
48+
--name openhands-app \
49+
docker.all-hands.dev/all-hands-ai/openhands:0.12
5750
```
5851

5952
You'll find OpenHands running at [http://localhost:3000](http://localhost:3000)!
6053

61-
You'll need a model provider and API key. One option that works well: [Claude 3.5 Sonnet](https://www.anthropic.com/api), but you have [many options](https://docs.all-hands.dev/modules/usage/llms).
54+
Finally, you'll need a model provider and API key.
55+
[Anthropic's Claude 3.5 Sonnet](https://www.anthropic.com/api) (`anthropic/claude-3-5-sonnet-20241022`)
56+
works best, but you have [many options](https://docs.all-hands.dev/modules/usage/llms).
6257

6358
---
6459

65-
You can also run OpenHands in a scriptable [headless mode](https://docs.all-hands.dev/modules/usage/how-to/headless-mode),
66-
or as an [interactive CLI](https://docs.all-hands.dev/modules/usage/how-to/cli-mode).
60+
You can also [connect OpenHands to your local filesystem](https://docs.all-hands.dev/modules/usage/runtimes),
61+
run OpenHands in a scriptable [headless mode](https://docs.all-hands.dev/modules/usage/how-to/headless-mode),
62+
or interact with it via a [friendly CLI](https://docs.all-hands.dev/modules/usage/how-to/cli-mode).
6763

6864
Visit [Installation](https://docs.all-hands.dev/modules/usage/installation) for more information and setup instructions.
6965

containers/app/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ ENV SANDBOX_LOCAL_RUNTIME_URL=http://host.docker.internal
4141
ENV USE_HOST_NETWORK=false
4242
ENV WORKSPACE_BASE=/opt/workspace_base
4343
ENV OPENHANDS_BUILD_VERSION=$OPENHANDS_BUILD_VERSION
44+
ENV SANDBOX_USER_ID=0
4445
RUN mkdir -p $WORKSPACE_BASE
4546

4647
RUN apt-get update -y \

containers/app/entrypoint.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ if [ -z "$SANDBOX_USER_ID" ]; then
1818
exit 1
1919
fi
2020

21+
if [ -z "$WORKSPACE_MOUNT_PATH" ]; then
22+
# This is set to /opt/workspace in the Dockerfile. But if the user isn't mounting, we want to unset it so that OpenHands doesn't mount at all
23+
unset WORKSPACE_BASE
24+
fi
25+
2126
if [[ "$SANDBOX_USER_ID" -eq 0 ]]; then
2227
echo "Running OpenHands as root"
2328
export RUN_AS_OPENHANDS=false
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
2+
13
# Documentation Python
24

3-
Les documents apparaîtront ici après le déploiement.
5+
La documentation apparaîtra ici après le déploiement.
Lines changed: 22 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,49 @@
1-
---
2-
sidebar_position: 7
3-
---
1+
# 📚 Divers
42

5-
# 📚 Divers {#misc}
3+
## ⭐️ Stratégie de recherche
64

7-
## ⭐️ Stratégie de Recherche {#research-strategy}
5+
La réplication complète d'applications de niveau production avec des LLM est une entreprise complexe. Notre stratégie implique :
86

9-
La réalisation d'une réplication complète des applications de production avec les LLM est une entreprise complexe. Notre stratégie implique :
7+
1. **Recherche technique fondamentale :** Se concentrer sur la recherche fondamentale pour comprendre et améliorer les aspects techniques de la génération et de la gestion de code
8+
2. **Capacités spécialisées :** Améliorer l'efficacité des composants de base grâce à la curation de données, aux méthodes d'entraînement, etc.
9+
3. **Planification des tâches :** Développer des capacités de détection de bugs, de gestion de base de code et d'optimisation
10+
4. **Évaluation :** Établir des métriques d'évaluation complètes pour mieux comprendre et améliorer nos modèles
1011

11-
1. **Recherche Technique de Base :** Se concentrer sur la recherche fondamentale pour comprendre et améliorer les aspects techniques de la génération et de la gestion de code.
12-
2. **Compétences Spécialisées :** Améliorer l'efficacité des composants de base grâce à la curation des données, aux méthodes de formation, et plus encore.
13-
3. **Planification des Tâches :** Développer des capacités pour la détection de bogues, la gestion du code source et l'optimisation.
14-
4. **Évaluation :** Établir des métriques d'évaluation complètes pour mieux comprendre et améliorer nos modèles.
12+
## 🚧 Agent par défaut
1513

16-
## 🚧 Agent Par Défaut {#default-agent}
14+
Notre Agent par défaut est actuellement le [CodeActAgent](agents), qui est capable de générer du code et de gérer des fichiers.
1715

18-
- Notre agent par défaut est actuellement le CodeActAgent, capable de générer du code et de gérer des fichiers. Nous travaillons sur d'autres implémentations d'agents, y compris [SWE Agent](https://swe-agent.com/). Vous pouvez [lire à propos de notre ensemble actuel d'agents ici](./agents).
16+
## 🤝 Comment contribuer
1917

20-
## 🤝 Comment Contribuer {#how-to-contribute}
18+
OpenHands est un projet communautaire et nous accueillons les contributions de tous. Que vous soyez développeur, chercheur ou simplement enthousiaste à l'idée de faire progresser le domaine de l'ingénierie logicielle avec l'IA, il existe de nombreuses façons de s'impliquer :
2119

22-
OpenHands est un projet communautaire, et nous accueillons les contributions de tout le monde. Que vous soyez développeur, chercheur, ou simplement enthousiaste à l'idée de faire progresser le domaine de l'ingénierie logicielle avec l'IA, il existe de nombreuses façons de vous impliquer :
23-
24-
- **Contributions de Code :** Aidez-nous à développer les fonctionnalités de base, l'interface frontend ou les solutions de sandboxing.
25-
- **Recherche et Évaluation :** Contribuez à notre compréhension des LLM en ingénierie logicielle, participez à l'évaluation des modèles ou suggérez des améliorations.
26-
- **Retour d'Information et Tests :** Utilisez l'ensemble d'outils OpenHands, signalez des bogues, suggérez des fonctionnalités ou fournissez des retours sur l'ergonomie.
20+
- **Contributions de code :** Aidez-nous à développer les fonctionnalités de base, l'interface frontend ou les solutions de sandboxing
21+
- **Recherche et évaluation :** Contribuez à notre compréhension des LLM dans l'ingénierie logicielle, participez à l'évaluation des modèles ou suggérez des améliorations
22+
- **Retours et tests :** Utilisez la boîte à outils OpenHands, signalez des bugs, suggérez des fonctionnalités ou donnez votre avis sur la facilité d'utilisation
2723

2824
Pour plus de détails, veuillez consulter [ce document](https://github.com/All-Hands-AI/OpenHands/blob/main/CONTRIBUTING.md).
2925

30-
## 🤖 Rejoignez Notre Communauté {#join-our-community}
26+
## 🤖 Rejoignez notre communauté
3127

32-
Nous avons maintenant à la fois un espace de travail Slack pour la collaboration sur la construction d'OpenHands et un serveur Discord pour discuter de tout ce qui est lié, par exemple, à ce projet, aux LLM, aux agents, etc.
28+
Nous avons à la fois un espace de travail Slack pour la collaboration sur la construction d'OpenHands et un serveur Discord pour discuter de tout ce qui est lié, par exemple, à ce projet, LLM, agent, etc.
3329

3430
- [Espace de travail Slack](https://join.slack.com/t/opendevin/shared_invite/zt-2oikve2hu-UDxHeo8nsE69y6T7yFX_BA)
3531
- [Serveur Discord](https://discord.gg/ESHStjSjD4)
3632

37-
Si vous souhaitez contribuer, n'hésitez pas à rejoindre notre communauté. Simplifions l'ingénierie logicielle ensemble !
33+
Si vous souhaitez contribuer, n'hésitez pas à rejoindre notre communauté. Simplifions ensemble l'ingénierie logicielle !
3834

39-
🐚 **Codez moins, créez plus avec OpenHands.**
35+
🐚 **Codez moins, faites plus avec OpenHands.**
4036

4137
[![Star History Chart](https://api.star-history.com/svg?repos=All-Hands-AI/OpenHands&type=Date)](https://star-history.com/#All-Hands-AI/OpenHands&Date)
4238

43-
## 🛠️ Construit Avec {#built-with}
39+
## 🛠️ Construit avec
4440

45-
OpenHands est construit en utilisant une combinaison de cadres et de bibliothèques puissants, offrant une base robuste pour son développement. Voici les technologies clés utilisées dans le projet :
41+
OpenHands est construit en utilisant une combinaison de frameworks et de bibliothèques puissants, fournissant une base solide pour son développement. Voici les principales technologies utilisées dans le projet :
4642

4743
![FastAPI](https://img.shields.io/badge/FastAPI-black?style=for-the-badge) ![uvicorn](https://img.shields.io/badge/uvicorn-black?style=for-the-badge) ![LiteLLM](https://img.shields.io/badge/LiteLLM-black?style=for-the-badge) ![Docker](https://img.shields.io/badge/Docker-black?style=for-the-badge) ![Ruff](https://img.shields.io/badge/Ruff-black?style=for-the-badge) ![MyPy](https://img.shields.io/badge/MyPy-black?style=for-the-badge) ![LlamaIndex](https://img.shields.io/badge/LlamaIndex-black?style=for-the-badge) ![React](https://img.shields.io/badge/React-black?style=for-the-badge)
4844

49-
Veuillez noter que la sélection de ces technologies est en cours, et que des technologies supplémentaires peuvent être ajoutées ou des existantes supprimées au fur et à mesure de l'évolution du projet. Nous nous efforçons d'adopter les outils les plus adaptés et efficaces pour améliorer les capacités d'OpenHands.
45+
Veuillez noter que la sélection de ces technologies est en cours et que des technologies supplémentaires peuvent être ajoutées ou des technologies existantes peuvent être supprimées à mesure que le projet évolue. Nous nous efforçons d'adopter les outils les plus appropriés et les plus efficaces pour améliorer les capacités d'OpenHands.
5046

51-
## 📜 Licence {#license}
47+
## 📜 Licence
5248

5349
Distribué sous la licence MIT. Voir [notre licence](https://github.com/All-Hands-AI/OpenHands/blob/main/LICENSE) pour plus d'informations.

0 commit comments

Comments
 (0)