lightning-sdk 2025.10.22__py3-none-any.whl → 2025.10.23__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 (39) hide show
  1. lightning_sdk/__init__.py +1 -1
  2. lightning_sdk/api/job_api.py +4 -1
  3. lightning_sdk/cli/entrypoint.py +3 -0
  4. lightning_sdk/cli/groups.py +7 -0
  5. lightning_sdk/cli/license/__init__.py +14 -0
  6. lightning_sdk/cli/license/get.py +15 -0
  7. lightning_sdk/cli/license/list.py +45 -0
  8. lightning_sdk/cli/license/set.py +13 -0
  9. lightning_sdk/cli/studio/create.py +1 -1
  10. lightning_sdk/cli/utils/handle_machine_and_gpus_args.py +1 -3
  11. lightning_sdk/job/base.py +7 -0
  12. lightning_sdk/job/job.py +8 -0
  13. lightning_sdk/job/v1.py +3 -0
  14. lightning_sdk/job/v2.py +4 -0
  15. lightning_sdk/lightning_cloud/openapi/__init__.py +6 -0
  16. lightning_sdk/lightning_cloud/openapi/api/auth_service_api.py +182 -0
  17. lightning_sdk/lightning_cloud/openapi/api/k8_s_cluster_service_api.py +117 -0
  18. lightning_sdk/lightning_cloud/openapi/models/__init__.py +6 -0
  19. lightning_sdk/lightning_cloud/openapi/models/update1.py +27 -1
  20. lightning_sdk/lightning_cloud/openapi/models/v1_data_connection.py +27 -1
  21. lightning_sdk/lightning_cloud/openapi/models/v1_external_search_user.py +27 -1
  22. lightning_sdk/lightning_cloud/openapi/models/v1_filesystem_metric.py +201 -0
  23. lightning_sdk/lightning_cloud/openapi/models/v1_list_filesystem_metrics_response.py +123 -0
  24. lightning_sdk/lightning_cloud/openapi/models/v1_list_platform_notifications_response.py +123 -0
  25. lightning_sdk/lightning_cloud/openapi/models/v1_platform_notification.py +279 -0
  26. lightning_sdk/lightning_cloud/openapi/models/v1_reset_api_key_request.py +97 -0
  27. lightning_sdk/lightning_cloud/openapi/models/v1_reset_api_key_response.py +123 -0
  28. lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +105 -131
  29. lightning_sdk/machine.py +3 -0
  30. lightning_sdk/pipeline/steps.py +1 -0
  31. lightning_sdk/studio.py +41 -11
  32. lightning_sdk/utils/config.py +18 -3
  33. lightning_sdk/utils/resolve.py +6 -1
  34. {lightning_sdk-2025.10.22.dist-info → lightning_sdk-2025.10.23.dist-info}/METADATA +1 -1
  35. {lightning_sdk-2025.10.22.dist-info → lightning_sdk-2025.10.23.dist-info}/RECORD +39 -29
  36. {lightning_sdk-2025.10.22.dist-info → lightning_sdk-2025.10.23.dist-info}/LICENSE +0 -0
  37. {lightning_sdk-2025.10.22.dist-info → lightning_sdk-2025.10.23.dist-info}/WHEEL +0 -0
  38. {lightning_sdk-2025.10.22.dist-info → lightning_sdk-2025.10.23.dist-info}/entry_points.txt +0 -0
  39. {lightning_sdk-2025.10.22.dist-info → lightning_sdk-2025.10.23.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 V1ResetAPIKeyResponse(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
+ 'api_key': 'str'
45
+ }
46
+
47
+ attribute_map = {
48
+ 'api_key': 'apiKey'
49
+ }
50
+
51
+ def __init__(self, api_key: 'str' =None): # noqa: E501
52
+ """V1ResetAPIKeyResponse - a model defined in Swagger""" # noqa: E501
53
+ self._api_key = None
54
+ self.discriminator = None
55
+ if api_key is not None:
56
+ self.api_key = api_key
57
+
58
+ @property
59
+ def api_key(self) -> 'str':
60
+ """Gets the api_key of this V1ResetAPIKeyResponse. # noqa: E501
61
+
62
+
63
+ :return: The api_key of this V1ResetAPIKeyResponse. # noqa: E501
64
+ :rtype: str
65
+ """
66
+ return self._api_key
67
+
68
+ @api_key.setter
69
+ def api_key(self, api_key: 'str'):
70
+ """Sets the api_key of this V1ResetAPIKeyResponse.
71
+
72
+
73
+ :param api_key: The api_key of this V1ResetAPIKeyResponse. # noqa: E501
74
+ :type: str
75
+ """
76
+
77
+ self._api_key = api_key
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(V1ResetAPIKeyResponse, 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: 'V1ResetAPIKeyResponse') -> bool:
115
+ """Returns true if both objects are equal"""
116
+ if not isinstance(other, V1ResetAPIKeyResponse):
117
+ return False
118
+
119
+ return self.__dict__ == other.__dict__
120
+
121
+ def __ne__(self, other: 'V1ResetAPIKeyResponse') -> bool:
122
+ """Returns true if both objects are not equal"""
123
+ return not self == other
@@ -63,7 +63,6 @@ class V1UserFeatures(object):
63
63
  'deployment_persistent_disk': 'bool',
64
64
  'drive_v2': 'bool',
65
65
  'enterprise_compute_admin': 'bool',
66
- 'f227': 'bool',
67
66
  'f234': 'bool',
68
67
  'f236': 'bool',
69
68
  'f239': 'bool',
@@ -72,25 +71,25 @@ class V1UserFeatures(object):
72
71
  'f243': 'bool',
73
72
  'f245': 'bool',
74
73
  'f247': 'bool',
75
- 'f248': 'bool',
76
74
  'f250': 'bool',
77
75
  'f252': 'bool',
78
76
  'f253': 'bool',
79
77
  'f254': 'bool',
80
78
  'f255': 'bool',
81
- 'f257': 'bool',
82
79
  'f258': 'bool',
83
80
  'f259': 'bool',
84
81
  'f260': 'bool',
85
82
  'f261': 'bool',
86
83
  'f262': 'bool',
87
84
  'f263': 'bool',
88
- 'f264': 'bool',
89
85
  'f265': 'bool',
90
86
  'f266': 'bool',
87
+ 'f267': 'bool',
88
+ 'f268': 'bool',
89
+ 'f269': 'bool',
90
+ 'f270': 'bool',
91
91
  'fair_share': 'bool',
92
92
  'featured_studios_admin': 'bool',
93
- 'gcs_connections_optimized': 'bool',
94
93
  'job_artifacts_v2': 'bool',
95
94
  'kubernetes_cluster_ui': 'bool',
96
95
  'kubernetes_clusters': 'bool',
@@ -155,7 +154,6 @@ class V1UserFeatures(object):
155
154
  'deployment_persistent_disk': 'deploymentPersistentDisk',
156
155
  'drive_v2': 'driveV2',
157
156
  'enterprise_compute_admin': 'enterpriseComputeAdmin',
158
- 'f227': 'f227',
159
157
  'f234': 'f234',
160
158
  'f236': 'f236',
161
159
  'f239': 'f239',
@@ -164,25 +162,25 @@ class V1UserFeatures(object):
164
162
  'f243': 'f243',
165
163
  'f245': 'f245',
166
164
  'f247': 'f247',
167
- 'f248': 'f248',
168
165
  'f250': 'f250',
169
166
  'f252': 'f252',
170
167
  'f253': 'f253',
171
168
  'f254': 'f254',
172
169
  'f255': 'f255',
173
- 'f257': 'f257',
174
170
  'f258': 'f258',
175
171
  'f259': 'f259',
176
172
  'f260': 'f260',
177
173
  'f261': 'f261',
178
174
  'f262': 'f262',
179
175
  'f263': 'f263',
180
- 'f264': 'f264',
181
176
  'f265': 'f265',
182
177
  'f266': 'f266',
178
+ 'f267': 'f267',
179
+ 'f268': 'f268',
180
+ 'f269': 'f269',
181
+ 'f270': 'f270',
183
182
  'fair_share': 'fairShare',
184
183
  'featured_studios_admin': 'featuredStudiosAdmin',
185
- 'gcs_connections_optimized': 'gcsConnectionsOptimized',
186
184
  'job_artifacts_v2': 'jobArtifactsV2',
187
185
  'kubernetes_cluster_ui': 'kubernetesClusterUi',
188
186
  'kubernetes_clusters': 'kubernetesClusters',
@@ -224,7 +222,7 @@ class V1UserFeatures(object):
224
222
  'writable_s3_connections': 'writableS3Connections'
225
223
  }
