24-05-24 OPEA-001 Code Structureยถ

Authorยถ

ftian1, lvliang-intel, hshen14

Statusยถ

Under Review

Objectiveยถ

Define a clear criteria and rule of adding new codes into OPEA projects.

Motivationยถ

OPEA project consists of serveral repos, including GenAIExamples, GenAIInfra, GenAICompos, and so on. We need a clear definition on where the new code for a given feature should be put for a consistent and well-orgnized code structure.

Design Proposalยถ

The proposed code structure of GenAIInfra is:

GenAIInfra/
โ”œโ”€โ”€ kubernetes-addon/        # the folder implementing additional operational capabilities to Kubernetes applications
โ”œโ”€โ”€ microservices-connector/ # the folder containing the implementation of microservice connector on Kubernetes
โ””โ”€โ”€ scripts/

The proposed code structure of GenAIExamples is:

GenAIExamples/
โ””โ”€โ”€ ChatQnA/
    โ”œโ”€โ”€ kubernetes/
    โ”‚   โ”œโ”€โ”€ manifests
    โ”‚   โ””โ”€โ”€ microservices-connector
    โ”œโ”€โ”€ docker/
    โ”‚   โ”œโ”€โ”€ docker_compose.yaml
    โ”‚   โ”œโ”€โ”€ dockerfile
    โ”‚   โ””โ”€โ”€ chatqna.py
    โ”œโ”€โ”€ chatqna.yaml    # The MegaService Yaml
    โ””โ”€โ”€ README.md

The proposed code structure of GenAIComps is:

GenAIComps/
โ””โ”€โ”€ comps/
    โ””โ”€โ”€ llms/
        โ”œโ”€โ”€ text-generation/
        โ”‚   โ”œโ”€โ”€ tgi-gaudi/
        โ”‚   โ”‚   โ”œโ”€โ”€ dockerfile
        โ”‚   โ”‚   โ””โ”€โ”€ llm.py
        โ”‚   โ”œโ”€โ”€ tgi-xeon/
        โ”‚   โ”‚   โ”œโ”€โ”€ dockerfile
        โ”‚   โ”‚   โ””โ”€โ”€ llm.py
        โ”‚   โ”œโ”€โ”€ vllm-gaudi
        โ”‚   โ”œโ”€โ”€ ray
        โ”‚   โ””โ”€โ”€ langchain
        โ””โ”€โ”€ text-summarization/

Miscsยถ

n/a