lightning-sdk 2025.8.19.post0__py3-none-any.whl → 2025.8.26__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.
Files changed (61) hide show
  1. lightning_sdk/__init__.py +1 -1
  2. lightning_sdk/api/llm_api.py +6 -2
  3. lightning_sdk/api/studio_api.py +168 -2
  4. lightning_sdk/api/teamspace_api.py +60 -30
  5. lightning_sdk/api/user_api.py +49 -1
  6. lightning_sdk/api/utils.py +1 -1
  7. lightning_sdk/cli/config/set.py +6 -18
  8. lightning_sdk/cli/legacy/create.py +12 -14
  9. lightning_sdk/cli/legacy/delete.py +3 -3
  10. lightning_sdk/cli/legacy/deploy/_auth.py +4 -4
  11. lightning_sdk/cli/legacy/download.py +7 -7
  12. lightning_sdk/cli/legacy/job_and_mmt_action.py +4 -4
  13. lightning_sdk/cli/legacy/list.py +9 -9
  14. lightning_sdk/cli/legacy/open.py +3 -3
  15. lightning_sdk/cli/legacy/start.py +1 -0
  16. lightning_sdk/cli/legacy/switch.py +1 -0
  17. lightning_sdk/cli/legacy/upload.py +3 -3
  18. lightning_sdk/cli/studio/create.py +14 -23
  19. lightning_sdk/cli/studio/delete.py +28 -27
  20. lightning_sdk/cli/studio/list.py +5 -6
  21. lightning_sdk/cli/studio/ssh.py +19 -22
  22. lightning_sdk/cli/studio/start.py +23 -23
  23. lightning_sdk/cli/studio/stop.py +22 -26
  24. lightning_sdk/cli/studio/switch.py +20 -23
  25. lightning_sdk/cli/utils/resolve.py +1 -1
  26. lightning_sdk/cli/utils/save_to_config.py +27 -0
  27. lightning_sdk/cli/utils/studio_selection.py +106 -0
  28. lightning_sdk/cli/utils/teamspace_selection.py +125 -0
  29. lightning_sdk/lightning_cloud/openapi/__init__.py +3 -0
  30. lightning_sdk/lightning_cloud/openapi/api/billing_service_api.py +170 -0
  31. lightning_sdk/lightning_cloud/openapi/api/k8_s_cluster_service_api.py +101 -0
  32. lightning_sdk/lightning_cloud/openapi/models/__init__.py +3 -0
  33. lightning_sdk/lightning_cloud/openapi/models/assistant_id_conversations_body.py +15 -15
  34. lightning_sdk/lightning_cloud/openapi/models/externalv1_user_status.py +27 -1
  35. lightning_sdk/lightning_cloud/openapi/models/v1_cluster_metrics.py +270 -36
  36. lightning_sdk/lightning_cloud/openapi/models/v1_container_metrics.py +21 -21
  37. lightning_sdk/lightning_cloud/openapi/models/v1_list_cluster_metric_timestamps_response.py +123 -0
  38. lightning_sdk/lightning_cloud/openapi/models/v1_namespace_metrics.py +11 -11
  39. lightning_sdk/lightning_cloud/openapi/models/v1_namespace_user_metrics.py +16 -16
  40. lightning_sdk/lightning_cloud/openapi/models/v1_node_metrics.py +156 -26
  41. lightning_sdk/lightning_cloud/openapi/models/v1_pod_metrics.py +281 -21
  42. lightning_sdk/lightning_cloud/openapi/models/v1_project_cluster_binding.py +27 -1
  43. lightning_sdk/lightning_cloud/openapi/models/v1_purchase_annual_upsell_response.py +123 -0
  44. lightning_sdk/lightning_cloud/openapi/models/v1_quote_annual_upsell_response.py +201 -0
  45. lightning_sdk/lightning_cloud/openapi/models/v1_storage_asset.py +107 -3
  46. lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +1 -27
  47. lightning_sdk/llm/llm.py +2 -2
  48. lightning_sdk/llm/public_assistants.py +4 -0
  49. lightning_sdk/studio.py +92 -28
  50. lightning_sdk/teamspace.py +25 -2
  51. lightning_sdk/user.py +19 -1
  52. lightning_sdk/utils/config.py +6 -0
  53. lightning_sdk/utils/names.py +1179 -0
  54. lightning_sdk/utils/progress.py +284 -0
  55. lightning_sdk/utils/resolve.py +6 -6
  56. {lightning_sdk-2025.8.19.post0.dist-info → lightning_sdk-2025.8.26.dist-info}/METADATA +1 -1
  57. {lightning_sdk-2025.8.19.post0.dist-info → lightning_sdk-2025.8.26.dist-info}/RECORD +61 -53
  58. {lightning_sdk-2025.8.19.post0.dist-info → lightning_sdk-2025.8.26.dist-info}/LICENSE +0 -0
  59. {lightning_sdk-2025.8.19.post0.dist-info → lightning_sdk-2025.8.26.dist-info}/WHEEL +0 -0
  60. {lightning_sdk-2025.8.19.post0.dist-info → lightning_sdk-2025.8.26.dist-info}/entry_points.txt +0 -0
  61. {lightning_sdk-2025.8.19.post0.dist-info → lightning_sdk-2025.8.26.dist-info}/top_level.txt +0 -0
@@ -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': 'float',
49
+ 'mem_total': 'str',
49
50
  'mem_util': 'float',
50
51
  'node_name': 'str',
51
- 'per_gpu_mem_free': 'dict(str, float)',
52
- 'per_gpu_mem_used': 'dict(str, float)',
53
- 'per_gpu_power_usage_watts': 'dict(str, float)',
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, float)',
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: 'float' =None, mem_util: 'float' =None, node_name: 'str' =None, per_gpu_mem_free: 'dict(str, float)' =None, per_gpu_mem_used: 'dict(str, float)' =None, per_gpu_power_usage_watts: 'dict(str, float)' =None, per_gpu_sm_active: 'dict(str, float)' =None, per_gpu_sm_occupancy: 'dict(str, float)' =None, per_gpu_temperature_c: 'dict(str, float)' =None, per_gpu_util: 'dict(str, float)' =None, timestamp: 'datetime' =None): # noqa: E501
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) -> 'float':
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: float
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: 'float'):
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: float
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 per_gpu_mem_free(self) -> 'dict(str, float)':
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, float)
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, float)'):
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, float)
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, float)':
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, float)
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, float)'):
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, float)
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, float)':
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, float)
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, float)'):
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, float)
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, float)':
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, float)
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, float)'):
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, float)
526
+ :type: dict(str, int)
397
527
  """
398
528
 
399
529
  self._per_gpu_temperature_c = per_gpu_temperature_c