28 Commits

Author SHA1 Message Date
tobitege
daeff3dfaf startup handling and logging of docker images tweaked (#3645) 2024-08-28 22:17:58 +00:00
Graham Neubig
c6ba0e8339 Remove singleton config (#3614)
* Remove singleton config

* Fix tests

* Fix logging reset

* Fix pre-commit
2024-08-28 20:05:49 +01:00
tobitege
9c39f07430 (enh) Aider-Bench: make resumable with skip_num arg (#3626)
* added optional START_ID env flag to resume from that instance id

* prepare_dataset: fix comparisons by using instance id's as int

* aider bench complete_runtime: close runtime to close container

* added matrix display of instance id for logging

* fix typo in summarize_results.py saying summarise_results

* changed start_id to skip_num to skip rows from dataset (start_id wasn't supportable)

* doc changes about huggingface spaces to temporarily point back to OD
2024-08-28 15:42:01 +00:00
Xingyao Wang
d9a8b53bc2 feat: specialize CodeAct into micro agents by providing markdown files (#3511)
* update microagent name and update template.toml

* substitute actual micro_agent_name for prompt manager

* add python-frontmatter

* support micro agent in codeact

* add test cases

* add instruction from require env var

* add draft gh micro agent

* update poetry lock

* update poetry lock
2024-08-28 14:58:16 +00:00
Xingyao Wang
98081b9b1b (eval) EOF fixes for SWE-Bench evaluation (#3623)
* add error handling for client eof

* remove root check

* remove set -e

* echo USER to fix for swebench infer

* fix entry timeout

* add timeout;
fix runtime close
2024-08-27 21:09:31 +00:00
tobitege
0b8779447a New README for OpenHands/openhands/runtime folder (#3576)
* new OpenHands/openhands/runtime/README.md - made by OpenHands

* move parts to server readme; fix OD runtime in docs
2024-08-27 21:04:50 +00:00
tobitege
097fbd6362 (fix) Enable and log if logging to file is enabled (#3556)
* enable logging to file also when DEBUG is active

* Log a message if logging to file is enabled

* log a message if DEBUG mode is enabled
2024-08-27 22:36:33 +02:00
tobitege
1fddc77247 (feat) runtime: in _wait_until_alive upon start wait for client to have initialized too (#3612)
* runtime: in _wait_until_alive wait initially for client to initialize

* fix typo in runtime log entry
2024-08-27 17:11:32 +02:00
Kaushik Deka
5bb931e4d6 Add prompt caching (Sonnet, Haiku only) (#3411)
* Add prompt caching

* remove anthropic-version from extra_headers

* change supports_prompt_caching method to attribute

* change caching strat and log cache statistics

* add reminder as a new message to fix caching

* fix unit test

* append reminder to the end of the last message content

* move token logs to post completion function

* fix unit test failure

* fix reminder and prompt caching

* unit tests for prompt caching

* add test

* clean up tests

* separate reminder, use latest two messages

* fix tests

---------

Co-authored-by: tobitege <10787084+tobitege@users.noreply.github.com>
Co-authored-by: Xingyao Wang <xingyao6@illinois.edu>
Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>
2024-08-26 20:46:44 -04:00
tobitege
8fcf0817d4 (eval) Aider_bench: add eval_ids arg to run specific instance id's (#3592)
* add eval_ids arg to run specific instance id's; fix/extend README

* fix description in parser for --eval-ids

* fix test_arg_parser.py to account for added arg

* fix typo in README to say "summarize" instead of "summarise" for script
2024-08-27 00:49:26 +08:00
tofarr
8c4c3b18b5 Feat google cloud storage (#3574)
* Google cloud storage implementation
* Unit test refactor
2024-08-26 08:16:49 -06:00
tofarr
6ce77e157b Fix pypi build (#3548)
* Fix pypi build

The package on pypi only included opendevin/* (the poetry default). It also needs to include agenthub/*

* Bumped version so people will actually get it!

* Fix package definition
* Updated poetry lock file
* Update package name to openhands-ai
* Add py.typed to indicate that OpenHands has type annotations

* Replace package name with openhands_ai

* Fix tests to reflect new name

---------

Co-authored-by: Graham Neubig <neubig@gmail.com>
2024-08-26 01:31:37 -06:00
Graham Neubig
f9088766e8 Allow setting of runtime container image (#3573)
* Add runtime container image setting

* Fix typo in test

* Fix sandbox base container image

* Update variables

* Update to base_container_image

* Update tests/unit/test_config.py

Co-authored-by: Xingyao Wang <xingyao6@illinois.edu>

* Fixed eval

* Fixed container_image

* Fix typo

---------

Co-authored-by: Xingyao Wang <xingyao6@illinois.edu>
2024-08-25 23:05:41 +00:00
Robert Brennan
356d9b34be Add CLI mode (#3564)
* set log levels

* basic cli flow

* basic display

* better exits

* set log level

* fix messages

* clean up logs

* better exits

* better printing

* add todo
2024-08-26 06:10:21 +08:00
Robert Brennan
b63dec4b2e Add back docker caching, simplify docker builds (#3546)
* fix multiarch

* remove extra push

* add back tag file

* fix cache tag

* add login step

* fix login

* try to fix save

* fix output maybe

* rm outputs

* remove tars

* fix refs

* fix runtime dep

* force rebuild

* lowercase image

* add suffix to build tags for runtime

* update matrix

* fix cut

* fix cut again

* add back matrix

* Update containers/build.sh

Co-authored-by: Xingyao Wang <xingyao6@illinois.edu>

---------

Co-authored-by: Xingyao Wang <xingyao6@illinois.edu>
2024-08-23 17:01:18 +00:00
tobitege
fc5f026942 prevent 500 server error on a just removed folder when listing files (#3553) 2024-08-23 18:05:38 +02:00
tofarr
8d47cebde9 Fix spaces in path (#3547)
* Fix for issue where spaces in path results in error
2024-08-23 07:29:41 -06:00
Raj Maheshwari
11d8d05b1a [Fix] Metrics should be updated when agent reaches max iterations. (#3549) 2024-08-23 02:28:16 +00:00
Ikko Eltociear Ashimine
87cc28beca chore: update client.py (#3542)
occurence -> occurrence
2024-08-23 01:18:16 +08:00
Aaron Xia
dc0a1f3940 Fix wrong doc url (#3531)
* Update custom-sandbox-guide.md

update https://docs.all-hands.dev/modules/usage/architecture/runtime

* Update runtime_build.py

update url

* Update README.md

update url
2024-08-22 13:16:27 +02:00
Xingyao Wang
b19b724eae feat: show exact python interpreter to the agent in IPython and Bash (#3448)
* try to fix pip unavailable

* update test case for pip

* force rebuild in CI

* remove extra symlink

* fix newline

* added semi-colon to line 31

* Dockerfile.j2: activate env at the end

* Revert "Dockerfile.j2: activate env at the end"

This reverts commit cf2f565102.

* cleanup Dockerfile

* switch default python image

* remove image agnostic (no longer used)

* fix tests

* simplify integration tests default image

* add nodejs specific runtime tests

* update tests and workflows

* switch to nikolaik/python-nodejs:python3.11-nodejs22

* update build sh to output image name correctly

* increase custom images to test

* fix test

* fix test

* fix double quote

* try fixing ci

* update ghcr workflow

* fix artifact name

* try to fix ghcr again

* fix workflow

* save built image to correct dir

* remove extra -docker-image

* make last tag to be human readable image tag

* fix hyphen to underscore

* run test runtime on all tags

* revert app build

* separate ghcr workflow

* update dockerfile for eval

* fix tag for test run

* try fix tag

* try fix tag via matrix output

* try workflow again

* update comments

* try fixing test matrix

* fix artifact name

* try fix tag again

* Revert "try fix tag again"

This reverts commit b369badd8c.

* tweak filename

* try different path

* fix filepath

* try fix tag artifact path again

* save json instead of line

* update matrix

* print all tags in workflow

* support only streaming diff logs from the runtime client

* remove strip from log line to fix indentation

* get py interpreter for jupyter

* rstrip to remove newline on the rightside for logging

* fix blocking issue for stream logs

* set python interpreter path in bash ps1

* update testcase for jupyter py interpreter path

* remove accidentally added changes

* remove accidentally added changes

* only print dockerfile when debug

* add docs

* remove extra tests that weren't supposed to be in this pr

* add back missing test

* revert

* make LogBuffer synchronous to fix hang in integration tests

* fix integration tests

* Update opendevin/runtime/client/client.py

Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>

* fix test case

* fix integration tests

* change deque to list

* update integration tests

* rename test runtime

* fix docs

* rename opendevin to openhands in tests

---------

Co-authored-by: tobitege <tobitege@gmx.de>
Co-authored-by: Graham Neubig <neubig@gmail.com>
Co-authored-by: tobitege <10787084+tobitege@users.noreply.github.com>
Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>
2024-08-21 20:08:50 +00:00
tobitege
c7886168e1 (feat) implement typescript linting for CodeActAgent (#3452)
* tweaks to linter.py to prep for typescript linting (not implemented yet)

* fix 2 linter unit tests

* simpler basic_lint output; updated unit test

* fix default gpt-4o model name in aider default config

* linter.py: use tsc (typescript compiler) for linting; added more tests

* make typescript linting be more forgiving

* use npx instead of npm to install typescript in Dockerfile.j2

* Fix merge mistake

* removed npx call from Dockerfile.j2

* fix run_cmd to use code parameter; replace regex in test

* fix test_lint_file_fail_typescript to ignore leading path characters

* added TODO comment to extract_error_line_from

* fixed bug in ts_lint with wrong line number parsing
2024-08-21 21:41:35 +02:00
tobitege
7ef5a2d1ff (fix) Rename last opendevin occurences (#3490)
* renaming more opendevin occurences

* remove DOCKER_IMAGE variable from Makefile

* Revert rename in evaluation/swe_bench/run_infer.py

Co-authored-by: Xingyao Wang <xingyao@all-hands.dev>

---------

Co-authored-by: Xingyao Wang <xingyao@all-hands.dev>
2024-08-20 16:45:26 +00:00
Mahmood Alhawaj
6487175a31 refactored all relative paths to absolute paths (#3495) 2024-08-21 00:09:48 +08:00
Xingyao Wang
c8452f5813 fix: custom runtime image won't work for go (#3464)
* fix request param for container_image;
add test for go;

* fix go version issue

* update test to detect go version
2024-08-20 23:38:59 +08:00
tofarr
f5aa111ba6 Fix: Bump max_iterations when resuming due to throttling (#3410)
* Fix: Reset iteration count when resuming due to throttling

* Fix inadvertent additions

* WIP

* Changing max_iterations instead of iteration count

* Now adjusting max_iterations or max_budget_per_task as appropriate

* Fix check on iterations

* Fix linter issues

* AgentController: remember initial max_iterations and use it to extend state's iterations

* increase task budget by initial value (not doubling it)

---------

Co-authored-by: Tim O'Farrell <tofarr@gmai.com>
Co-authored-by: tobitege <10787084+tobitege@users.noreply.github.com>
Co-authored-by: mamoodi <mamoodiha@gmail.com>
2024-08-20 06:53:26 -06:00
Xingyao Wang
8f0f764a85 fix: CI docker image push (#3476)
* fix ghcr app

* fix ghcr runtime push

* rename od_runtime to runtime
2024-08-19 20:53:28 +00:00
Robert Brennan
01ae22ef57 Rename OpenDevin to OpenHands (#3472)
* Replace OpenDevin with OpenHands

* Update CONTRIBUTING.md

* Update README.md

* Update README.md

* update poetry lock; move opendevin folder to openhands

* fix env var

* revert image references in docs

* revert permissions

* revert permissions

---------

Co-authored-by: Xingyao Wang <xingyao6@illinois.edu>
2024-08-20 00:44:54 +08:00