Description of image

clusters

list

List your team clusters

Examples

gradient clusters list
curl -g -X GET 'https://api.paperspace.io/clusters/getClusters?filter={"limit": 20, "offset": 0, "where": {"isPrivate": true}}' \
-H 'x-api-key: d44808a2785d6a...'
from gradient import ClustersClient

api_key = 'd44808a2785d6a...'

clusters_client = ClustersClient(api_key)

print(clusters_client.list())

Options

Name Type Attributes Description
--limit integer optional Limit listed clusters per page
--offset integer optional Offset value
--apiKey string optional API key to use this time only
--optionsFile string optional Path to YAML file with predefined options
--createOptionsFile string optional Generate template options file

Response

+-----------+------------------+----------------------------+
| ID        | Name             | Type                       |
+-----------+------------------+----------------------------+
| cl9w..... | demo-cluster     | Kubernetes Processing Site |
+-----------+------------------+----------------------------+
[
  {
    id: "cl9w.....",
    name: "demo-cluster",
    type: "Kubernetes Processing Site",
    region: "private",
    cloud: "paperspace-cloud",
    teamId: "tewr3st2z",
    isDefault: false,
    dtCreated: "2020-04-22T20:39:24.004Z",
    dtModified: "2021-07-16T21:02:47.433Z",
    ...
  },
]
[
  Cluster(
    (id = "cl9w....."),
    (name = "demo-cluster"),
    (type = "Kubernetes Processing Site")
  ),
];

machineTypes list

List available machine types

Examples

gradient clusters machineTypes list
curl -X GET 'https://api.paperspace.io/vmTypes/getVmTypesByClusters' \
-H 'x-api-key: d44808a2785d6a...'
from gradient import MachineTypesClient

api_key = 'd44808a2785d6a...'

machineTypes_client = MachineTypesClient(api_key)

print(machineTypes_client.list())

Options

Name Type Attributes Description
--clusterId string optional Filter machine types by cluster ID
--apiKey string optional API key to use this time only
--optionsFile string optional Path to YAML file with predefined options
--createOptionsFile string optional Generate template options file

Response

+-------------+--------------+-----------+--------------+-----------+--------------+--------------------------------------------+
| Name        | Kind         | CPU Count | RAM [Bytes]  | GPU Count | GPU Model    | Clusters                                   |
+-------------+--------------+-----------+--------------+-----------+--------------+--------------------------------------------+
| P4000       | p4000        | 8         | 32212254720  | 1         | Quadro P4000 | cl9w.....                                  |
| P5000       | p5000        | 8         | 32212254720  | 1         | Quadro P5000 | cl9w.....                                  |
| V100        | v100         | 8         | 32212254720  | 1         | Tesla V100   | cl9w.....                                  |
+-------------+--------------+-----------+--------------+-----------+--------------+--------------------------------------------+
[
  VmType(
    (label = "P4000"),
    (kind = "p4000"),
    (cpu_count = 8),
    (ram_in_bytes = 32212254720),
    (gpu_count = 1),
    (gpu_model = VmTypeGpuModel(
      (label = "Quadro P4000"),
      (model = "passthrough"),
      (memory_in_bytes = 8589934592)
    )),
    (is_preemptible = False),
    (deployment_type = "gpu"),
    (deployment_size = "small"),
    (clusters = ["cl9w....."])
  ),
  VmType(
    (label = "P5000"),
    (kind = "p5000"),
    (cpu_count = 8),
    (ram_in_bytes = 32212254720),
    (gpu_count = 1),
    (gpu_model = VmTypeGpuModel(
      (label = "Quadro P5000"),
      (model = "passthrough"),
      (memory_in_bytes = 17179869184)
    )),
    (is_preemptible = False),
    (deployment_type = "gpu"),
    (deployment_size = "medium"),
    (clusters = ["cl92....."])
  ),
  VmType(
    (label = "V100"),
    (kind = "v100"),
    (cpu_count = 8),
    (ram_in_bytes = 32212254720),
    (gpu_count = 1),
    (gpu_model = VmTypeGpuModel(
      (label = "Tesla V100"),
      (model = "passthrough"),
      (memory_in_bytes = 17179869184)
    )),
    (is_preemptible = False),
    (deployment_type = "gpu"),
    (deployment_size = "large"),
    (clusters = ["cl9w....."])
  ),
];
[
  VmType(
    (label = "P4000"),
    (kind = "p4000"),
    (cpu_count = 8),
    (ram_in_bytes = 32212254720),
    (gpu_count = 1),
    (gpu_model = VmTypeGpuModel(
      (label = "Quadro P4000"),
      (model = "passthrough"),
      (memory_in_bytes = 8589934592)
    )),
    (is_preemptible = False),
    (deployment_type = "gpu"),
    (deployment_size = "small"),
    (clusters = ["cl9w....."])
  ),
  VmType(
    (label = "P5000"),
    (kind = "p5000"),
    (cpu_count = 8),
    (ram_in_bytes = 32212254720),
    (gpu_count = 1),
    (gpu_model = VmTypeGpuModel(
      (label = "Quadro P5000"),
      (model = "passthrough"),
      (memory_in_bytes = 17179869184)
    )),
    (is_preemptible = False),
    (deployment_type = "gpu"),
    (deployment_size = "medium"),
    (clusters = ["cl92....."])
  ),
  VmType(
    (label = "V100"),
    (kind = "v100"),
    (cpu_count = 8),
    (ram_in_bytes = 32212254720),
    (gpu_count = 1),
    (gpu_model = VmTypeGpuModel(
      (label = "Tesla V100"),
      (model = "passthrough"),
      (memory_in_bytes = 17179869184)
    )),
    (is_preemptible = False),
    (deployment_type = "gpu"),
    (deployment_size = "large"),
    (clusters = ["cl9w....."])
  ),
];