mirror of
https://github.com/exo-explore/exo.git
synced 2026-06-26 06:35:49 -04:00
29 lines
1.0 KiB
Python
29 lines
1.0 KiB
Python
from typing import Protocol
|
|
|
|
from shared.types.models.common import Model, ModelId
|
|
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) -> Model: ...
|
|
|
|
def download_model(self, model_id: ModelId, model_source: ModelSource) -> None: ...
|
|
|
|
def get_download_progress(self, model_id: ModelId) -> DownloadProgress: ...
|