Skip to content

Commit

Permalink
Merge pull request #2299 from Agenta-AI/resolve-failing-cli-commands-…
Browse files Browse the repository at this point in the history
…workflow

[Bug Fix]: Resolve CLI commands failing tests
  • Loading branch information
mmabrouk authored Nov 25, 2024
2 parents 85ca79c + aaf5526 commit 32dfe6e
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 34 deletions.
1 change: 1 addition & 0 deletions .github/actions/check-app-accessibility/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ inputs:
api-key:
description: 'The API key for accessing the app'
required: false

runs:
using: "composite"
steps:
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/cli-commands-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,33 +30,33 @@ jobs:
- name: Create .env file
run: |
echo "OPENAI_API_KEY=${{ secrets.NEXT_PUBLIC_OPENAI_API_KEY }}" > .env
working-directory: examples/baby_name_generator
working-directory: examples/deprecated_sdk_v2/baby_name_generator

- name: Run agenta init
run: |
APP_NAME="gh-cli-$(date +'%d-%m-%y_%H-%M-%S')"
cd examples/baby_name_generator
agenta init --app-name $APP_NAME --backend-host ${{ secrets.BACKEND_HOST }}
working-directory: examples/deprecated_sdk_v2/baby_name_generator
shell: bash
continue-on-error: false

- name: Run agenta variant serve
run: |
cd examples/baby_name_generator
agenta variant serve --file_name app.py 2>&1 | tee ../../serve_output.log
agenta variant serve --file_name app.py 2>&1 | tee serve_output.log
working-directory: examples/deprecated_sdk_v2/baby_name_generator
shell: bash
continue-on-error: false

- name: Check if app is running
uses: ./.github/actions/check-app-accessibility
with:
log-file: serve_output.log
log-file: examples/deprecated_sdk_v2/baby_name_generator/serve_output.log
continue-on-error: false

- name: Run agenta variant serve with overwrite
run: |
cd examples/baby_name_generator
agenta variant serve --file_name app.py --overwrite
working-directory: examples/deprecated_sdk_v2/baby_name_generator
shell: bash
continue-on-error: false

Expand All @@ -83,33 +83,33 @@ jobs:
- name: Create .env file
run: |
echo "OPENAI_API_KEY=${{ secrets.NEXT_PUBLIC_OPENAI_API_KEY }}" > .env
working-directory: examples/baby_name_generator
working-directory: examples/deprecated_sdk_v2/baby_name_generator

- name: Run agenta init
run: |
APP_NAME="gh-cli-$(date +'%d-%m-%y_%H-%M-%S')"
cd examples/baby_name_generator
AGENTA_API_KEY=${{ secrets.AGENTA_API_KEY }} agenta init --app-name $APP_NAME --backend-host https://cloud.agenta.ai --organisation-name team
working-directory: examples/deprecated_sdk_v2/baby_name_generator
shell: bash
continue-on-error: false

- name: Run agenta variant serve
run: |
cd examples/baby_name_generator
agenta variant serve --file_name app.py 2>&1 | tee ../../serve_output.log
agenta variant serve --file_name app.py 2>&1 | tee serve_output.log
working-directory: examples/deprecated_sdk_v2/baby_name_generator
shell: bash
continue-on-error: false

- name: Check if app is running
uses: ./.github/actions/check-app-accessibility
with:
log-file: serve_output.log
log-file: examples/deprecated_sdk_v2/baby_name_generator/serve_output.log
api-key: ${{ secrets.AGENTA_API_KEY }}
continue-on-error: false

- name: Run agenta variant serve with overwrite
run: |
cd examples/baby_name_generator
agenta variant serve --file_name app.py --overwrite
working-directory: examples/deprecated_sdk_v2/baby_name_generator
shell: bash
continue-on-error: false
27 changes: 6 additions & 21 deletions agenta-backend/README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,12 @@
Contains the backend for the container registry.

This backend takes care of the following:

- Instanciating a container registry
- Managing the container versions in the registry
- Instanciating the containers for evaluation
- Removing the container
- Shutting down the containers

What it does not take care of:
- Running the evaluation against the containers
![app_and_configuration_diagram](https://docs.agenta.ai/assets/ideal-img/apps_and_configurations_light.74f7538.1100.png)

This backend takes care of the following:

- building images
- deploying containers
- managing configurations and prompts for the application

## Architecture
This backend instanciate a docker registry and an api endpoint.
The CLI builds the apps into docker container images and pushes them to the registry, then posts the container information to the api endpoint.
This backend updates its local database with the new container information.

The UI-backend lists the container information through the api endpoint.
The
## API interface

### Add container
api: POST /containers/add
description: Add a container to the registry
See [here](https://docs.agenta.ai/concepts/architecture#agenta-architecture).
2 changes: 1 addition & 1 deletion agenta-cli/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "agenta"
version = "0.27.7a1"
version = "0.27.6"
description = "The SDK for agenta is an open-source LLMOps platform."
readme = "README.md"
authors = ["Mahmoud Mabrouk <[email protected]>"]
Expand Down

0 comments on commit 32dfe6e

Please sign in to comment.