226
224
 
227
- def __init__(self, affiliate_links: 'bool' =None, agents_v2: 'bool' =None, ai_hub_monetization: 'bool' =None, auto_fast_load: 'bool' =None, b2c_experience: 'bool' =None, byo_machine_type: 'bool' =None, cap_add: 'list[str]' =None, cap_drop: 'list[str]' =None, capacity_reservation_byoc: 'bool' =None, capacity_reservation_dry_run: 'bool' =None, chat_models: 'bool' =None, cloudspace_schedules: 'bool' =None, code_tab: 'bool' =None, collab_screen_sharing: 'bool' =None, control_center_monitoring: 'bool' =None, cost_attribution_settings: 'bool' =None, custom_app_domain: 'bool' =None, datasets: 'bool' =None, default_one_cluster: 'bool' =None, deployment_persistent_disk: 'bool' =None, drive_v2: 'bool' =None, enterprise_compute_admin: 'bool' =None, f227: 'bool' =None, f234: 'bool' =None, f236: 'bool' =None, f239: 'bool' =None, f240: 'bool' =None, f241: 'bool' =None, f243: 'bool' =None, f245: 'bool' =None, f247: 'bool' =None, f248: 'bool' =None, f250: 'bool' =None, f252: 'bool' =None, f253: 'bool' =None, f254: 'bool' =None, f255: 'bool' =None, f257: 'bool' =None, f258: 'bool' =None, f259: 'bool' =None, f260: 'bool' =None, f261: 'bool' =None, f262: 'bool' =None, f263: 'bool' =None, f264: 'bool' =None, f265: 'bool' =None, f266: 'bool' =None, fair_share: 'bool' =None, featured_studios_admin: 'bool' =None, gcs_connections_optimized: 'bool' =None, job_artifacts_v2: 'bool' =None, kubernetes_cluster_ui: 'bool' =None, kubernetes_clusters: 'bool' =None, landing_studios: 'bool' =None, lit_logger: 'bool' =None, marketplace: 'bool' =None, mmt_fault_tolerance: 'bool' =None, mmt_strategy_selector: 'bool' =None, model_api_dashboard: 'bool' =None, multiple_studio_versions: 'bool' =None, nerf_fs_nonpaying: 'bool' =None, org_level_member_permissions: 'bool' =None, org_usage_limits: 'bool' =None, persistent_disk: 'bool' =None, plugin_distributed: 'bool' =None, plugin_inference: 'bool' =None, plugin_label_studio: 'bool' =None, plugin_langflow: 'bool' =None, plugin_python_profiler: 'bool' =None, plugin_sweeps: 'bool' =None, pricing_updates: 'bool' =None, product_generator: 'bool' =None, product_license: 'bool' =None, project_selector: 'bool' =None, publish_pipelines: 'bool' =None, reserved_machines_tab: 'bool' =None, restartable_jobs: 'bool' =None, runnable_public_studio_page: 'bool' =None, security_docs: 'bool' =None, show_dev_admin: 'bool' =None, slurm: 'bool' =None, specialised_studios: 'bool' =None, storage_overuse_deletion: 'bool' =None, studio_config: 'bool' =None, studio_sharing_v2: 'bool' =None, studio_version_visibility: 'bool' =None, vultr: 'bool' =None, weka: 'bool' =None, writable_s3_connections: 'bool' =None): # noqa: E501
225
+ def __init__(self, affiliate_links: 'bool' =None, agents_v2: 'bool' =None, ai_hub_monetization: 'bool' =None, auto_fast_load: 'bool' =None, b2c_experience: 'bool' =None, byo_machine_type: 'bool' =None, cap_add: 'list[str]' =None, cap_drop: 'list[str]' =None, capacity_reservation_byoc: 'bool' =None, capacity_reservation_dry_run: 'bool' =None, chat_models: 'bool' =None, cloudspace_schedules: 'bool' =None, code_tab: 'bool' =None, collab_screen_sharing: 'bool' =None, control_center_monitoring: 'bool' =None, cost_attribution_settings: 'bool' =None, custom_app_domain: 'bool' =None, datasets: 'bool' =None, default_one_cluster: 'bool' =None, deployment_persistent_disk: 'bool' =None, drive_v2: 'bool' =None, enterprise_compute_admin: 'bool' =None, f234: 'bool' =None, f236: 'bool' =None, f239: 'bool' =None, f240: 'bool' =None, f241: 'bool' =None, f243: 'bool' =None, f245: 'bool' =None, f247: 'bool' =None, f250: 'bool' =None, f252: 'bool' =None, f253: 'bool' =None, f254: 'bool' =None, f255: 'bool' =None, f258: 'bool' =None, f259: 'bool' =None, f260: 'bool' =None, f261: 'bool' =None, f262: 'bool' =None, f263: 'bool' =None, f265: 'bool' =None, f266: 'bool' =None, f267: 'bool' =None, f268: 'bool' =None, f269: 'bool' =None, f270: 'bool' =None, fair_share: 'bool' =None, featured_studios_admin: 'bool' =None, job_artifacts_v2: 'bool' =None, kubernetes_cluster_ui: 'bool' =None, kubernetes_clusters: 'bool' =None, landing_studios: 'bool' =None, lit_logger: 'bool' =None, marketplace: 'bool' =None, mmt_fault_tolerance: 'bool' =None, mmt_strategy_selector: 'bool' =None, model_api_dashboard: 'bool' =None, multiple_studio_versions: 'bool' =None, nerf_fs_nonpaying: 'bool' =None, org_level_member_permissions: 'bool' =None, org_usage_limits: 'bool' =None, persistent_disk: 'bool' =None, plugin_distributed: 'bool' =None, plugin_inference: 'bool' =None, plugin_label_studio: 'bool' =None, plugin_langflow: 'bool' =None, plugin_python_profiler: 'bool' =None, plugin_sweeps: 'bool' =None, pricing_updates: 'bool' =None, product_generator: 'bool' =None, product_license: 'bool' =None, project_selector: 'bool' =None, publish_pipelines: 'bool' =None, reserved_machines_tab: 'bool' =None, restartable_jobs: 'bool' =None, runnable_public_studio_page: 'bool' =None, security_docs: 'bool' =None, show_dev_admin: 'bool' =None, slurm: 'bool' =None, specialised_studios: 'bool' =None, storage_overuse_deletion: 'bool' =None, studio_config: 'bool' =None, studio_sharing_v2: 'bool' =None, studio_version_visibility: 'bool' =None, vultr: 'bool' =None, weka: 'bool' =None, writable_s3_connections: 'bool' =None): # noqa: E501
228
226
  """V1UserFeatures - a model defined in Swagger""" # noqa: E501
