Skip to content

Python module that makes it easier to start an algo-provider without the need of Docker and any developer skills.

License

Notifications You must be signed in to change notification settings

debiai/easy-algo-provider

Repository files navigation

Algo Provider Python module

License

This Algo-Provider Python module allows you to easily deploy your own algorithm through the Algo Provider API.

What is an Algo Provider?

An Algo Provider is a service that provides algorithms to be used by different applications such as DebiAI or any other application that uses the Algo Provider API.

Creating an algo-provider requires to create a server, it requires some skills and a lot of time.

The goal of this project is to create a new solution that makes it easier to start an algo-provider, without the need for Docker or advanced developer skills. The targets are Data Scientists that want to use their algorithms with DebiAI.

Getting started

Install the module with pip:

pip install algo-provider

Then, create a Python file with the following content:

# First define your algorithm following a strict docstring format
def my_algo1(input1: int, input2: int) -> int:
    """
    This is a simple algorithm that adds two numbers together.

    Parameters:
        input1 (int): The first number to add.
        input2 (int): The second number to add.

    Returns:
        int: The sum of the two numbers.
    """
    return input1 + input2

# Then create an AlgoProvider object and add your algorithm to it
from algo_provider import AlgoProvider
provider = AlgoProvider()
provider.add_algo(my_algo1)

# Finally, start the server
provider.start_server()

Run the Python file and your algorithm is now available through the Algo Provider API!

Expected output

The content of the docstring will be used to generate Algo descriptions in the DebiAI interface, and the function will be called with the parameters provided by the user. The return value will be sent back to the user and displayed in the DebiAI interface.

Parameters

You can specify the following parameters when adding an algorithm:

provider.add_algo(
    my_algo_3,
    author="DebiAI",
    version="1.0.0",
    creation_date="2024-01-01",
    update_date="2024-01-01",
    tags=["Math", "Addition"],
)

About

Python module that makes it easier to start an algo-provider without the need of Docker and any developer skills.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages