DebiAI supports custom algorithms through the use of Algo-providers.
This project is a ready to fill algo-provider template, it exposes some simple algorithms as an example.
To make your algorithm compatible with DebiAI, you need to follow the Algo API standard, more information on the Algo API here.
This template is already compatible with the Algo API and is ready to be used.
Setup the project with the following command:
git clone https://github.com/debiai/algo-provider-python-template.git
Install the dependencies and the submodules with the following commands:
pip install -r requirements.txt
Define your algorithms inputs and outputs, and the algorithm itself in the algorithms/algorithms.py file.
Then, you can run the server with the following command:
python websrv.py
This template comes with a config file template that you can use to configure the server. You can find it in the config/config.ini file.
To add elements to the config file, you will need to add them in the config/config.ini file and in the config/init_config.py file.
This template comes with some tests to help you to make sure that your service is compliant with the API.
The tests will try to test the different algorithms provided by the service by looking at their inputs and outputs and by trying to run them with fake data.
Those tests are not exhaustive and are only here to help you to make sure that your service is compliant with the API spec.
The tests won't be able to test the real behavior of your algorithms, they will only test the inputs and outputs of your algorithms.
To help you to deploy this service, this template comes with a Dockerfile.
To build the Docker image locally, you can use the following commands:
# First, download your project
git clone https://github.com/debiai/algo-provider-python-template.git
cd algo-provider-python-template
# Then, build the Docker image
docker build -t algo-provider-python-template .
Then, you can run the Docker image with the following command:
docker run -p 3020:3020 algo-provider-python-template
Make sure to adapt the project and image name to your algo-provider.
You can then manually push the image to the registry with the following command:
Let us know if you need help with this template by opening an issue on this repository.