Skip to content

SebastianScherer88/bettmensch.ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🏨 Welcome to Bettmensch.AI

bettmensch.ai logo

Bettmensch.AI is a Kubernetes native open source platform for GitOps based ML workloads that allows for tight CI and CD integrations.

Setup

🌉 AWS Infrastructure & Kubernetes

To provision

  • the S3 bucket for the Argo Workflows artifact repository
  • Karpenter required infrastructure (IAM, message queues, etc.)
  • a working EKS cluster
  • the configured Karpenter, Argo Workflows & Volcano kubernetes installations on the cluster,
make infrastructure.build

To port forward to the ArgoWorkflow server running on EKS, run:

make kubernetes.connect

When you're done, you can tear down the stack by running

make infrastructure.destroy

💻 Dashboard

To build the bettmensch.ai's custom dashboard's docker image, run:

make dashboard.build

To run the dashboard, run:

make dashboard.run

See the docker section for more details.

📚 Python SDK installation

To install the python library bettmensch_ai with torch-pipelines support, run

make sdk.install EXTRAS=torch-pipelines

from the repository's top directory.

You can now start authoring Pipelines and start submitting Flows and start monitoring them on both the ArgoWorkflow as well as the bettmensch.ai dashboards.

Features (under active development )

💻 Dashboard

bettmensch.ai

👀 A dashboard for monitoring all workloads running on the platform.

👐 To actively manage Pipelines, Flows, please see the respective documentation of bettmensch.ai SDK.

🔀 Pipelines & Flows

bettmensch.ai comes with a python SDK for defining and executing distributed (ML) workloads by leveraging the ArgoWorkflows framework and the official hera library.

The io module implements the classes implementing the transfer of inputs and outputs between a workfload's components.

Using InputParameter and OutputParameter for int, float or str type data:

from bettmensch_ai.io import InputParameter, OutputParameter
from bettmensch_ai.components import component
from bettmensch_ai.pipelines import pipeline

@component
def add(
    a: InputParameter = 1,
    b: InputParameter = 2,
    sum: OutputParameter = None,
) -> None:

    sum.assign(a + b)

@pipeline("test-parameter-pipeline", "argo", True)
def a_plus_b_plus_2(a: InputParameter = 1, b: InputParameter = 2) -> None:
    a_plus_b = add(
        "a-plus-b",
        a=a,
        b=b,
    )

    a_plus_b_plus_2 = add(
        "a-plus-b-plus-2",
        a=a_plus_b.outputs["sum"],
        b=InputParameter("two", 2),
    )

a_plus_b_plus_2.export(test_output_dir)
a_plus_b_plus_2.register()
a_plus_b_plus_2.run(a=3, b=2)

Using InputArtifact and OutputArtifact for all other types of data, leveraging AWS's S3 storage service:

from bettmensch_ai.io import InputArtifact, OutputArtifact
from bettmensch_ai.components import component
from bettmensch_ai.pipelines import pipeline

@component
def convert_to_artifact(
    a_param: InputParameter,
    a_art: OutputArtifact = None,
) -> None:

    with open(a_art.path, "w") as a_art_file:
        a_art_file.write(str(a_param))

@component
def show_artifact(a: InputArtifact) -> None:

    with open(a.path, "r") as a_art_file:
        a_content = a_art_file.read()

    print(f"Content of input artifact a: {a_content}")

@pipeline("test-artifact-pipeline", "argo", True)
def parameter_to_artifact(
    a: InputParameter = "Param A",
) -> None:
    convert = convert_to_artifact(
        "convert-to-artifact",
        a_param=a,
    )

    show = show_artifact(
        "show-artifact",
        a=convert.outputs["a_art"],
    )

parameter_to_artifact.export(test_output_dir)
parameter_to_artifact.register()
parameter_to_artifact.run(a="Test value A")

NOTE: For more examples (including cross K8s node CPU and GPU torch.distributed processes), see this repository's integration test and k8s test sections.

The submitted pipelines can be viewed on the dashboard's Pipelines section:

bettmensch.ai pipelines

The executed flows can be viewed on the dashboard's Flows section:

bettmensch.ai flows

The following sequence diagram illustrates how the creation, registration and running of Pipeline's is supported by the infrastructure stack initiated in the Setup section: BettmenschAI - Sequence diagram

📚 Models

bettmensch.ai models

Coming soon.

🚀 Servers

bettmensch.ai servers

Coming soon.

Credits

This platform makes liberal use of various great open source projects:

About

An open source platform for GitOps based ML workloads

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published