class verta.endpoint.resources.Resources(cpu=None, memory=None, nvidia_gpu=None)

Kubernetes computational resources allowed for an endpoint’s model, to be passed to Endpoint.update().

New in version 0.24.1: The nvidia_gpu parameter.

The JSON equivalent for this is:

    "resources": {"cpu": 0.25, "memory": "512Mi"}
  • cpu (float > 0) – CPU cores allowed for an endpoint’s model.

  • memory (str) –

    Memory allowed for an endpoint’s model. Expects the same representation as Kubernetes:

    You can express memory as a plain integer or as a fixed-point integer using one of these suffixes: E, P, T, G, M, K. You can also use the power-of-two equivalents: Ei, Pi, Ti, Gi, Mi, Ki. For example, the following represent roughly the same value: 128974848, 129e6, 129M, 123Mi.

  • nvidia_gpu (NvidiaGPU, optional) – Nvidia GPU resources allowed for an endpoint’s model.


from verta.endpoint.resources import Resources, NvidiaGPU, NvidiaGPUModel
resources = Resources(cpu=.25, memory="512Mi", nvidia_gpu=NvidiaGPU(1, NvidiaGPUModel.V100)