229
227
  self._affiliate_links = None
230
228
  self._agents_v2 = None
@@ -248,7 +246,6 @@ class V1UserFeatures(object):
248
246
  self._deployment_persistent_disk = None
249
247
  self._drive_v2 = None
250
248
  self._enterprise_compute_admin = None
251
- self._f227 = None
252
249
  self._f234 = None
253
250
  self._f236 = None
254
251
  self._f239 = None
@@ -257,25 +254,25 @@ class V1UserFeatures(object):
257
254
  self._f243 = None
258
255
  self._f245 = None
259
256
  self._f247 = None
260
- self._f248 = None
261
257
  self._f250 = None
262
258
  self._f252 = None
263
259
  self._f253 = None
264
260
  self._f254 = None
265
261
  self._f255 = None
266
- self._f257 = None
267
262
  self._f258 = None
268
263
  self._f259 = None
269
264
  self._f260 = None
270
265
  self._f261 = None
271
266
  self._f262 = None
272
267
  self._f263 = None
273
- self._f264 = None
274
268
  self._f265 = None
275
269
  self._f266 = None
270
+ self._f267 = None
271
+ self._f268 = None
272
+ self._f269 = None
273
+ self._f270 = None
276
274
  self._fair_share = None
277
275
  self._featured_studios_admin = None
