53 Commits

Author SHA1 Message Date
Ivan Dagelic
ecd573febc
Daytona Runtime (#6863)
Signed-off-by: jsrzic <josip.srzic@gmail.com>
Signed-off-by: Ivan Dagelic <dagelic.ivan@gmail.com>
Co-authored-by: jsrzic <65179822+jsrzic@users.noreply.github.com>
2025-02-24 13:09:30 +01:00
Xingyao Wang
1a7003a705
Add sysbox support to remote runtime for eval; Add memory monitor, stress tests to help debug memory issue (#6684)
Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>
Co-authored-by: Graham Neubig <neubig@gmail.com>
2025-02-18 20:02:28 +00:00
Xingyao Wang
a7bb73ded2
fix: disable prlimit since limiting --vm breaks nodejs (#6765) 2025-02-17 17:53:02 +00:00
Xingyao Wang
3188646195
refactor(runtime): Use openhands-aci file editor directly in runtime instead of execute it through ipython (#6671)
Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: Graham Neubig <neubig@gmail.com>
Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>
2025-02-12 01:37:44 +08:00
Xingyao Wang
6a6dc93e03
feat(runtime): use prlimit to limit resource usage of command to avoid OOM Runtime Kill (#6338)
Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>
Co-authored-by: Graham Neubig <neubig@gmail.com>
2025-02-11 11:21:11 +08:00
Xingyao Wang
478b225d11
feat: Add LocalRuntime (#5284)
Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>
2025-02-07 16:35:14 +00:00
OpenHands
fe8b92743b
Fix issue #6531: [Bug]: GITHUB_TOKEN would missing when the runtime resume (#6533) 2025-02-04 17:48:25 -05:00
Boxuan Li
e487008e74
Trajectory replay: Fix a few corner cases (#6380) 2025-02-02 00:27:22 -08:00
Engel Nyst
eb8d1600c3
Chore: clean up LLM (prompt caching, supports fn calling), leftover renames (#6095) 2025-02-01 18:14:08 +01:00
Boxuan Li
c9f16248d0
Add tests for trajectory replay (#6513) 2025-01-30 13:56:24 +00:00
Xingyao Wang
899c1f8360
fix(bash): also show timeout reminder when no_change_timeout is triggered (#6318)
Co-authored-by: Robert Brennan <accounts@rbren.io>
2025-01-18 03:31:23 +08:00
Xingyao Wang
0bed17758f
fix: incorrect soft-timeout implementation & fix hard-timeout follow-up command (#6280) 2025-01-17 01:27:00 +08:00
Xingyao Wang
179a89a211
Fix microagent loading with trailing slashes and nested directories (#6239)
Co-authored-by: openhands <openhands@all-hands.dev>
2025-01-15 17:07:40 +00:00
Xingyao Wang
77aa843d53
feat: support running docker runtime stresstest in CI (#6100)
Co-authored-by: Boxuan Li <liboxuan@connect.hku.hk>
2025-01-07 16:55:21 +00:00
Boxuan Li
fb53ae43c0
Add a stress test for eventstream runtime (#6038)
Co-authored-by: Xingyao Wang <xingyao6@illinois.edu>
2025-01-06 22:36:59 +00:00
Xingyao Wang
cebd391b7a
fix: better handle bashlex error (#6090) 2025-01-06 20:45:59 +00:00
Xingyao Wang
ec70af9412
refactor: Replace pexpect with libtmux in BashSession (#4881)
Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>
Co-authored-by: Robert Brennan <accounts@rbren.io>
2025-01-04 05:22:13 +08:00
Robert Brennan
0e4e1b3316
Factor out ActionExecutionClient (#5796) 2024-12-30 15:32:13 +00:00
Ryan H. Tran
7a0488c012
Use more specific action types for openhands-aci commands (#5508)
Co-authored-by: Xingyao Wang <xingyao@all-hands.dev>
2024-12-21 02:48:27 +08:00
Engel Nyst
cd22817004
Switch dependency to browsergym-core (#5242)
Co-authored-by: openhands <openhands@all-hands.dev>
2024-12-02 08:52:02 -05:00
Cheng Yang
71be744f2e
Style/add return type hints (#5274) 2024-11-26 09:42:45 -07:00
Xingyao Wang
bb8b4a0b18
feat(runtime): add system resource metrics to /server_info endpoint (#5207)
Co-authored-by: openhands <openhands@all-hands.dev>
2024-11-23 02:28:32 +08:00
Ryan H. Tran
97f3249205
Move linter and diff utils to openhands-aci (#5020) 2024-11-16 06:58:26 +01:00
Xingyao Wang
fd81670ba8
feat: add VSCode to OpenHands runtime and UI (#4745)
Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: Robert Brennan <accounts@rbren.io>
2024-11-14 00:20:49 +08:00
Robert Brennan
17f4c6e1a9
Refactor sessions a bit, and fix issue where runtimes get killed (#4900) 2024-11-12 16:20:36 +00:00
ross
67c8915d51
feat(runtime): Add prototype Runloop runtime impl (#4598)
Co-authored-by: Robert Brennan <contact@rbren.io>
2024-11-08 23:40:31 -05:00
tofarr
932de79154
Fix: Buffering zip downloads to files rather than holding in memory (#4802) 2024-11-07 10:24:30 -07:00
Engel Nyst
eeb2342509
Refactor history/event stream (#3808) 2024-11-05 03:36:14 +01:00
Robert Brennan
98751a3ee2
Refactor of error handling (#4575)
Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>
Co-authored-by: Xingyao Wang <xingyao@all-hands.dev>
Co-authored-by: Xingyao Wang <xingyao6@illinois.edu>
2024-11-04 23:30:53 +00:00
Xingyao Wang
c0a0d46eb2
test(runtime) #4623: file permission when running the file_editor (#4628)
Co-authored-by: openhands <openhands@all-hands.dev>
2024-10-31 04:34:34 +08:00
Robert Brennan
8d2b2d4318
Refactor runtime to add a connect method (#4410)
Co-authored-by: Tim O'Farrell <tofarr@gmail.com>
2024-10-25 09:02:19 -04:00
tofarr
90e2bf4883
Split bash commands by the new line character (#4462) 2024-10-24 07:44:38 -06:00
Xingyao Wang
2d5b360505
refactor: re-organize different runtime implementations into an impl folder (#4346)
Co-authored-by: Graham Neubig <neubig@gmail.com>
2024-10-23 10:10:03 +00:00
Xingyao Wang
da548d308c
[agent] LLM-based editing (#3985)
Co-authored-by: Tim O'Farrell <tofarr@gmail.com>
Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>
Co-authored-by: Robert Brennan <accounts@rbren.io>
Co-authored-by: Graham Neubig <neubig@gmail.com>
2024-10-22 04:51:44 +08:00
sp.wack
36e304b3da
chore(backend): Refactor copy_from method to be more generic (#4278) 2024-10-10 12:10:35 -04:00
Xingyao Wang
9c07370559
fix runtime_startup_env_vars not being used (#4250) 2024-10-07 15:33:12 -04:00
Xingyao Wang
42649745bd
fix(runtime): fix bash interrupt on program that cannot be stopped via ctrl+c (#4161) 2024-10-04 06:48:44 +08:00
tofarr
152f99c64f
Chore Bump python version (#3545) 2024-10-03 13:40:55 -04:00
Xingyao Wang
e81c5597d6
feat(runtime): use micromamba instead of mamba and fix build issue (#4154) 2024-10-02 21:23:18 +00:00
Xingyao Wang
240a470a1d Revert "add few seconds to properly receive timeout error from client"
This reverts commit dd2cb4399a654d90efe5bce3909c6db9575753ec.
2024-10-01 23:44:05 -04:00
Xingyao Wang
dd2cb4399a add few seconds to properly receive timeout error from client 2024-10-01 23:43:50 -04:00
tobitege
575a829d94
(enh) add test_python_version to test_bash.py runtime tests (#4098) 2024-09-28 08:21:14 +08:00
mamoodi
1d052818ae
Set runtime container image so it doesn't need to be rebuilt (#4035) 2024-09-25 05:20:45 +02:00
tobitege
554636cf2a
(fix) Fix runtime (RT) tests and split tests in 2 actions (openhands/root) (#3791)
Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>
2024-09-14 21:51:30 +02:00
mamoodi
f3b2085f9b
Reduce runtime tests duration by running them across CPUs (#3779)
* Reduce runtime tests duration by running them across CPUs

* fix hardcoded image name

* test two cpus

* Test folder change

* Up the CPU to 4 again to test

* Change to 3 CPUs

* Down to 2

* Add param to remove all openhands containers

* Add comment

* Add reruns just in case

* Fix ordering of if
2024-09-10 14:31:17 -04:00
tobitege
2b7517e542
(enh) add caching@v4 action in workflows (#3780)
* dummy test change

* regen yml: 1st install python 3.11, then poetry

* fix caching for poetry; old entry for python was rather useless

* fix steps order (cache before poetry)

* add poetry caching to ghcr_runtime; fix fork conditions

* ghcr_runtime: more caching actions; condition fixes

* fix interim action error (order of steps)

* cache@v4 instead of v3

* fixed interim typo for 2 fork conditions

* runtime/test_env_vars: compacted multiple tests into one to reduce time

* ugh if fork condition changes again
2024-09-09 10:49:49 +02:00
Robert Brennan
ab3851593d
Support interactive commands (#3653)
* hacky solution for interactive commands

* add more behavior

* debug

* fix continue functionality

* remove prints

* refactor a bit

* reduce test sleep

* fix python version

* fix pre-commit issue

* Regenerate integration tests

* Update openhands/runtime/client/client.py

* revert some prompt stuff

* several integration mock files regenerated

* execute_action: remove duplicate exception logging

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: tobitege <10787084+tobitege@users.noreply.github.com>
2024-09-08 21:45:51 +02:00
Xingyao Wang
090c911a50
(refactor) Make Runtime class synchronous (#3661)
* change runtime to be synchronous

* fix test runtime with the new interface

* fix arg

* fix eval

* fix missing config attribute

* fix plugins

* fix on_event by revert it back to async

* update upload_file endpoint

* fix argument to upload file

* remove unncessary async for eval;
fix evaluation run in parallel

* use asyncio to run controller for eval

* revert file upload

* truncate eval test result output
2024-08-30 01:37:03 +00:00
Xingyao Wang
8b1f207d39
feat: support remote runtime (#3406)
* feat: refactor building logic into runtime builder

* return image name

* fix testcases

* use runtime builder for eventstream runtime

* have runtime builder return str

* add api_key to sandbox config

* draft remote runtime

* remove extra if clause

* initialize runtime based on box class

* add build logic

* use base64 for file upload

* get runtime image prefix from API

* replace ___ with _s_ to make it a valid image name

* use /build to start build and /build_status to check the build progress

* update logging

* fix exit code

* always use port

* add remote runtime

* rename runtime

* fix tests import

* make dir first if work_dir does not exists;

* update debug print to remote runtime

* fix exit close_sync

* update logging

* add retry for stop

* use all box class for test keep prompt

* fix test browsing

* add retry stop

* merge init commands to save startup time

* fix await

* remove sandbox url

* support execute through specific runtime url

* fix file ops

* simplify close

* factor out runtime retry code

* fix exception handling

* fix content type error (e.g., bad gateway when runtime is not ready)

* add retry for wait until alive;
add retry for check image exists

* Revert "add retry for wait until alive;"

This reverts commit dd013cd2681a159cd07747497d8c95e145d01c32.

* retry when wait until alive

* clean up msg

* directly save sdist to temp dir for _put_source_code_to_dir

* support running testcases in parallel

* tweak logging;
try to close session

* try to close session even on exception

* update poetry lock

* support remote to run integration tests

* add warning for workspace base on remote runtime

* set default runtime api

* remove server runtime

* update poetry lock

* support running swe-bench (n=1) eval on remoteruntime

* add a timeout of 30 min

* add todo for docker namespace

* update poetry loc
2024-08-29 15:53:37 +00:00
tobitege
f1882ba886
(test) Fix regressions in tests (#3579)
* fix conftest.py option (#3573)

* try to fix fixture base_container_image in runtime conftest

* fix integration test mock files due to #3548

* fix test_ipython.py integration test
2024-08-26 13:14:37 +02:00