sightline.simon.instance — Instance API

Resources

class sightline.simon.instance.Resources[source]
__init__(cpu_cores, ram, disk, gpu_count, shm)[source]

Constructor for Resources. This can be constructed directly and passed into other APIs that require resources to be passed in.

Parameters
  • cpu_cores (float) – The number of CPU cores to reserve

  • ram (float) – The amount of memory to reserve in Megabytes

  • disk (float) – The amount of ephemeral disk space to reserve in Megabytes

  • gpu_count (int) – The number of GPUs to reserve

  • shm (float) – The amount of shared memory to reserve in Megabytes

Return type

Resources

cpu_cores: float
ram: float
disk: float
gpu_count: int
shm: float

Instance

class sightline.simon.instance.Instance[source]

Attributes

  • Instance.id: str
  • Instance.name: str
  • Instance.description: str
  • Instance.tags: List[str]
  • Instance.created: datetime
  • Instance.parent: Servable
  • Instance.resources: Resources
  • Instance.config: Dict
  • Instance.ipv4_address: str
  • Instance.capabilities: List[Capability]
  • Instance.pending_capabilities: str
  • Instance.namespace: str
  • Instance.pod_name: str
  • Instance.outputs: Dict[str, V1Resource]

Class Methods

  • Instance.from_id(id)[source]

    A constructor for Instances, looks up the Instance from its id. Typically this would not be used directly, instead Instances would be found by interacting with the corresponding Servable.

    Classmethod

    Parameters

    id (str) –

    Return type

    Instance