278
- self._gcs_connections_optimized = None
279
276
  self._job_artifacts_v2 = None
280
277
  self._kubernetes_cluster_ui = None
281
278
  self._kubernetes_clusters = None
@@ -360,8 +357,6 @@ class V1UserFeatures(object):
360
357
  self.drive_v2 = drive_v2
361
358
  if enterprise_compute_admin is not None:
362
359
  self.enterprise_compute_admin = enterprise_compute_admin
363
- if f227 is not None:
364
- self.f227 = f227
365
360
  if f234 is not None:
366
361
  self.f234 = f234
367
362
  if f236 is not None:
@@ -378,8 +373,6 @@ class V1UserFeatures(object):
378
373
  self.f245 = f245
379
374
  if f247 is not None:
380
375
  self.f247 = f247
381
- if f248 is not None:
382
- self.f248 = f248
383
376
  if f250 is not None:
384
377
  self.f250 = f250
385
378
  if f252 is not None:
@@ -390,8 +383,6 @@ class V1UserFeatures(object):
390
383
  self.f254 = f254
391
384
  if f255 is not None:
392
385
  self.f255 = f255
393
- if f257 is not None:
394
- self.f257 = f257
395
386
  if f258 is not None:
396
387
  self.f258 = f258
397
388
  if f259 is not None:
