From a0bf20f19ababa8b13d222df85e775a00b55f214 Mon Sep 17 00:00:00 2001 From: Ashwin Bharambe Date: Tue, 17 Sep 2024 12:55:01 -0700 Subject: [PATCH] Move control plane to distribution server for now --- llama_stack/apis/stack.py | 2 -- .../control_plane/__init__.py | 0 .../control_plane/adapters}/__init__.py | 0 .../control_plane/adapters}/redis/__init__.py | 0 .../control_plane/adapters}/redis/config.py | 0 .../control_plane/adapters}/redis/redis.py | 0 .../adapters/sqlite}/__init__.py | 0 .../control_plane/adapters/sqlite}/config.py | 0 .../adapters/sqlite}/control_plane.py | 0 .../control_plane/api.py} | 0 .../control_plane/registry.py} | 0 llama_stack/distribution/distribution.py | 2 -- .../llama-stack-spec.html | 28 +++++++++---------- .../llama-stack-spec.yaml | 16 +++++------ 14 files changed, 22 insertions(+), 26 deletions(-) rename llama_stack/{apis => distribution}/control_plane/__init__.py (100%) rename llama_stack/{providers/adapters/control_plane => distribution/control_plane/adapters}/__init__.py (100%) rename llama_stack/{providers/adapters/control_plane => distribution/control_plane/adapters}/redis/__init__.py (100%) rename llama_stack/{providers/adapters/control_plane => distribution/control_plane/adapters}/redis/config.py (100%) rename llama_stack/{providers/adapters/control_plane => distribution/control_plane/adapters}/redis/redis.py (100%) rename llama_stack/{providers/impls/sqlite/control_plane => distribution/control_plane/adapters/sqlite}/__init__.py (100%) rename llama_stack/{providers/impls/sqlite/control_plane => distribution/control_plane/adapters/sqlite}/config.py (100%) rename llama_stack/{providers/impls/sqlite/control_plane => distribution/control_plane/adapters/sqlite}/control_plane.py (100%) rename llama_stack/{apis/control_plane/control_plane.py => distribution/control_plane/api.py} (100%) rename llama_stack/{providers/registry/control_plane.py => distribution/control_plane/registry.py} (100%) diff --git a/llama_stack/apis/stack.py b/llama_stack/apis/stack.py index 226050679..f6c66d23b 100644 --- a/llama_stack/apis/stack.py +++ b/llama_stack/apis/stack.py @@ -6,7 +6,6 @@ from llama_models.llama3.api.datatypes import * # noqa: F403 from llama_stack.apis.agents import * # noqa: F403 -from llama_stack.apis.control_plane import * # noqa: F403 from llama_stack.apis.dataset import * # noqa: F403 from llama_stack.apis.evals import * # noqa: F403 from llama_stack.apis.inference import * # noqa: F403 @@ -22,7 +21,6 @@ from llama_stack.apis.safety import * # noqa: F403 class LlamaStack( Inference, BatchInference, - ControlPlane, Agents, RewardScoring, Safety, diff --git a/llama_stack/apis/control_plane/__init__.py b/llama_stack/distribution/control_plane/__init__.py similarity index 100% rename from llama_stack/apis/control_plane/__init__.py rename to llama_stack/distribution/control_plane/__init__.py diff --git a/llama_stack/providers/adapters/control_plane/__init__.py b/llama_stack/distribution/control_plane/adapters/__init__.py similarity index 100% rename from llama_stack/providers/adapters/control_plane/__init__.py rename to llama_stack/distribution/control_plane/adapters/__init__.py diff --git a/llama_stack/providers/adapters/control_plane/redis/__init__.py b/llama_stack/distribution/control_plane/adapters/redis/__init__.py similarity index 100% rename from llama_stack/providers/adapters/control_plane/redis/__init__.py rename to llama_stack/distribution/control_plane/adapters/redis/__init__.py diff --git a/llama_stack/providers/adapters/control_plane/redis/config.py b/llama_stack/distribution/control_plane/adapters/redis/config.py similarity index 100% rename from llama_stack/providers/adapters/control_plane/redis/config.py rename to llama_stack/distribution/control_plane/adapters/redis/config.py diff --git a/llama_stack/providers/adapters/control_plane/redis/redis.py b/llama_stack/distribution/control_plane/adapters/redis/redis.py similarity index 100% rename from llama_stack/providers/adapters/control_plane/redis/redis.py rename to llama_stack/distribution/control_plane/adapters/redis/redis.py diff --git a/llama_stack/providers/impls/sqlite/control_plane/__init__.py b/llama_stack/distribution/control_plane/adapters/sqlite/__init__.py similarity index 100% rename from llama_stack/providers/impls/sqlite/control_plane/__init__.py rename to llama_stack/distribution/control_plane/adapters/sqlite/__init__.py diff --git a/llama_stack/providers/impls/sqlite/control_plane/config.py b/llama_stack/distribution/control_plane/adapters/sqlite/config.py similarity index 100% rename from llama_stack/providers/impls/sqlite/control_plane/config.py rename to llama_stack/distribution/control_plane/adapters/sqlite/config.py diff --git a/llama_stack/providers/impls/sqlite/control_plane/control_plane.py b/llama_stack/distribution/control_plane/adapters/sqlite/control_plane.py similarity index 100% rename from llama_stack/providers/impls/sqlite/control_plane/control_plane.py rename to llama_stack/distribution/control_plane/adapters/sqlite/control_plane.py diff --git a/llama_stack/apis/control_plane/control_plane.py b/llama_stack/distribution/control_plane/api.py similarity index 100% rename from llama_stack/apis/control_plane/control_plane.py rename to llama_stack/distribution/control_plane/api.py diff --git a/llama_stack/providers/registry/control_plane.py b/llama_stack/distribution/control_plane/registry.py similarity index 100% rename from llama_stack/providers/registry/control_plane.py rename to llama_stack/distribution/control_plane/registry.py diff --git a/llama_stack/distribution/distribution.py b/llama_stack/distribution/distribution.py index 8bfa75d9c..13c96c3a5 100644 --- a/llama_stack/distribution/distribution.py +++ b/llama_stack/distribution/distribution.py @@ -9,7 +9,6 @@ import inspect from typing import Dict, List from llama_stack.apis.agents import Agents -from llama_stack.apis.control_plane import ControlPlane from llama_stack.apis.inference import Inference from llama_stack.apis.memory import Memory from llama_stack.apis.safety import Safety @@ -38,7 +37,6 @@ def api_endpoints() -> Dict[Api, List[ApiEndpoint]]: Api.agents: Agents, Api.memory: Memory, Api.telemetry: Telemetry, - Api.control_plane: ControlPlane, } for api, protocol in protocols.items(): diff --git a/rfcs/RFC-0001-llama-stack-assets/llama-stack-spec.html b/rfcs/RFC-0001-llama-stack-assets/llama-stack-spec.html index ed9f4c28e..d3f6f593b 100644 --- a/rfcs/RFC-0001-llama-stack-assets/llama-stack-spec.html +++ b/rfcs/RFC-0001-llama-stack-assets/llama-stack-spec.html @@ -21,7 +21,7 @@ "info": { "title": "[DRAFT] Llama Stack Specification", "version": "0.0.1", - "description": "This is the specification of the llama stack that provides\n a set of endpoints and their corresponding interfaces that are tailored to\n best leverage Llama Models. The specification is still in draft and subject to change.\n Generated at 2024-09-16 21:21:00.554769" + "description": "This is the specification of the llama stack that provides\n a set of endpoints and their corresponding interfaces that are tailored to\n best leverage Llama Models. The specification is still in draft and subject to change.\n Generated at 2024-09-17 12:55:45.538053" }, "servers": [ { @@ -5140,23 +5140,29 @@ } ], "tags": [ + { + "name": "Agents" + }, { "name": "Safety" }, { - "name": "Memory" + "name": "SyntheticDataGeneration" }, { - "name": "PostTraining" + "name": "Telemetry" + }, + { + "name": "Datasets" + }, + { + "name": "RewardScoring" }, { "name": "Evaluations" }, { - "name": "Agents" - }, - { - "name": "Datasets" + "name": "PostTraining" }, { "name": "Inference" @@ -5165,13 +5171,7 @@ "name": "BatchInference" }, { - "name": "Telemetry" - }, - { - "name": "SyntheticDataGeneration" - }, - { - "name": "RewardScoring" + "name": "Memory" }, { "name": "BuiltinTool", diff --git a/rfcs/RFC-0001-llama-stack-assets/llama-stack-spec.yaml b/rfcs/RFC-0001-llama-stack-assets/llama-stack-spec.yaml index df44edd7f..e96142b00 100644 --- a/rfcs/RFC-0001-llama-stack-assets/llama-stack-spec.yaml +++ b/rfcs/RFC-0001-llama-stack-assets/llama-stack-spec.yaml @@ -2356,7 +2356,7 @@ info: description: "This is the specification of the llama stack that provides\n \ \ a set of endpoints and their corresponding interfaces that are tailored\ \ to\n best leverage Llama Models. The specification is still in\ - \ draft and subject to change.\n Generated at 2024-09-16 21:21:00.554769" + \ draft and subject to change.\n Generated at 2024-09-17 12:55:45.538053" title: '[DRAFT] Llama Stack Specification' version: 0.0.1 jsonSchemaDialect: https://json-schema.org/draft/2020-12/schema @@ -3144,17 +3144,17 @@ security: servers: - url: http://any-hosted-llama-stack.com tags: -- name: Safety -- name: Memory -- name: PostTraining -- name: Evaluations - name: Agents +- name: Safety +- name: SyntheticDataGeneration +- name: Telemetry - name: Datasets +- name: RewardScoring +- name: Evaluations +- name: PostTraining - name: Inference - name: BatchInference -- name: Telemetry -- name: SyntheticDataGeneration -- name: RewardScoring +- name: Memory - description: name: BuiltinTool - description: