Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Fix]: Resolve CLI commands failing tests #2299

Merged
merged 4 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 <mahmoud@agenta.ai>"]
Expand Down
Loading