@@ -404,18 +395,22 @@ class V1UserFeatures(object):
404
395
  self.f262 = f262
405
396
  if f263 is not None:
406
397
  self.f263 = f263
407
- if f264 is not None:
408
- self.f264 = f264
409
398
  if f265 is not None:
410
399
  self.f265 = f265
411
400
  if f266 is not None:
412
401
  self.f266 = f266
402
+ if f267 is not None:
403
+ self.f267 = f267
404
+ if f268 is not None:
405
+ self.f268 = f268
406
+ if f269 is not None:
407
+ self.f269 = f269
408
+ if f270 is not None:
409
+ self.f270 = f270
413
410
  if fair_share is not None:
414
411
  self.fair_share = fair_share
415
412
  if featured_studios_admin is not None:
416
413
  self.featured_studios_admin = featured_studios_admin
417
- if gcs_connections_optimized is not None:
418
- self.gcs_connections_optimized = gcs_connections_optimized
419
414
  if job_artifacts_v2 is not None:
420
415
  self.job_artifacts_v2 = job_artifacts_v2
421
416
  if kubernetes_cluster_ui is not None:
@@ -957,27 +952,6 @@ class V1UserFeatures(object):
957
952
 
958
953
  self._enterprise_compute_admin = enterprise_compute_admin
959
954
 
960
- @property
961
- def f227(self) -> 'bool':
962
- """Gets the f227 of this V1UserFeatures. # noqa: E501
963
-
964
-
965
- :return: The f227 of this V1UserFeatures. # noqa: E501
966
- :rtype: bool
967
- """
968
- return self._f227
969
-
970
- @f227.setter
971
- def f227(self, f227: 'bool'):
972
- """Sets the f227 of this V1UserFeatures.
973
-
974
-
975
- :param f227: The f227 of this V1UserFeatures. # noqa: E501
976
- :type: bool
977
- """
978
-
979
- self._f227 = f227
980
-
981
955
  @property
982
956
  def f234(self) -> 'bool':
983
957
  """Gets the f234 of this V1UserFeatures. # noqa: E501
@@ -1146,27 +1120,6 @@ class V1UserFeatures(object):
1146
1120
 
1147
1121
  self._f247 = f247
1148
1122
 
1149
- @property
1150
- def f248(self) -> 'bool':
1151
- """Gets the f248 of this V1UserFeatures. # noqa: E501
1152
-
1153
-
1154
- :return: The f248 of this V1UserFeatures. # noqa: E501
1155
- :rtype: bool
1156
- """
1157
- return self._f248
1158
-
1159
- @f248.setter
1160
- def f248(self, f248: 'bool'):
1161
- """Sets the f248 of this V1UserFeatures.
1162
-
1163
-
1164
- :param f248: The f248 of this V1UserFeatures. # noqa: E501
1165
- :type: bool
1166
- """
1167
-
1168
- self._f248 = f248
1169
-
1170
1123
  @property
1171
1124
  def f250(self) -> 'bool':
1172
1125
  """Gets the f250 of this V1UserFeatures. # noqa: E501
