mirror of
https://github.com/exo-explore/exo.git
synced 2026-06-26 14:45:50 -04:00
27 lines
922 B
Python
27 lines
922 B
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 Topology
|
|
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_topology(self) -> Topology: ...
|
|
|
|
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: ...
|