mirror of
https://github.com/exo-explore/exo.git
synced 2026-04-26 16:58:32 -04:00
Co-authored-by: Alex Cheema <alexcheema123@gmail.com> Co-authored-by: Seth Howes <sethshowes@gmail.com> Co-authored-by: Matt Beton <matthew.beton@gmail.com> Co-authored-by: Andrei Cravtov <the.andrei.cravtov@gmail.com>
30 lines
1.1 KiB
Python
30 lines
1.1 KiB
Python
from typing import Protocol
|
|
|
|
from shared.types.models.common import ModelId
|
|
from shared.types.models.model import ModelInfo
|
|
from shared.types.models.sources import ModelSource
|
|
from shared.types.networking.topology import ControlPlaneTopology, DataPlaneTopology
|
|
from shared.types.worker.common import InstanceId
|
|
from shared.types.worker.downloads import DownloadProgress
|
|
from shared.types.worker.instances import Instance
|
|
|
|
|
|
class ControlPlaneAPI(Protocol):
|
|
def get_control_plane_topology(self) -> ControlPlaneTopology: ...
|
|
|
|
def get_data_plane_topology(self) -> DataPlaneTopology: ...
|
|
|
|
def list_instances(self) -> list[Instance]: ...
|
|
|
|
def get_instance(self, instance_id: InstanceId) -> Instance: ...
|
|
|
|
def create_instance(self, model_id: ModelId) -> InstanceId: ...
|
|
|
|
def remove_instance(self, instance_id: InstanceId) -> None: ...
|
|
|
|
def get_model_data(self, model_id: ModelId) -> ModelInfo: ...
|
|
|
|
def download_model(self, model_id: ModelId, model_source: ModelSource) -> None: ...
|
|
|
|
def get_download_progress(self, model_id: ModelId) -> DownloadProgress: ...
|