@@ -1272,27 +1225,6 @@ class V1UserFeatures(object):
1272
1225
 
1273
1226
  self._f255 = f255
1274
1227
 
1275
- @property
1276
- def f257(self) -> 'bool':
1277
- """Gets the f257 of this V1UserFeatures. # noqa: E501
1278
-
1279
-
1280
- :return: The f257 of this V1UserFeatures. # noqa: E501
1281
- :rtype: bool
1282
- """
1283
- return self._f257
1284
-
1285
- @f257.setter
1286
- def f257(self, f257: 'bool'):
1287
- """Sets the f257 of this V1UserFeatures.
1288
-
1289
-
1290
- :param f257: The f257 of this V1UserFeatures. # noqa: E501
1291
- :type: bool
1292
- """
1293
-
1294
- self._f257 = f257
1295
-
1296
1228
  @property
1297
1229
  def f258(self) -> 'bool':
1298
1230
  """Gets the f258 of this V1UserFeatures. # noqa: E501
@@ -1419,27 +1351,6 @@ class V1UserFeatures(object):
1419
1351
 
1420
1352
  self._f263 = f263
1421
1353
 
1422
- @property
1423
- def f264(self) -> 'bool':
1424
- """Gets the f264 of this V1UserFeatures. # noqa: E501
1425
-
1426
-
1427
- :return: The f264 of this V1UserFeatures. # noqa: E501
1428
- :rtype: bool
1429
- """
1430
- return self._f264
1431
-
1432
- @f264.setter
1433
- def f264(self, f264: 'bool'):
1434
- """Sets the f264 of this V1UserFeatures.
1435
-
1436
-
1437
- :param f264: The f264 of this V1UserFeatures. # noqa: E501
1438
- :type: bool
1439
- """
1440
-
1441
- self._f264 = f264
1442
-
1443
1354
  @property
1444
1355
  def f265(self) -> 'bool':
1445
1356
  """Gets the f265 of this V1UserFeatures. # noqa: E501
@@ -1482,6 +1393,90 @@ class V1UserFeatures(object):
1482
1393
 
1483
1394
  self._f266 = f266
1484
1395
 
1396
+ @property
1397
+ def f267(self) -> 'bool':
1398
+ """Gets the f267 of this V1UserFeatures. # noqa: E501
1399
+
1400
+
1401
+ :return: The f267 of this V1UserFeatures. # noqa: E501
1402
+ :rtype: bool
1403
+ """
1404
+ return self._f267
1405
+
1406
+ @f267.setter
1407
+ def f267(self, f267: 'bool'):
1408
+ """Sets the f267 of this V1UserFeatures.
1409
+
1410
+
1411
+ :param f267: The f267 of this V1UserFeatures. # noqa: E501
1412
+ :type: bool
1413
+ """
1414
+
1415
+ self._f267 = f267
1416
+
1417
+ @property
1418
+ def f268(self) -> 'bool':
1419
+ """Gets the f268 of this V1UserFeatures. # noqa: E501
1420
+
1421
+
1422
+ :return: The f268 of this V1UserFeatures. # noqa: E501
1423
+ :rtype: bool
1424
+ """
1425
+ return self._f268
1426
+
1427
+ @f268.setter
1428
+ def f268(self, f268: 'bool'):
1429
+ """Sets the f268 of this V1UserFeatures.
1430
+
1431
+
1432
+ :param f268: The f268 of this V1UserFeatures. # noqa: E501
1433
+ :type: bool
1434
+ """
1435
+
1436
+ self._f268 = f268
1437
+
1438
+ @property
1439
+ def f269(self) -> 'bool':
1440
+ """Gets the f269 of this V1UserFeatures. # noqa: E501
1441
+
1442
+
1443
+ :return: The f269 of this V1UserFeatures. # noqa: E501
1444
+ :rtype: bool
1445
+ """
1446
+ return self._f269
1447
+
1448
+ @f269.setter
1449
+ def f269(self, f269: 'bool'):
1450
+ """Sets the f269 of this V1UserFeatures.
1451
+
1452
+
1453
+ :param f269: The f269 of this V1UserFeatures. # noqa: E501
1454
+ :type: bool
1455
+ """
1456
+
1457
+ self._f269 = f269
1458
+
1459
+ @property
1460
+ def f270(self) -> 'bool':
1461
+ """Gets the f270 of this V1UserFeatures. # noqa: E501
1462
+
1463
+
1464
+ :return: The f270 of this V1UserFeatures. # noqa: E501
1465
+ :rtype: bool
1466
+ """
1467
+ return self._f270
1468
+
1469
+ @f270.setter
1470
+ def f270(self, f270: 'bool'):
1471
+ """Sets the f270 of this V1UserFeatures.
1472
+
1473
+
1474
+ :param f270: The f270 of this V1UserFeatures. # noqa: E501
1475
+ :type: bool
1476
+ """
1477
+
1478
+ self._f270 = f270
1479
+
1485
1480
  @property
