lightning-sdk 2025.8.21__py3-none-any.whl → 2025.8.28__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- lightning_sdk/__init__.py +1 -1
- lightning_sdk/api/studio_api.py +69 -2
- lightning_sdk/api/teamspace_api.py +60 -30
- lightning_sdk/api/user_api.py +49 -1
- lightning_sdk/api/utils.py +1 -1
- lightning_sdk/cli/config/set.py +6 -18
- lightning_sdk/cli/legacy/create.py +3 -3
- lightning_sdk/cli/legacy/delete.py +3 -3
- lightning_sdk/cli/legacy/deploy/_auth.py +4 -4
- lightning_sdk/cli/legacy/download.py +7 -7
- lightning_sdk/cli/legacy/job_and_mmt_action.py +4 -4
- lightning_sdk/cli/legacy/list.py +9 -9
- lightning_sdk/cli/legacy/open.py +3 -3
- lightning_sdk/cli/legacy/upload.py +3 -3
- lightning_sdk/cli/studio/create.py +16 -24
- lightning_sdk/cli/studio/delete.py +28 -27
- lightning_sdk/cli/studio/list.py +29 -15
- lightning_sdk/cli/studio/ssh.py +19 -22
- lightning_sdk/cli/studio/start.py +25 -25
- lightning_sdk/cli/studio/stop.py +25 -28
- lightning_sdk/cli/studio/switch.py +21 -24
- lightning_sdk/cli/utils/resolve.py +1 -1
- lightning_sdk/cli/utils/richt_print.py +24 -0
- lightning_sdk/cli/utils/save_to_config.py +27 -0
- lightning_sdk/cli/utils/studio_selection.py +106 -0
- lightning_sdk/cli/utils/teamspace_selection.py +125 -0
- lightning_sdk/lightning_cloud/openapi/__init__.py +2 -0
- lightning_sdk/lightning_cloud/openapi/api/billing_service_api.py +85 -0
- lightning_sdk/lightning_cloud/openapi/api/k8_s_cluster_service_api.py +101 -0
- lightning_sdk/lightning_cloud/openapi/models/__init__.py +2 -0
- lightning_sdk/lightning_cloud/openapi/models/externalv1_user_status.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_cluster_metrics.py +270 -36
- lightning_sdk/lightning_cloud/openapi/models/v1_container_metrics.py +21 -21
- lightning_sdk/lightning_cloud/openapi/models/v1_list_cluster_metric_timestamps_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_namespace_metrics.py +11 -11
- lightning_sdk/lightning_cloud/openapi/models/v1_namespace_user_metrics.py +16 -16
- lightning_sdk/lightning_cloud/openapi/models/v1_node_metrics.py +156 -26
- lightning_sdk/lightning_cloud/openapi/models/v1_pod_metrics.py +145 -41
- lightning_sdk/lightning_cloud/openapi/models/v1_purchase_annual_upsell_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_storage_asset.py +107 -3
- lightning_sdk/llm/public_assistants.py +4 -0
- lightning_sdk/studio.py +54 -22
- lightning_sdk/teamspace.py +25 -2
- lightning_sdk/user.py +19 -1
- lightning_sdk/utils/config.py +6 -0
- lightning_sdk/utils/names.py +1179 -0
- lightning_sdk/utils/progress.py +2 -2
- lightning_sdk/utils/resolve.py +17 -6
- {lightning_sdk-2025.8.21.dist-info → lightning_sdk-2025.8.28.dist-info}/METADATA +1 -1
- {lightning_sdk-2025.8.21.dist-info → lightning_sdk-2025.8.28.dist-info}/RECORD +54 -48
- {lightning_sdk-2025.8.21.dist-info → lightning_sdk-2025.8.28.dist-info}/LICENSE +0 -0
- {lightning_sdk-2025.8.21.dist-info → lightning_sdk-2025.8.28.dist-info}/WHEEL +0 -0
- {lightning_sdk-2025.8.21.dist-info → lightning_sdk-2025.8.28.dist-info}/entry_points.txt +0 -0
- {lightning_sdk-2025.8.21.dist-info → lightning_sdk-2025.8.28.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
external/v1/auth_service.proto
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
|
|
7
|
+
|
|
8
|
+
OpenAPI spec version: version not set
|
|
9
|
+
|
|
10
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
11
|
+
|
|
12
|
+
NOTE
|
|
13
|
+
----
|
|
14
|
+
standard swagger-codegen-cli for this python client has been modified
|
|
15
|
+
by custom templates. The purpose of these templates is to include
|
|
16
|
+
typing information in the API and Model code. Please refer to the
|
|
17
|
+
main grid repository for more info
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
import pprint
|
|
21
|
+
import re # noqa: F401
|
|
22
|
+
|
|
23
|
+
from typing import TYPE_CHECKING
|
|
24
|
+
|
|
25
|
+
import six
|
|
26
|
+
|
|
27
|
+
if TYPE_CHECKING:
|
|
28
|
+
from datetime import datetime
|
|
29
|
+
from lightning_sdk.lightning_cloud.openapi.models import *
|
|
30
|
+
|
|
31
|
+
class V1ListClusterMetricTimestampsResponse(object):
|
|
32
|
+
"""NOTE: This class is auto generated by the swagger code generator program.
|
|
33
|
+
|
|
34
|
+
Do not edit the class manually.
|
|
35
|
+
"""
|
|
36
|
+
"""
|
|
37
|
+
Attributes:
|
|
38
|
+
swagger_types (dict): The key is attribute name
|
|
39
|
+
and the value is attribute type.
|
|
40
|
+
attribute_map (dict): The key is attribute name
|
|
41
|
+
and the value is json key in definition.
|
|
42
|
+
"""
|
|
43
|
+
swagger_types = {
|
|
44
|
+
'timestamps': 'list[datetime]'
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
attribute_map = {
|
|
48
|
+
'timestamps': 'timestamps'
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
def __init__(self, timestamps: 'list[datetime]' =None): # noqa: E501
|
|
52
|
+
"""V1ListClusterMetricTimestampsResponse - a model defined in Swagger""" # noqa: E501
|
|
53
|
+
self._timestamps = None
|
|
54
|
+
self.discriminator = None
|
|
55
|
+
if timestamps is not None:
|
|
56
|
+
self.timestamps = timestamps
|
|
57
|
+
|
|
58
|
+
@property
|
|
59
|
+
def timestamps(self) -> 'list[datetime]':
|
|
60
|
+
"""Gets the timestamps of this V1ListClusterMetricTimestampsResponse. # noqa: E501
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
:return: The timestamps of this V1ListClusterMetricTimestampsResponse. # noqa: E501
|
|
64
|
+
:rtype: list[datetime]
|
|
65
|
+
"""
|
|
66
|
+
return self._timestamps
|
|
67
|
+
|
|
68
|
+
@timestamps.setter
|
|
69
|
+
def timestamps(self, timestamps: 'list[datetime]'):
|
|
70
|
+
"""Sets the timestamps of this V1ListClusterMetricTimestampsResponse.
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
:param timestamps: The timestamps of this V1ListClusterMetricTimestampsResponse. # noqa: E501
|
|
74
|
+
:type: list[datetime]
|
|
75
|
+
"""
|
|
76
|
+
|
|
77
|
+
self._timestamps = timestamps
|
|
78
|
+
|
|
79
|
+
def to_dict(self) -> dict:
|
|
80
|
+
"""Returns the model properties as a dict"""
|
|
81
|
+
result = {}
|
|
82
|
+
|
|
83
|
+
for attr, _ in six.iteritems(self.swagger_types):
|
|
84
|
+
value = getattr(self, attr)
|
|
85
|
+
if isinstance(value, list):
|
|
86
|
+
result[attr] = list(map(
|
|
87
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
88
|
+
value
|
|
89
|
+
))
|
|
90
|
+
elif hasattr(value, "to_dict"):
|
|
91
|
+
result[attr] = value.to_dict()
|
|
92
|
+
elif isinstance(value, dict):
|
|
93
|
+
result[attr] = dict(map(
|
|
94
|
+
lambda item: (item[0], item[1].to_dict())
|
|
95
|
+
if hasattr(item[1], "to_dict") else item,
|
|
96
|
+
value.items()
|
|
97
|
+
))
|
|
98
|
+
else:
|
|
99
|
+
result[attr] = value
|
|
100
|
+
if issubclass(V1ListClusterMetricTimestampsResponse, dict):
|
|
101
|
+
for key, value in self.items():
|
|
102
|
+
result[key] = value
|
|
103
|
+
|
|
104
|
+
return result
|
|
105
|
+
|
|
106
|
+
def to_str(self) -> str:
|
|
107
|
+
"""Returns the string representation of the model"""
|
|
108
|
+
return pprint.pformat(self.to_dict())
|
|
109
|
+
|
|
110
|
+
def __repr__(self) -> str:
|
|
111
|
+
"""For `print` and `pprint`"""
|
|
112
|
+
return self.to_str()
|
|
113
|
+
|
|
114
|
+
def __eq__(self, other: 'V1ListClusterMetricTimestampsResponse') -> bool:
|
|
115
|
+
"""Returns true if both objects are equal"""
|
|
116
|
+
if not isinstance(other, V1ListClusterMetricTimestampsResponse):
|
|
117
|
+
return False
|
|
118
|
+
|
|
119
|
+
return self.__dict__ == other.__dict__
|
|
120
|
+
|
|
121
|
+
def __ne__(self, other: 'V1ListClusterMetricTimestampsResponse') -> bool:
|
|
122
|
+
"""Returns true if both objects are not equal"""
|
|
123
|
+
return not self == other
|
|
@@ -55,9 +55,9 @@ class V1NamespaceMetrics(object):
|
|
|
55
55
|
'num_unknown_pods': 'int',
|
|
56
56
|
'ram_util_over_cluster': 'float',
|
|
57
57
|
'ram_util_over_requested': 'float',
|
|
58
|
-
'rams_requested': '
|
|
58
|
+
'rams_requested': 'str',
|
|
59
59
|
'timestamp': 'datetime',
|
|
60
|
-
'vram_requested': '
|
|
60
|
+
'vram_requested': 'int',
|
|
61
61
|
'vram_util_over_cluster': 'float',
|
|
62
62
|
'vram_util_over_requested': 'float'
|
|
63
63
|
}
|
|
@@ -84,7 +84,7 @@ class V1NamespaceMetrics(object):
|
|
|
84
84
|
'vram_util_over_requested': 'vramUtilOverRequested'
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
def __init__(self, cpu_util_over_cluster: 'float' =None, cpu_util_over_requested: 'float' =None, cpus_requested: 'float' =None, gpu_util_over_cluster: 'float' =None, gpu_util_over_requested: 'float' =None, gpus_requested: 'float' =None, name: 'str' =None, num_failed_pods: 'int' =None, num_pending_pods: 'int' =None, num_running_pods: 'int' =None, num_succeeded_pods: 'int' =None, num_unknown_pods: 'int' =None, ram_util_over_cluster: 'float' =None, ram_util_over_requested: 'float' =None, rams_requested: '
|
|
87
|
+
def __init__(self, cpu_util_over_cluster: 'float' =None, cpu_util_over_requested: 'float' =None, cpus_requested: 'float' =None, gpu_util_over_cluster: 'float' =None, gpu_util_over_requested: 'float' =None, gpus_requested: 'float' =None, name: 'str' =None, num_failed_pods: 'int' =None, num_pending_pods: 'int' =None, num_running_pods: 'int' =None, num_succeeded_pods: 'int' =None, num_unknown_pods: 'int' =None, ram_util_over_cluster: 'float' =None, ram_util_over_requested: 'float' =None, rams_requested: 'str' =None, timestamp: 'datetime' =None, vram_requested: 'int' =None, vram_util_over_cluster: 'float' =None, vram_util_over_requested: 'float' =None): # noqa: E501
|
|
88
88
|
"""V1NamespaceMetrics - a model defined in Swagger""" # noqa: E501
|
|
89
89
|
self._cpu_util_over_cluster = None
|
|
90
90
|
self._cpu_util_over_requested = None
|
|
@@ -440,22 +440,22 @@ class V1NamespaceMetrics(object):
|
|
|
440
440
|
self._ram_util_over_requested = ram_util_over_requested
|
|
441
441
|
|
|
442
442
|
@property
|
|
443
|
-
def rams_requested(self) -> '
|
|
443
|
+
def rams_requested(self) -> 'str':
|
|
444
444
|
"""Gets the rams_requested of this V1NamespaceMetrics. # noqa: E501
|
|
445
445
|
|
|
446
446
|
|
|
447
447
|
:return: The rams_requested of this V1NamespaceMetrics. # noqa: E501
|
|
448
|
-
:rtype:
|
|
448
|
+
:rtype: str
|
|
449
449
|
"""
|
|
450
450
|
return self._rams_requested
|
|
451
451
|
|
|
452
452
|
@rams_requested.setter
|
|
453
|
-
def rams_requested(self, rams_requested: '
|
|
453
|
+
def rams_requested(self, rams_requested: 'str'):
|
|
454
454
|
"""Sets the rams_requested of this V1NamespaceMetrics.
|
|
455
455
|
|
|
456
456
|
|
|
457
457
|
:param rams_requested: The rams_requested of this V1NamespaceMetrics. # noqa: E501
|
|
458
|
-
:type:
|
|
458
|
+
:type: str
|
|
459
459
|
"""
|
|
460
460
|
|
|
461
461
|
self._rams_requested = rams_requested
|
|
@@ -482,22 +482,22 @@ class V1NamespaceMetrics(object):
|
|
|
482
482
|
self._timestamp = timestamp
|
|
483
483
|
|
|
484
484
|
@property
|
|
485
|
-
def vram_requested(self) -> '
|
|
485
|
+
def vram_requested(self) -> 'int':
|
|
486
486
|
"""Gets the vram_requested of this V1NamespaceMetrics. # noqa: E501
|
|
487
487
|
|
|
488
488
|
|
|
489
489
|
:return: The vram_requested of this V1NamespaceMetrics. # noqa: E501
|
|
490
|
-
:rtype:
|
|
490
|
+
:rtype: int
|
|
491
491
|
"""
|
|
492
492
|
return self._vram_requested
|
|
493
493
|
|
|
494
494
|
@vram_requested.setter
|
|
495
|
-
def vram_requested(self, vram_requested: '
|
|
495
|
+
def vram_requested(self, vram_requested: 'int'):
|
|
496
496
|
"""Sets the vram_requested of this V1NamespaceMetrics.
|
|
497
497
|
|
|
498
498
|
|
|
499
499
|
:param vram_requested: The vram_requested of this V1NamespaceMetrics. # noqa: E501
|
|
500
|
-
:type:
|
|
500
|
+
:type: int
|
|
501
501
|
"""
|
|
502
502
|
|
|
503
503
|
self._vram_requested = vram_requested
|
|
@@ -44,16 +44,16 @@ class V1NamespaceUserMetrics(object):
|
|
|
44
44
|
'cpu_utilisation': 'float',
|
|
45
45
|
'failed_pods': 'int',
|
|
46
46
|
'gpu_utilisation': 'float',
|
|
47
|
-
'num_cpus': '
|
|
47
|
+
'num_cpus': 'int',
|
|
48
48
|
'num_gpus': 'int',
|
|
49
49
|
'pending_pods': 'int',
|
|
50
|
-
'ram_used': '
|
|
50
|
+
'ram_used': 'int',
|
|
51
51
|
'running_pods': 'int',
|
|
52
52
|
'succeeded_pods': 'int',
|
|
53
53
|
'timestamp': 'datetime',
|
|
54
54
|
'total_pods': 'int',
|
|
55
55
|
'unknown_pods': 'int',
|
|
56
|
-
'vram_used': '
|
|
56
|
+
'vram_used': 'int'
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
attribute_map = {
|
|
@@ -72,7 +72,7 @@ class V1NamespaceUserMetrics(object):
|
|
|
72
72
|
'vram_used': 'vramUsed'
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
def __init__(self, cpu_utilisation: 'float' =None, failed_pods: 'int' =None, gpu_utilisation: 'float' =None, num_cpus: '
|
|
75
|
+
def __init__(self, cpu_utilisation: 'float' =None, failed_pods: 'int' =None, gpu_utilisation: 'float' =None, num_cpus: 'int' =None, num_gpus: 'int' =None, pending_pods: 'int' =None, ram_used: 'int' =None, running_pods: 'int' =None, succeeded_pods: 'int' =None, timestamp: 'datetime' =None, total_pods: 'int' =None, unknown_pods: 'int' =None, vram_used: 'int' =None): # noqa: E501
|
|
76
76
|
"""V1NamespaceUserMetrics - a model defined in Swagger""" # noqa: E501
|
|
77
77
|
self._cpu_utilisation = None
|
|
78
78
|
self._failed_pods = None
|
|
@@ -179,22 +179,22 @@ class V1NamespaceUserMetrics(object):
|
|
|
179
179
|
self._gpu_utilisation = gpu_utilisation
|
|
180
180
|
|
|
181
181
|
@property
|
|
182
|
-
def num_cpus(self) -> '
|
|
182
|
+
def num_cpus(self) -> 'int':
|
|
183
183
|
"""Gets the num_cpus of this V1NamespaceUserMetrics. # noqa: E501
|
|
184
184
|
|
|
185
185
|
|
|
186
186
|
:return: The num_cpus of this V1NamespaceUserMetrics. # noqa: E501
|
|
187
|
-
:rtype:
|
|
187
|
+
:rtype: int
|
|
188
188
|
"""
|
|
189
189
|
return self._num_cpus
|
|
190
190
|
|
|
191
191
|
@num_cpus.setter
|
|
192
|
-
def num_cpus(self, num_cpus: '
|
|
192
|
+
def num_cpus(self, num_cpus: 'int'):
|
|
193
193
|
"""Sets the num_cpus of this V1NamespaceUserMetrics.
|
|
194
194
|
|
|
195
195
|
|
|
196
196
|
:param num_cpus: The num_cpus of this V1NamespaceUserMetrics. # noqa: E501
|
|
197
|
-
:type:
|
|
197
|
+
:type: int
|
|
198
198
|
"""
|
|
199
199
|
|
|
200
200
|
self._num_cpus = num_cpus
|
|
@@ -242,22 +242,22 @@ class V1NamespaceUserMetrics(object):
|
|
|
242
242
|
self._pending_pods = pending_pods
|
|
243
243
|
|
|
244
244
|
@property
|
|
245
|
-
def ram_used(self) -> '
|
|
245
|
+
def ram_used(self) -> 'int':
|
|
246
246
|
"""Gets the ram_used of this V1NamespaceUserMetrics. # noqa: E501
|
|
247
247
|
|
|
248
248
|
|
|
249
249
|
:return: The ram_used of this V1NamespaceUserMetrics. # noqa: E501
|
|
250
|
-
:rtype:
|
|
250
|
+
:rtype: int
|
|
251
251
|
"""
|
|
252
252
|
return self._ram_used
|
|
253
253
|
|
|
254
254
|
@ram_used.setter
|
|
255
|
-
def ram_used(self, ram_used: '
|
|
255
|
+
def ram_used(self, ram_used: 'int'):
|
|
256
256
|
"""Sets the ram_used of this V1NamespaceUserMetrics.
|
|
257
257
|
|
|
258
258
|
|
|
259
259
|
:param ram_used: The ram_used of this V1NamespaceUserMetrics. # noqa: E501
|
|
260
|
-
:type:
|
|
260
|
+
:type: int
|
|
261
261
|
"""
|
|
262
262
|
|
|
263
263
|
self._ram_used = ram_used
|
|
@@ -368,22 +368,22 @@ class V1NamespaceUserMetrics(object):
|
|
|
368
368
|
self._unknown_pods = unknown_pods
|
|
369
369
|
|
|
370
370
|
@property
|
|
371
|
-
def vram_used(self) -> '
|
|
371
|
+
def vram_used(self) -> 'int':
|
|
372
372
|
"""Gets the vram_used of this V1NamespaceUserMetrics. # noqa: E501
|
|
373
373
|
|
|
374
374
|
|
|
375
375
|
:return: The vram_used of this V1NamespaceUserMetrics. # noqa: E501
|
|
376
|
-
:rtype:
|
|
376
|
+
:rtype: int
|
|
377
377
|
"""
|
|
378
378
|
return self._vram_used
|
|
379
379
|
|
|
380
380
|
@vram_used.setter
|
|
381
|
-
def vram_used(self, vram_used: '
|
|
381
|
+
def vram_used(self, vram_used: 'int'):
|
|
382
382
|
"""Sets the vram_used of this V1NamespaceUserMetrics.
|
|
383
383
|
|
|
384
384
|
|
|
385
385
|
:param vram_used: The vram_used of this V1NamespaceUserMetrics. # noqa: E501
|
|
386
|
-
:type:
|
|
386
|
+
:type: int
|
|
387
387
|
"""
|
|
388
388
|
|
|
389
389
|
self._vram_used = vram_used
|
|
@@ -44,16 +44,21 @@ class V1NodeMetrics(object):
|
|
|
44
44
|
'cpu_capacity_cores': 'float',
|
|
45
45
|
'cpu_util': 'float',
|
|
46
46
|
'filesystem': 'dict(str, V1FilesystemMetrics)',
|
|
47
|
+
'max_gpu_temp_recorded': 'float',
|
|
47
48
|
'max_power_per_gpu': 'float',
|
|
48
|
-
'mem_total': '
|
|
49
|
+
'mem_total': 'str',
|
|
49
50
|
'mem_util': 'float',
|
|
50
51
|
'node_name': 'str',
|
|
51
|
-
'
|
|
52
|
-
'
|
|
53
|
-
'
|
|
52
|
+
'nvlink_rx_gib': 'dict(str, float)',
|
|
53
|
+
'nvlink_tx_gib': 'dict(str, float)',
|
|
54
|
+
'pcie_rx_gib': 'dict(str, float)',
|
|
55
|
+
'pcie_tx_gib': 'dict(str, float)',
|
|
56
|
+
'per_gpu_mem_free': 'dict(str, int)',
|
|
57
|
+
'per_gpu_mem_used': 'dict(str, int)',
|
|
58
|
+
'per_gpu_power_usage_watts': 'dict(str, int)',
|
|
54
59
|
'per_gpu_sm_active': 'dict(str, float)',
|
|
55
60
|
'per_gpu_sm_occupancy': 'dict(str, float)',
|
|
56
|
-
'per_gpu_temperature_c': 'dict(str,
|
|
61
|
+
'per_gpu_temperature_c': 'dict(str, int)',
|
|
57
62
|
'per_gpu_util': 'dict(str, float)',
|
|
58
63
|
'timestamp': 'datetime'
|
|
59
64
|
}
|
|
@@ -62,10 +67,15 @@ class V1NodeMetrics(object):
|
|
|
62
67
|
'cpu_capacity_cores': 'cpuCapacityCores',
|
|
63
68
|
'cpu_util': 'cpuUtil',
|
|
64
69
|
'filesystem': 'filesystem',
|
|
70
|
+
'max_gpu_temp_recorded': 'maxGpuTempRecorded',
|
|
65
71
|
'max_power_per_gpu': 'maxPowerPerGpu',
|
|
66
72
|
'mem_total': 'memTotal',
|
|
67
73
|
'mem_util': 'memUtil',
|
|
68
74
|
'node_name': 'nodeName',
|
|
75
|
+
'nvlink_rx_gib': 'nvlinkRxGib',
|
|
76
|
+
'nvlink_tx_gib': 'nvlinkTxGib',
|
|
77
|
+
'pcie_rx_gib': 'pcieRxGib',
|
|
78
|
+
'pcie_tx_gib': 'pcieTxGib',
|
|
69
79
|
'per_gpu_mem_free': 'perGpuMemFree',
|
|
70
80
|
'per_gpu_mem_used': 'perGpuMemUsed',
|
|
71
81
|
'per_gpu_power_usage_watts': 'perGpuPowerUsageWatts',
|
|
@@ -76,15 +86,20 @@ class V1NodeMetrics(object):
|
|
|
76
86
|
'timestamp': 'timestamp'
|
|
77
87
|
}
|
|
78
88
|
|
|
79
|
-
def __init__(self, cpu_capacity_cores: 'float' =None, cpu_util: 'float' =None, filesystem: 'dict(str, V1FilesystemMetrics)' =None, max_power_per_gpu: 'float' =None, mem_total: '
|
|
89
|
+
def __init__(self, cpu_capacity_cores: 'float' =None, cpu_util: 'float' =None, filesystem: 'dict(str, V1FilesystemMetrics)' =None, max_gpu_temp_recorded: 'float' =None, max_power_per_gpu: 'float' =None, mem_total: 'str' =None, mem_util: 'float' =None, node_name: 'str' =None, nvlink_rx_gib: 'dict(str, float)' =None, nvlink_tx_gib: 'dict(str, float)' =None, pcie_rx_gib: 'dict(str, float)' =None, pcie_tx_gib: 'dict(str, float)' =None, per_gpu_mem_free: 'dict(str, int)' =None, per_gpu_mem_used: 'dict(str, int)' =None, per_gpu_power_usage_watts: 'dict(str, int)' =None, per_gpu_sm_active: 'dict(str, float)' =None, per_gpu_sm_occupancy: 'dict(str, float)' =None, per_gpu_temperature_c: 'dict(str, int)' =None, per_gpu_util: 'dict(str, float)' =None, timestamp: 'datetime' =None): # noqa: E501
|
|
80
90
|
"""V1NodeMetrics - a model defined in Swagger""" # noqa: E501
|
|
81
91
|
self._cpu_capacity_cores = None
|
|
82
92
|
self._cpu_util = None
|
|
83
93
|
self._filesystem = None
|
|
94
|
+
self._max_gpu_temp_recorded = None
|
|
84
95
|
self._max_power_per_gpu = None
|
|
85
96
|
self._mem_total = None
|
|
86
97
|
self._mem_util = None
|
|
87
98
|
self._node_name = None
|
|
99
|
+
self._nvlink_rx_gib = None
|
|
100
|
+
self._nvlink_tx_gib = None
|
|
101
|
+
self._pcie_rx_gib = None
|
|
102
|
+
self._pcie_tx_gib = None
|
|
88
103
|
self._per_gpu_mem_free = None
|
|
89
104
|
self._per_gpu_mem_used = None
|
|
90
105
|
self._per_gpu_power_usage_watts = None
|
|
@@ -100,6 +115,8 @@ class V1NodeMetrics(object):
|
|
|
100
115
|
self.cpu_util = cpu_util
|
|
101
116
|
if filesystem is not None:
|
|
102
117
|
self.filesystem = filesystem
|
|
118
|
+
if max_gpu_temp_recorded is not None:
|
|
119
|
+
self.max_gpu_temp_recorded = max_gpu_temp_recorded
|
|
103
120
|
if max_power_per_gpu is not None:
|
|
104
121
|
self.max_power_per_gpu = max_power_per_gpu
|
|
105
122
|
if mem_total is not None:
|
|
@@ -108,6 +125,14 @@ class V1NodeMetrics(object):
|
|
|
108
125
|
self.mem_util = mem_util
|
|
109
126
|
if node_name is not None:
|
|
110
127
|
self.node_name = node_name
|
|
128
|
+
if nvlink_rx_gib is not None:
|
|
129
|
+
self.nvlink_rx_gib = nvlink_rx_gib
|
|
130
|
+
if nvlink_tx_gib is not None:
|
|
131
|
+
self.nvlink_tx_gib = nvlink_tx_gib
|
|
132
|
+
if pcie_rx_gib is not None:
|
|
133
|
+
self.pcie_rx_gib = pcie_rx_gib
|
|
134
|
+
if pcie_tx_gib is not None:
|
|
135
|
+
self.pcie_tx_gib = pcie_tx_gib
|
|
111
136
|
if per_gpu_mem_free is not None:
|
|
112
137
|
self.per_gpu_mem_free = per_gpu_mem_free
|
|
113
138
|
if per_gpu_mem_used is not None:
|
|
@@ -188,6 +213,27 @@ class V1NodeMetrics(object):
|
|
|
188
213
|
|
|
189
214
|
self._filesystem = filesystem
|
|
190
215
|
|
|
216
|
+
@property
|
|
217
|
+
def max_gpu_temp_recorded(self) -> 'float':
|
|
218
|
+
"""Gets the max_gpu_temp_recorded of this V1NodeMetrics. # noqa: E501
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
:return: The max_gpu_temp_recorded of this V1NodeMetrics. # noqa: E501
|
|
222
|
+
:rtype: float
|
|
223
|
+
"""
|
|
224
|
+
return self._max_gpu_temp_recorded
|
|
225
|
+
|
|
226
|
+
@max_gpu_temp_recorded.setter
|
|
227
|
+
def max_gpu_temp_recorded(self, max_gpu_temp_recorded: 'float'):
|
|
228
|
+
"""Sets the max_gpu_temp_recorded of this V1NodeMetrics.
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
:param max_gpu_temp_recorded: The max_gpu_temp_recorded of this V1NodeMetrics. # noqa: E501
|
|
232
|
+
:type: float
|
|
233
|
+
"""
|
|
234
|
+
|
|
235
|
+
self._max_gpu_temp_recorded = max_gpu_temp_recorded
|
|
236
|
+
|
|
191
237
|
@property
|
|
192
238
|
def max_power_per_gpu(self) -> 'float':
|
|
193
239
|
"""Gets the max_power_per_gpu of this V1NodeMetrics. # noqa: E501
|
|
@@ -210,22 +256,22 @@ class V1NodeMetrics(object):
|
|
|
210
256
|
self._max_power_per_gpu = max_power_per_gpu
|
|
211
257
|
|
|
212
258
|
@property
|
|
213
|
-
def mem_total(self) -> '
|
|
259
|
+
def mem_total(self) -> 'str':
|
|
214
260
|
"""Gets the mem_total of this V1NodeMetrics. # noqa: E501
|
|
215
261
|
|
|
216
262
|
|
|
217
263
|
:return: The mem_total of this V1NodeMetrics. # noqa: E501
|
|
218
|
-
:rtype:
|
|
264
|
+
:rtype: str
|
|
219
265
|
"""
|
|
220
266
|
return self._mem_total
|
|
221
267
|
|
|
222
268
|
@mem_total.setter
|
|
223
|
-
def mem_total(self, mem_total: '
|
|
269
|
+
def mem_total(self, mem_total: 'str'):
|
|
224
270
|
"""Sets the mem_total of this V1NodeMetrics.
|
|
225
271
|
|
|
226
272
|
|
|
227
273
|
:param mem_total: The mem_total of this V1NodeMetrics. # noqa: E501
|
|
228
|
-
:type:
|
|
274
|
+
:type: str
|
|
229
275
|
"""
|
|
230
276
|
|
|
231
277
|
self._mem_total = mem_total
|
|
@@ -273,64 +319,148 @@ class V1NodeMetrics(object):
|
|
|
273
319
|
self._node_name = node_name
|
|
274
320
|
|
|
275
321
|
@property
|
|
276
|
-
def
|
|
322
|
+
def nvlink_rx_gib(self) -> 'dict(str, float)':
|
|
323
|
+
"""Gets the nvlink_rx_gib of this V1NodeMetrics. # noqa: E501
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
:return: The nvlink_rx_gib of this V1NodeMetrics. # noqa: E501
|
|
327
|
+
:rtype: dict(str, float)
|
|
328
|
+
"""
|
|
329
|
+
return self._nvlink_rx_gib
|
|
330
|
+
|
|
331
|
+
@nvlink_rx_gib.setter
|
|
332
|
+
def nvlink_rx_gib(self, nvlink_rx_gib: 'dict(str, float)'):
|
|
333
|
+
"""Sets the nvlink_rx_gib of this V1NodeMetrics.
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
:param nvlink_rx_gib: The nvlink_rx_gib of this V1NodeMetrics. # noqa: E501
|
|
337
|
+
:type: dict(str, float)
|
|
338
|
+
"""
|
|
339
|
+
|
|
340
|
+
self._nvlink_rx_gib = nvlink_rx_gib
|
|
341
|
+
|
|
342
|
+
@property
|
|
343
|
+
def nvlink_tx_gib(self) -> 'dict(str, float)':
|
|
344
|
+
"""Gets the nvlink_tx_gib of this V1NodeMetrics. # noqa: E501
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
:return: The nvlink_tx_gib of this V1NodeMetrics. # noqa: E501
|
|
348
|
+
:rtype: dict(str, float)
|
|
349
|
+
"""
|
|
350
|
+
return self._nvlink_tx_gib
|
|
351
|
+
|
|
352
|
+
@nvlink_tx_gib.setter
|
|
353
|
+
def nvlink_tx_gib(self, nvlink_tx_gib: 'dict(str, float)'):
|
|
354
|
+
"""Sets the nvlink_tx_gib of this V1NodeMetrics.
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
:param nvlink_tx_gib: The nvlink_tx_gib of this V1NodeMetrics. # noqa: E501
|
|
358
|
+
:type: dict(str, float)
|
|
359
|
+
"""
|
|
360
|
+
|
|
361
|
+
self._nvlink_tx_gib = nvlink_tx_gib
|
|
362
|
+
|
|
363
|
+
@property
|
|
364
|
+
def pcie_rx_gib(self) -> 'dict(str, float)':
|
|
365
|
+
"""Gets the pcie_rx_gib of this V1NodeMetrics. # noqa: E501
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
:return: The pcie_rx_gib of this V1NodeMetrics. # noqa: E501
|
|
369
|
+
:rtype: dict(str, float)
|
|
370
|
+
"""
|
|
371
|
+
return self._pcie_rx_gib
|
|
372
|
+
|
|
373
|
+
@pcie_rx_gib.setter
|
|
374
|
+
def pcie_rx_gib(self, pcie_rx_gib: 'dict(str, float)'):
|
|
375
|
+
"""Sets the pcie_rx_gib of this V1NodeMetrics.
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
:param pcie_rx_gib: The pcie_rx_gib of this V1NodeMetrics. # noqa: E501
|
|
379
|
+
:type: dict(str, float)
|
|
380
|
+
"""
|
|
381
|
+
|
|
382
|
+
self._pcie_rx_gib = pcie_rx_gib
|
|
383
|
+
|
|
384
|
+
@property
|
|
385
|
+
def pcie_tx_gib(self) -> 'dict(str, float)':
|
|
386
|
+
"""Gets the pcie_tx_gib of this V1NodeMetrics. # noqa: E501
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
:return: The pcie_tx_gib of this V1NodeMetrics. # noqa: E501
|
|
390
|
+
:rtype: dict(str, float)
|
|
391
|
+
"""
|
|
392
|
+
return self._pcie_tx_gib
|
|
393
|
+
|
|
394
|
+
@pcie_tx_gib.setter
|
|
395
|
+
def pcie_tx_gib(self, pcie_tx_gib: 'dict(str, float)'):
|
|
396
|
+
"""Sets the pcie_tx_gib of this V1NodeMetrics.
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
:param pcie_tx_gib: The pcie_tx_gib of this V1NodeMetrics. # noqa: E501
|
|
400
|
+
:type: dict(str, float)
|
|
401
|
+
"""
|
|
402
|
+
|
|
403
|
+
self._pcie_tx_gib = pcie_tx_gib
|
|
404
|
+
|
|
405
|
+
@property
|
|
406
|
+
def per_gpu_mem_free(self) -> 'dict(str, int)':
|
|
277
407
|
"""Gets the per_gpu_mem_free of this V1NodeMetrics. # noqa: E501
|
|
278
408
|
|
|
279
409
|
|
|
280
410
|
:return: The per_gpu_mem_free of this V1NodeMetrics. # noqa: E501
|
|
281
|
-
:rtype: dict(str,
|
|
411
|
+
:rtype: dict(str, int)
|
|
282
412
|
"""
|
|
283
413
|
return self._per_gpu_mem_free
|
|
284
414
|
|
|
285
415
|
@per_gpu_mem_free.setter
|
|
286
|
-
def per_gpu_mem_free(self, per_gpu_mem_free: 'dict(str,
|
|
416
|
+
def per_gpu_mem_free(self, per_gpu_mem_free: 'dict(str, int)'):
|
|
287
417
|
"""Sets the per_gpu_mem_free of this V1NodeMetrics.
|
|
288
418
|
|
|
289
419
|
|
|
290
420
|
:param per_gpu_mem_free: The per_gpu_mem_free of this V1NodeMetrics. # noqa: E501
|
|
291
|
-
:type: dict(str,
|
|
421
|
+
:type: dict(str, int)
|
|
292
422
|
"""
|
|
293
423
|
|
|
294
424
|
self._per_gpu_mem_free = per_gpu_mem_free
|
|
295
425
|
|
|
296
426
|
@property
|
|
297
|
-
def per_gpu_mem_used(self) -> 'dict(str,
|
|
427
|
+
def per_gpu_mem_used(self) -> 'dict(str, int)':
|
|
298
428
|
"""Gets the per_gpu_mem_used of this V1NodeMetrics. # noqa: E501
|
|
299
429
|
|
|
300
430
|
|
|
301
431
|
:return: The per_gpu_mem_used of this V1NodeMetrics. # noqa: E501
|
|
302
|
-
:rtype: dict(str,
|
|
432
|
+
:rtype: dict(str, int)
|
|
303
433
|
"""
|
|
304
434
|
return self._per_gpu_mem_used
|
|
305
435
|
|
|
306
436
|
@per_gpu_mem_used.setter
|
|
307
|
-
def per_gpu_mem_used(self, per_gpu_mem_used: 'dict(str,
|
|
437
|
+
def per_gpu_mem_used(self, per_gpu_mem_used: 'dict(str, int)'):
|
|
308
438
|
"""Sets the per_gpu_mem_used of this V1NodeMetrics.
|
|
309
439
|
|
|
310
440
|
|
|
311
441
|
:param per_gpu_mem_used: The per_gpu_mem_used of this V1NodeMetrics. # noqa: E501
|
|
312
|
-
:type: dict(str,
|
|
442
|
+
:type: dict(str, int)
|
|
313
443
|
"""
|
|
314
444
|
|
|
315
445
|
self._per_gpu_mem_used = per_gpu_mem_used
|
|
316
446
|
|
|
317
447
|
@property
|
|
318
|
-
def per_gpu_power_usage_watts(self) -> 'dict(str,
|
|
448
|
+
def per_gpu_power_usage_watts(self) -> 'dict(str, int)':
|
|
319
449
|
"""Gets the per_gpu_power_usage_watts of this V1NodeMetrics. # noqa: E501
|
|
320
450
|
|
|
321
451
|
|
|
322
452
|
:return: The per_gpu_power_usage_watts of this V1NodeMetrics. # noqa: E501
|
|
323
|
-
:rtype: dict(str,
|
|
453
|
+
:rtype: dict(str, int)
|
|
324
454
|
"""
|
|
325
455
|
return self._per_gpu_power_usage_watts
|
|
326
456
|
|
|
327
457
|
@per_gpu_power_usage_watts.setter
|
|
328
|
-
def per_gpu_power_usage_watts(self, per_gpu_power_usage_watts: 'dict(str,
|
|
458
|
+
def per_gpu_power_usage_watts(self, per_gpu_power_usage_watts: 'dict(str, int)'):
|
|
329
459
|
"""Sets the per_gpu_power_usage_watts of this V1NodeMetrics.
|
|
330
460
|
|
|
331
461
|
|
|
332
462
|
:param per_gpu_power_usage_watts: The per_gpu_power_usage_watts of this V1NodeMetrics. # noqa: E501
|
|
333
|
-
:type: dict(str,
|
|
463
|
+
:type: dict(str, int)
|
|
334
464
|
"""
|
|
335
465
|
|
|
336
466
|
self._per_gpu_power_usage_watts = per_gpu_power_usage_watts
|
|
@@ -378,22 +508,22 @@ class V1NodeMetrics(object):
|
|
|
378
508
|
self._per_gpu_sm_occupancy = per_gpu_sm_occupancy
|
|
379
509
|
|
|
380
510
|
@property
|
|
381
|
-
def per_gpu_temperature_c(self) -> 'dict(str,
|
|
511
|
+
def per_gpu_temperature_c(self) -> 'dict(str, int)':
|
|
382
512
|
"""Gets the per_gpu_temperature_c of this V1NodeMetrics. # noqa: E501
|
|
383
513
|
|
|
384
514
|
|
|
385
515
|
:return: The per_gpu_temperature_c of this V1NodeMetrics. # noqa: E501
|
|
386
|
-
:rtype: dict(str,
|
|
516
|
+
:rtype: dict(str, int)
|
|
387
517
|
"""
|
|
388
518
|
return self._per_gpu_temperature_c
|
|
389
519
|
|
|
390
520
|
@per_gpu_temperature_c.setter
|
|
391
|
-
def per_gpu_temperature_c(self, per_gpu_temperature_c: 'dict(str,
|
|
521
|
+
def per_gpu_temperature_c(self, per_gpu_temperature_c: 'dict(str, int)'):
|
|
392
522
|
"""Sets the per_gpu_temperature_c of this V1NodeMetrics.
|
|
393
523
|
|
|
394
524
|
|
|
395
525
|
:param per_gpu_temperature_c: The per_gpu_temperature_c of this V1NodeMetrics. # noqa: E501
|
|
396
|
-
:type: dict(str,
|
|
526
|
+
:type: dict(str, int)
|
|
397
527
|
"""
|
|
398
528
|
|
|
399
529
|
self._per_gpu_temperature_c = per_gpu_temperature_c
|