Commit Graph

136 Commits

Author SHA1 Message Date
Nicholas Tindle
6ec708c771 ci(server): Agent Server CI (#7193) 2024-06-12 00:29:23 +07:00
Reinier van der Leer
8f18aebf90 Update wiki links to new location (Nexus/wiki -> AutoGPT/wiki) 2024-06-09 23:13:25 +02:00
Reinier van der Leer
319232568a fix+docs(agent): Update LLM access instructions & remove GPT-specific flags (#7183)
* Update instructions to set up OpenAI / GPT-4 access
* Add instructions to set up Anthropic access
* Add instructions to set up Groq access
* Remove GPT-specific `--gpt3only`, `--gpt4only` CLI flags and related logic
* Remove duplicate config instructions from docker setup page, replace it by a link to the standard setup instructions
2024-06-03 08:51:46 -05:00
Reinier van der Leer
f107ff8cf0 Set up unified pre-commit + CI w/ linting + type checking & FIX EVERYTHING (#7171)
- **FIX ALL LINT/TYPE ERRORS IN AUTOGPT, FORGE, AND BENCHMARK**

### Linting
- Clean up linter configs for `autogpt`, `forge`, and `benchmark`
- Add type checking with Pyright
- Create unified pre-commit config
- Create unified linting and type checking CI workflow

### Testing
- Synchronize CI test setups for `autogpt`, `forge`, and `benchmark`
   - Add missing pytest-cov to benchmark dependencies
- Mark GCS tests as slow to speed up pre-commit test runs
- Repair `forge` test suite
  - Add `AgentDB.close()` method for test DB teardown in db_test.py
  - Use actual temporary dir instead of forge/test_workspace/
- Move left-behind dependencies for moved `forge`-code to from autogpt to forge

### Notable type changes
- Replace uses of `ChatModelProvider` by `MultiProvider`
- Removed unnecessary exports from various __init__.py
- Simplify `FileStorage.open_file` signature by removing `IOBase` from return type union
  - Implement `S3BinaryIOWrapper(BinaryIO)` type interposer for `S3FileStorage`

- Expand overloads of `GCSFileStorage.open_file` for improved typing of read and write modes

  Had to silence type checking for the extra overloads, because (I think) Pyright is reporting a false-positive:
  https://github.com/microsoft/pyright/issues/8007

- Change `count_tokens`, `get_tokenizer`, `count_message_tokens` methods on `ModelProvider`s from class methods to instance methods

- Move `CompletionModelFunction.schema` method -> helper function `format_function_def_for_openai` in `forge.llm.providers.openai`

- Rename `ModelProvider` -> `BaseModelProvider`
- Rename `ChatModelProvider` -> `BaseChatModelProvider`
- Add type `ChatModelProvider` which is a union of all subclasses of `BaseChatModelProvider`

### Removed rather than fixed
- Remove deprecated and broken autogpt/agbenchmark_config/benchmarks.py
- Various base classes and properties on base classes in `forge.llm.providers.schema` and `forge.models.providers`

### Fixes for other issues that came to light
- Clean up `forge.agent_protocol.api_router`, `forge.agent_protocol.database`, and `forge.agent.agent`

- Add fallback behavior to `ImageGeneratorComponent`
   - Remove test for deprecated failure behavior

- Fix `agbenchmark.challenges.builtin` challenge exclusion mechanism on Windows

- Fix `_tool_calls_compat_extract_calls` in `forge.llm.providers.openai`

- Add support for `any` (= no type specified) in `JSONSchema.typescript_type`
2024-05-28 05:04:21 +02:00
Krzysztof Czerwinski
cdae98d36b fix(ci): Fix cli and CI (#7166)
- Add a special case for cli to handle autogpt and forge agent
- Remove forge agent from smoke test ci
2024-05-22 17:18:00 +01:00
Reinier van der Leer
5292736779 fix(agent): Unbreak docker builds after repo restructure (#7164)
- Move `autogpt/Dockerfile` to `Dockerfile.autogpt`
  - Write new selective `.dockerignore` (in repo root) to keep build context clean
  - Amend `autogpt/docker-compose.yml` and all `autogpt-docker-*.yml` workflows accordingly

- Include `forge/` in docker build context so it can be used as a path dependency

- Include `frontend/` in docker builds
2024-05-22 18:11:16 +02:00
Krzysztof Czerwinski
4c325724ec refactor(autogpt, forge): Remove autogpts directory (#7163)
- Moved `autogpt` and `forge` to project root
- Removed `autogpts` directory
- Moved and renamed submodule `autogpts/autogpt/tests/vcr_cassettes` to `autogpt/tests/vcr_cassettes`
- When using CLI agents will be created in `agents` directory (instead of `autogpts`)
- Renamed relevant docs, code and config references from `autogpts/[forge|autogpt]` to `[forge|autogpt]` and from `*../../*` to `*../*`
- Updated `CODEOWNERS`, GitHub Actions and Docker `*.yml` configs
- Updated symbolic links in `docs`
2024-05-22 13:08:54 +01:00
Swifty
34fdbaa26b Remove arena (#7134)
* remove arena

* refactor: Remove Arena intake workflow

* Remove all mention of the arena

* remove evo.ninja
2024-05-09 11:36:40 +02:00
Reinier van der Leer
90f3c5e2d9 fix(ci): Disable annoying "PR too big" auto-message 2024-04-10 17:49:31 +02:00
Reinier van der Leer
30bc761391 ci(agent): Add macOS on M1 to AutoGPT CI matrix (#7041)
Use a `macos-14` runner to cover macOS on M1/arm64

- Add `macos-arm64` to `platform-os` matrix, and map it to `macos-14` runner
2024-03-22 14:26:16 +01:00
Reinier van der Leer
2a0e087461 ci(agent): Disable Python dependency caching on Windows
On Windows, unpacking cached dependencies takes longer than just installing them with `poetry install`. :')
2024-03-22 14:15:43 +01:00
Reinier van der Leer
828b81e5ef ci(agent): Fix Python dependency caching on macOS 2024-03-22 14:13:22 +01:00
Reinier van der Leer
20041d65bf ci(agent): Fix Docker CI for PR runs from forks (vol. 2)
- Fix docker image tag format error when `secrets.DOCKER_USER` is not set
2024-03-22 12:57:29 +01:00
Reinier van der Leer
9e39937072 ci(agent): Fix Docker CI for PR runs from forks
- Disable 'Log in to Docker hub' step for `pull_request` runs
2024-03-22 12:50:58 +01:00
Reinier van der Leer
dde0c70a81 ci(agent): Matrix CI tests across Linux, macOS and Windows (#7029)
* Matrix the AutoGPT Python CI's `test` job across Ubuntu, macOS and Windows

   - Set up MinIO in a step rather than specifying it under `jobs[test].services`, because services are only supported on Linux runners

   - Add Windows version of step to install Poetry

   - Add macOS compatibility patches to 'Install Poetry (Unix)' and `setup_git_auth` steps
  
   **Caveats:**
   - **No Docker on macOS or Windows**
      * Windows comes with Docker but only supports running Windows containers, while we're mainly interested in using Linux containers for code execution and/or running auxiliary services.
      * [The macOS runner doesn't come with Docker](https://github.com/actions/runner-images/issues/17). Setting it up is possible but takes ~3-4 minutes, and the performance of the Colima engine is poor: a `docker pull` that takes 2 seconds on Linux takes 45 seconds on macOS.

   - **No S3 service available on Windows**
   It seems that running a background process [isn't possible on Windows](https://github.com/actions/runner/issues/598#issuecomment-2011890429), and neither is running Linux-based Docker containers.

* Add `autogpt-agent` and OS-specific flags to Codecov upload step

* Improve caching of Python dependencies in CI by changing the cache key
   - Include hash of `poetry.lock` instead of `pyproject.toml` in key
   - Remove date component from key; it was included to avoid getting stuck to old cached versions of packages when we were still using `requirements.txt`. With `poetry.lock` that is no longer a concern.

* Fix skip check in test_s3_file_storage.py
2024-03-21 21:15:46 +01:00
Reinier van der Leer
29d390d54d ci: Disable annoying auto-message discouraging big PRs 2024-03-01 12:28:00 +01:00
Reinier van der Leer
b69f0b2cd0 fix(ci/arena): Fix requesting manual review
Three times the charm, right?
2024-03-01 12:22:05 +01:00
Reinier van der Leer
0308fb45be fix(ci/arena): Fix requesting manual review 2024-03-01 11:44:27 +01:00
Reinier van der Leer
0325370fed fix(ci/arena): Fix requesting manual review 2024-03-01 11:41:49 +01:00
Reinier van der Leer
1e4bd0388f fix(ci/arena): Skip checking file against itself for duplicates 2024-03-01 11:34:47 +01:00
Reinier van der Leer
d1b06f0be3 fix(ci/arena): Improve output format 2024-03-01 11:27:26 +01:00
Reinier van der Leer
3e40b35ef1 fix(ci/arena): Reverse check for pr.mergeable 2024-03-01 11:23:14 +01:00
Reinier van der Leer
70873906b7 fix(ci/arena): Make check for pr.mergeable more specific 2024-03-01 11:20:54 +01:00
Reinier van der Leer
f93a8a93b4 fix(ci/arena): Fix error accessing context & improve log output readability 2024-03-01 11:19:31 +01:00
Reinier van der Leer
4121d3712d fix(ci/arena): Fix syntax & formatting errors 2024-03-01 11:07:54 +01:00
Reinier van der Leer
4546dfdf17 feat(ci/arena): Add logging and debug output to workflow script 2024-03-01 11:02:41 +01:00
Reinier van der Leer
4011294da0 ci(arena): Fix arena-intake workflow
Sorry folks, it's been a while since I wrote javascript :')
2024-03-01 10:41:34 +01:00
Reinier van der Leer
48f6f83f05 ci(arena): Fix arena-intake workflow 2024-03-01 10:35:28 +01:00
Reinier van der Leer
51f5808430 ci: Add 'Arena intake' workflow to automatically check 'entering the arena' PRs 2024-03-01 00:27:10 +01:00
Reinier van der Leer
695049bfa3 ci: Auto-label PRs based on the scope of their diff 2024-02-29 19:38:04 +01:00
Reinier van der Leer
1f1e8c9f7d Update CODEOWNERS 2024-02-22 17:26:46 +01:00
Reinier van der Leer
8fd2e48c1b fix(ci/frontend): Add trigger on push including workflow file 2024-02-21 02:04:13 +01:00
Reinier van der Leer
69ccb185e8 fix(ci/frontend): Add and fix trigger on workflow file 2024-02-21 02:02:41 +01:00
Reinier van der Leer
a88e833831 ci: Revise Frontend CI
- Rename build-frontend.yml to frontend-ci.yml
- Add a `pull_request` trigger
- Disable committing and pushing to a `frontend_build_{hash}` branch
- (Re)enable auto-creating a pull request for the new frontend build
2024-02-21 02:00:33 +01:00
Reinier van der Leer
0f5490075b fix(ci/benchmark): Install benchmark dependencies
Otherwise `poetry -C benchmark run benchmark/reports/format.py` fails.
2024-02-20 16:56:47 +01:00
Reinier van der Leer
c8a40727d1 fix(ci/benchmark): Specify poetry env path for report conversion step 2024-02-20 12:10:49 +01:00
Reinier van der Leer
1079d71699 fix(ci/benchmark): Unbreak "Push reports to data branch" step
The `report_subfolder` variable was being populated with two identical lines, because there will be two untracked files in the folder, resulting in the same dirname.
This caused later commands using that variable to fail. Fix is to `sort -u` before storing the value to `report_subfolder`.
2024-02-20 10:35:14 +01:00
Reinier van der Leer
e104427767 feat(ci/benchmark): Generate step summary from benchmark report 2024-02-19 17:13:41 +01:00
Reinier van der Leer
784e2bbb1c fix(ci/benchmark): Mitigate VCS conflicts with files in data branch
`agbenchmark` currently creates files like success_rate.json in the base REPORTS_FOLDER, which causes conflicts in the last step of the benchmark workflow.
To prevent issues, these files must be removed prior to switching to the data branch.
2024-02-17 18:09:44 +01:00
Reinier van der Leer
959377f54c fix(ci/benchmark): Add set +e because we expect (some) challenges to fail 2024-02-17 15:56:55 +01:00
Reinier van der Leer
d5ad719757 ci: Allow telemetry for non-push events, as long as it's on master
Also disable telemetry for AutoGPT's unit/integration tests.
2024-02-17 15:12:43 +01:00
Reinier van der Leer
1ca9b9fa93 ci: Fix setting/passing TELEMETRY_* environment variables 2024-02-17 14:26:03 +01:00
Reinier van der Leer
fa4bdef17c ci: Update actions to newest versions
- `actions/stale` -> `v9`
- `actions/cache` -> `v4`
- `actions/checkout` -> `v4`
- `actions/setup-node` -> `v4`
- `docker/login-action` -> `v3`
- `actions/setup-python` -> `v5`
- `codecov/codecov-action` -> `v4`
- `actions/upload-artifact` -> `v4`
- `subosito/flutter-action` -> `v2`
- `docker/build-push-action` -> `v5`
- `docker/setup-buildx-action` -> `v3`
2024-02-17 13:59:13 +01:00
Reinier van der Leer
880c8e804c fix(ci/benchmark): Allow workflow to continue regardless of challenge outcomes 2024-02-17 11:52:26 +01:00
Reinier van der Leer
d6ab470c58 Rename autogpts-benchmark-nightly.yml to autogpts-benchmark.yml 2024-02-16 18:32:50 +01:00
Reinier van der Leer
a5de79beb6 ci(benchmark): Add nightly benchmark workflow
Added autogpts-benchmark-nightly.yml, which will run every night at 02:00 UTC with a selection of challenges.
2024-02-16 17:41:58 +01:00
Reinier van der Leer
679339d00c feat(benchmark): Make report output folder configurable
- Make `AgentBenchmarkConfig.reports_folder` directly configurable (through `REPORTS_FOLDER` env variable). The default is still `./agbenchmark_config/reports`.
- Change all mentions of `REPORT_LOCATION` (which fulfilled the same function at some point in the past) to `REPORTS_FOLDER`.
2024-02-15 18:07:45 +01:00
Reinier van der Leer
6017eefb32 ci: Enable telemetry in CI runs on master 2024-02-14 12:03:54 +01:00
Reinier van der Leer
88bbdfc7fc ci: Pick 3 challenges to run with --mock in smoke test CI 2024-02-14 02:30:03 +01:00
Reinier van der Leer
14c9773890 ci(agent): Add GIT_REVISION label to Docker builds 2024-02-12 12:31:04 +01:00