1486
1481
  def fair_share(self) -> 'bool':
1487
1482
  """Gets the fair_share of this V1UserFeatures. # noqa: E501
@@ -1524,27 +1519,6 @@ class V1UserFeatures(object):
1524
1519
 
1525
1520
  self._featured_studios_admin = featured_studios_admin
1526
1521
 
1527
- @property
1528
- def gcs_connections_optimized(self) -> 'bool':
1529
- """Gets the gcs_connections_optimized of this V1UserFeatures. # noqa: E501
1530
-
1531
-
1532
- :return: The gcs_connections_optimized of this V1UserFeatures. # noqa: E501
1533
- :rtype: bool
1534
- """
1535
- return self._gcs_connections_optimized
1536
-
1537
- @gcs_connections_optimized.setter
1538
- def gcs_connections_optimized(self, gcs_connections_optimized: 'bool'):
1539
- """Sets the gcs_connections_optimized of this V1UserFeatures.
1540
-
1541
-
1542
- :param gcs_connections_optimized: The gcs_connections_optimized of this V1UserFeatures. # noqa: E501
1543
- :type: bool
1544
- """
1545
-
1546
- self._gcs_connections_optimized = gcs_connections_optimized
1547
-
1548
1522
  @property
1549
1523
  def job_artifacts_v2(self) -> 'bool':
1550
1524
  """Gets the job_artifacts_v2 of this V1UserFeatures. # noqa: E501
lightning_sdk/machine.py CHANGED
@@ -218,3 +218,6 @@ Machine.H200 = Machine(name="H200", slug="lit-h200x-1", family="H200", accelerat
218
218
  Machine.H200_X_8 = Machine(name="H200_X_8", slug="lit-h200x-8", family="H200", accelerator_count=8)
219
219
  # available B200 machines
220
220
  Machine.B200_X_8 = Machine(name="B200_X_8", slug="lit-b200x-8", family="B200", accelerator_count=8)
221
+
222
+
223
+ DEFAULT_MACHINE = Machine.CPU.name
@@ -239,6 +239,7 @@ class JobStep:
239
239
  artifacts_remote=None,
240
240
  max_runtime=self.max_runtime,
241
241
  machine_image_version=machine_image_version,
242
+ reuse_snapshot=True,
242
243
  )
243
244
 
244
245
  return V1PipelineStep(
lightning_sdk/studio.py CHANGED
@@ -11,7 +11,7 @@ from lightning_sdk.api.studio_api import StudioApi
11
11
  from lightning_sdk.base_studio import BaseStudio
12
12
  from lightning_sdk.constants import _LIGHTNING_DEBUG
13
13
  from lightning_sdk.lightning_cloud.openapi import V1ClusterType
14
- from lightning_sdk.machine import CloudProvider, Machine
14
+ from lightning_sdk.machine import DEFAULT_MACHINE, CloudProvider, Machine
15
15
  from lightning_sdk.organization import Organization
16
16
  from lightning_sdk.owner import Owner
17
17
  from lightning_sdk.status import Status
@@ -103,7 +103,16 @@ class Studio:
103
103
  self._plugins = {}
104
104
  self._studio = None
105
105
 
106
- cloud_account = _resolve_deprecated_cluster(cloud_account, cluster)
106
+ # Check to see if we're inside a studio
107
+ current_studio = None
108
+ studio_id = os.environ.get("LIGHTNING_CLOUD_SPACE_ID", None)
109
+ if studio_id is not None:
110
+ # We're inside a studio, get it by ID
111
+ current_studio = self._studio_api.get_studio_by_id(studio_id=studio_id, teamspace_id=self._teamspace.id)
112
+
113
+ cloud_account = _resolve_deprecated_cluster(
114
+ cloud_account, cluster, current_studio.cluster_id if current_studio else None
115
+ )
107
116
  cloud_provider = _resolve_deprecated_provider(cloud_provider, provider)
108
117
 
109
118
  cls_name = self._cls_name
@@ -135,14 +144,14 @@ class Studio:
135
144
  f"Available studio types: "
136
145
  f"{[bst.name.lower().replace(' ', '-') for bst in self._available_base_studios]}"
137
146
  )
147
+ else:
148
+ if current_studio:
149
+ self._studio_type = current_studio.environment_template_id
138
150
 
139
151
  # Resolve studio name if not provided: explicit → env (LIGHTNING_CLOUD_SPACE_ID) → config defaults
140
152
  if name is None and not getattr(self._skip_init, "value", False):
141
- studio_id = os.environ.get("LIGHTNING_CLOUD_SPACE_ID", None)
142
- if studio_id is not None:
143
- # We're inside a studio, get it by ID
144
- self._studio = self._studio_api.get_studio_by_id(studio_id=studio_id, teamspace_id=self._teamspace.id)
145
- name = self._studio.name
153
+ if current_studio:
154
+ name = current_studio.name
146
155
  else:
147
156
  # Try config defaults
148
157
  from lightning_sdk.utils.config import Config, DefaultConfigKeys
@@ -272,7 +281,7 @@ class Studio:
272
281
 
273
282
  def start(
274
283
  self,
275
- machine: Union[Machine, str] = Machine.CPU,
284
+ machine: Optional[Union[Machine, str]] = None,
276
285
  interruptible: Optional[bool] = None,
277
286
  max_runtime: Optional[int] = None,
278
287
  ) -> None:
@@ -287,6 +296,22 @@ class Studio:
287
296
  Defaults to 3h
288
297
 
289
298
  """
299
+ # Check to see if we're inside a studio and if its running
300
+ current_studio_machine = None
301
+ studio_id = os.environ.get("LIGHTNING_CLOUD_SPACE_ID", None)
302
+ if studio_id is not None:
303
+ # We're inside a studio, get the machine if it is running
304
+ current_studio = self._studio_api.get_studio_by_id(studio_id=studio_id, teamspace_id=self._teamspace.id)
305
+ current_status = self._studio_api._get_studio_instance_status_from_object(current_studio)
306
+
307
+ if current_status and _internal_status_to_external_status(current_status) == Status.Running:
308
+ current_studio_machine = self._studio_api.get_machine(
309
+ current_studio.id,
310
+ self._teamspace.id,
311
+ current_studio.cluster_id,
312
+ _get_org_id(self._teamspace),
313
+ )
314
+
290
315
  status = self.status
291
316
 
292
317
  if interruptible is None:
@@ -296,9 +321,14 @@ class Studio:
296
321
  else:
297
322
  interruptible = self.teamspace.start_studios_on_interruptible
298
323
 
299
- new_machine = machine
300
- if not isinstance(machine, Machine):
301
- new_machine = Machine.from_str(machine)
324
+ new_machine = DEFAULT_MACHINE
325
+ if machine is not None:
326
+ new_machine = machine
327
+ elif current_studio_machine is not None:
328
+ new_machine = current_studio_machine
329
+
330
+ if not isinstance(new_machine, Machine):
331
+ new_machine = Machine.from_str(new_machine)
302
332
 
303
333
  if status == Status.Running:
304
334
  if new_machine != self.machine: