lightning-sdk 2025.10.27__py3-none-any.whl → 2025.10.31__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/deployment_api.py +16 -0
  3. lightning_sdk/api/teamspace_api.py +1 -1
  4. lightning_sdk/cli/legacy/deploy/_auth.py +1 -2
  5. lightning_sdk/cli/utils/teamspace_selection.py +4 -5
  6. lightning_sdk/deployment/deployment.py +2 -1
  7. lightning_sdk/lightning_cloud/openapi/__init__.py +8 -0
  8. lightning_sdk/lightning_cloud/openapi/api/__init__.py +1 -0
  9. lightning_sdk/lightning_cloud/openapi/api/assistants_service_api.py +234 -0
  10. lightning_sdk/lightning_cloud/openapi/api/markets_service_api.py +145 -0
  11. lightning_sdk/lightning_cloud/openapi/models/__init__.py +7 -0
  12. lightning_sdk/lightning_cloud/openapi/models/message_id_actions_body.py +201 -0
  13. lightning_sdk/lightning_cloud/openapi/models/project_id_storagetransfers_body.py +27 -1
  14. lightning_sdk/lightning_cloud/openapi/models/projects_id_body.py +27 -1
  15. lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_environment_template_config.py +27 -1
  16. lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_specialized_view.py +1 -0
  17. lightning_sdk/lightning_cloud/openapi/models/v1_cluster_accelerator.py +27 -1
  18. lightning_sdk/lightning_cloud/openapi/models/v1_cluster_capacity_reservation.py +27 -1
  19. lightning_sdk/lightning_cloud/openapi/models/v1_create_project_request.py +27 -1
  20. lightning_sdk/lightning_cloud/openapi/models/v1_get_market_pricing_response.py +201 -0
  21. lightning_sdk/lightning_cloud/openapi/models/v1_incident_type.py +1 -0
  22. lightning_sdk/lightning_cloud/openapi/models/v1_kubernetes_aws_config.py +279 -0
  23. lightning_sdk/lightning_cloud/openapi/models/v1_kubernetes_direct_settings_v1.py +253 -0
  24. lightning_sdk/lightning_cloud/openapi/models/v1_kubernetes_direct_v1.py +53 -1
  25. lightning_sdk/lightning_cloud/openapi/models/v1_list_conversation_message_actions_response.py +123 -0
  26. lightning_sdk/lightning_cloud/openapi/models/v1_market_price.py +149 -0
  27. lightning_sdk/lightning_cloud/openapi/models/v1_membership.py +27 -1
  28. lightning_sdk/lightning_cloud/openapi/models/v1_message_action.py +279 -0
  29. lightning_sdk/lightning_cloud/openapi/models/v1_project_membership.py +27 -1
  30. lightning_sdk/lightning_cloud/openapi/models/v1_project_settings.py +27 -1
  31. lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +79 -183
  32. lightning_sdk/studio.py +3 -2
  33. lightning_sdk/utils/logging.py +72 -0
  34. {lightning_sdk-2025.10.27.dist-info → lightning_sdk-2025.10.31.dist-info}/METADATA +1 -1
  35. {lightning_sdk-2025.10.27.dist-info → lightning_sdk-2025.10.31.dist-info}/RECORD +39 -30
  36. {lightning_sdk-2025.10.27.dist-info → lightning_sdk-2025.10.31.dist-info}/LICENSE +0 -0
  37. {lightning_sdk-2025.10.27.dist-info → lightning_sdk-2025.10.31.dist-info}/WHEEL +0 -0
  38. {lightning_sdk-2025.10.27.dist-info → lightning_sdk-2025.10.31.dist-info}/entry_points.txt +0 -0
  39. {lightning_sdk-2025.10.27.dist-info → lightning_sdk-2025.10.31.dist-info}/top_level.txt +0 -0
@@ -57,10 +57,8 @@ class V1UserFeatures(object):
57
57
  'collab_screen_sharing': 'bool',
58
58
  'control_center_monitoring': 'bool',
59
59
  'cost_attribution_settings': 'bool',
60
- 'custom_app_domain': 'bool',
61
60
  'datasets': 'bool',
62
61
  'default_one_cluster': 'bool',
63
- 'deployment_persistent_disk': 'bool',
64
62
  'drive_v2': 'bool',
65
63
  'enterprise_compute_admin': 'bool',
66
64
  'f234': 'bool',
@@ -78,16 +76,16 @@ class V1UserFeatures(object):
78
76
  'f255': 'bool',
79
77
  'f258': 'bool',
80
78
  'f259': 'bool',
81
- 'f260': 'bool',
82
79
  'f261': 'bool',
83
80
  'f262': 'bool',
84
- 'f263': 'bool',
85
81
  'f265': 'bool',
86
82
  'f266': 'bool',
87
- 'f267': 'bool',
88
83
  'f268': 'bool',
89
84
  'f269': 'bool',
90
85
  'f270': 'bool',
86
+ 'f271': 'bool',
87
+ 'f272': 'bool',
88
+ 'f273': 'bool',
91
89
  'fair_share': 'bool',
92
90
  'featured_studios_admin': 'bool',
93
91
  'job_artifacts_v2': 'bool',
@@ -98,7 +96,6 @@ class V1UserFeatures(object):
98
96
  'marketplace': 'bool',
99
97
  'mmt_fault_tolerance': 'bool',
100
98
  'mmt_strategy_selector': 'bool',
101
- 'model_api_dashboard': 'bool',
102
99
  'multiple_studio_versions': 'bool',
103
100
  'nerf_fs_nonpaying': 'bool',
104
101
  'org_level_member_permissions': 'bool',
@@ -124,7 +121,6 @@ class V1UserFeatures(object):
124
121
  'specialised_studios': 'bool',
125
122
  'storage_overuse_deletion': 'bool',
126
123
  'studio_config': 'bool',
127
- 'studio_sharing_v2': 'bool',
128
124
  'studio_version_visibility': 'bool',
129
125
  'vultr': 'bool',
130
126
  'weka': 'bool',
@@ -148,10 +144,8 @@ class V1UserFeatures(object):
148
144
  'collab_screen_sharing': 'collabScreenSharing',
149
145
  'control_center_monitoring': 'controlCenterMonitoring',
150
146
  'cost_attribution_settings': 'costAttributionSettings',
151
- 'custom_app_domain': 'customAppDomain',
152
147
  'datasets': 'datasets',
153
148
  'default_one_cluster': 'defaultOneCluster',
154
- 'deployment_persistent_disk': 'deploymentPersistentDisk',
155
149
  'drive_v2': 'driveV2',
156
150
  'enterprise_compute_admin': 'enterpriseComputeAdmin',
157
151
  'f234': 'f234',
@@ -169,16 +163,16 @@ class V1UserFeatures(object):
169
163
  'f255': 'f255',
170
164
  'f258': 'f258',
171
165
  'f259': 'f259',
172
- 'f260': 'f260',
173
166
  'f261': 'f261',
174
167
  'f262': 'f262',
175
- 'f263': 'f263',
176
168
  'f265': 'f265',
177
169
  'f266': 'f266',
178
- 'f267': 'f267',
179
170
  'f268': 'f268',
180
171
  'f269': 'f269',
181
172
  'f270': 'f270',
173
+ 'f271': 'f271',
174
+ 'f272': 'f272',
175
+ 'f273': 'f273',
182
176
  'fair_share': 'fairShare',
183
177
  'featured_studios_admin': 'featuredStudiosAdmin',
184
178
  'job_artifacts_v2': 'jobArtifactsV2',
@@ -189,7 +183,6 @@ class V1UserFeatures(object):
189
183
  'marketplace': 'marketplace',
190
184
  'mmt_fault_tolerance': 'mmtFaultTolerance',
191
185
  'mmt_strategy_selector': 'mmtStrategySelector',
192
- 'model_api_dashboard': 'modelApiDashboard',
193
186
  'multiple_studio_versions': 'multipleStudioVersions',
194
187
  'nerf_fs_nonpaying': 'nerfFsNonpaying',
195
188
  'org_level_member_permissions': 'orgLevelMemberPermissions',
@@ -215,14 +208,13 @@ class V1UserFeatures(object):
215
208
  'specialised_studios': 'specialisedStudios',
216
209
  'storage_overuse_deletion': 'storageOveruseDeletion',
217
210
  'studio_config': 'studioConfig',
218
- 'studio_sharing_v2': 'studioSharingV2',
219
211
  'studio_version_visibility': 'studioVersionVisibility',
220
212
  'vultr': 'vultr',
221
213
  'weka': 'weka',
222
214
  'writable_s3_connections': 'writableS3Connections'
223
215
  }
224
216
 
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
217
+ 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, datasets: 'bool' =None, default_one_cluster: '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, f261: 'bool' =None, f262: 'bool' =None, f265: 'bool' =None, f266: 'bool' =None, f268: 'bool' =None, f269: 'bool' =None, f270: 'bool' =None, f271: 'bool' =None, f272: 'bool' =None, f273: '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, 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_version_visibility: 'bool' =None, vultr: 'bool' =None, weka: 'bool' =None, writable_s3_connections: 'bool' =None): # noqa: E501
226
218
  """V1UserFeatures - a model defined in Swagger""" # noqa: E501
227
219
  self._affiliate_links = None
228
220
  self._agents_v2 = None
@@ -240,10 +232,8 @@ class V1UserFeatures(object):
240
232
  self._collab_screen_sharing = None
241
233
  self._control_center_monitoring = None
242
234
  self._cost_attribution_settings = None
243
- self._custom_app_domain = None
244
235
  self._datasets = None
245
236
  self._default_one_cluster = None
246
- self._deployment_persistent_disk = None
247
237
  self._drive_v2 = None
248
238
  self._enterprise_compute_admin = None
249
239
  self._f234 = None
@@ -261,16 +251,16 @@ class V1UserFeatures(object):
261
251
  self._f255 = None
262
252
  self._f258 = None
263
253
  self._f259 = None
264
- self._f260 = None
265
254
  self._f261 = None
266
255
  self._f262 = None
267
- self._f263 = None
268
256
  self._f265 = None
269
257
  self._f266 = None
270
- self._f267 = None
271
258
  self._f268 = None
272
259
  self._f269 = None
273
260
  self._f270 = None
261
+ self._f271 = None
262
+ self._f272 = None
263
+ self._f273 = None
274
264
  self._fair_share = None
275
265
  self._featured_studios_admin = None
276
266
  self._job_artifacts_v2 = None
@@ -281,7 +271,6 @@ class V1UserFeatures(object):
281
271
  self._marketplace = None
282
272
  self._mmt_fault_tolerance = None
283
273
  self._mmt_strategy_selector = None
284
- self._model_api_dashboard = None
285
274
  self._multiple_studio_versions = None
286
275
  self._nerf_fs_nonpaying = None
287
276
  self._org_level_member_permissions = None
@@ -307,7 +296,6 @@ class V1UserFeatures(object):
307
296
  self._specialised_studios = None
308
297
  self._storage_overuse_deletion = None
309
298
  self._studio_config = None
310
- self._studio_sharing_v2 = None
311
299
  self._studio_version_visibility = None
312
300
  self._vultr = None
313
301
  self._weka = None
@@ -345,14 +333,10 @@ class V1UserFeatures(object):
345
333
  self.control_center_monitoring = control_center_monitoring
346
334
  if cost_attribution_settings is not None:
347
335
  self.cost_attribution_settings = cost_attribution_settings
348
- if custom_app_domain is not None:
349
- self.custom_app_domain = custom_app_domain
350
336
  if datasets is not None:
351
337
  self.datasets = datasets
352
338
  if default_one_cluster is not None:
353
339
  self.default_one_cluster = default_one_cluster
354
- if deployment_persistent_disk is not None:
355
- self.deployment_persistent_disk = deployment_persistent_disk
356
340
  if drive_v2 is not None:
357
341
  self.drive_v2 = drive_v2
358
342
  if enterprise_compute_admin is not None:
@@ -387,26 +371,26 @@ class V1UserFeatures(object):
387
371
  self.f258 = f258
388
372
  if f259 is not None:
389
373
  self.f259 = f259
390
- if f260 is not None:
391
- self.f260 = f260
392
374
  if f261 is not None:
393
375
  self.f261 = f261
394
376
  if f262 is not None:
395
377
  self.f262 = f262
396
- if f263 is not None:
397
- self.f263 = f263
398
378
  if f265 is not None:
399
379
  self.f265 = f265
400
380
  if f266 is not None:
401
381
  self.f266 = f266
402
- if f267 is not None:
403
- self.f267 = f267
404
382
  if f268 is not None:
405
383
  self.f268 = f268
406
384
  if f269 is not None:
407
385
  self.f269 = f269
408
386
  if f270 is not None:
409
387
  self.f270 = f270
388
+ if f271 is not None:
389
+ self.f271 = f271
390
+ if f272 is not None:
391
+ self.f272 = f272
392
+ if f273 is not None:
393
+ self.f273 = f273
410
394
  if fair_share is not None:
411
395
  self.fair_share = fair_share
412
396
  if featured_studios_admin is not None:
@@ -427,8 +411,6 @@ class V1UserFeatures(object):
427
411
  self.mmt_fault_tolerance = mmt_fault_tolerance
428
412
  if mmt_strategy_selector is not None:
429
413
  self.mmt_strategy_selector = mmt_strategy_selector
430
- if model_api_dashboard is not None:
431
- self.model_api_dashboard = model_api_dashboard
432
414
  if multiple_studio_versions is not None:
433
415
  self.multiple_studio_versions = multiple_studio_versions
434
416
  if nerf_fs_nonpaying is not None:
@@ -479,8 +461,6 @@ class V1UserFeatures(object):
479
461
  self.storage_overuse_deletion = storage_overuse_deletion
480
462
  if studio_config is not None:
481
463
  self.studio_config = studio_config
482
- if studio_sharing_v2 is not None:
483
- self.studio_sharing_v2 = studio_sharing_v2
484
464
  if studio_version_visibility is not None:
485
465
  self.studio_version_visibility = studio_version_visibility
486
466
  if vultr is not None:
@@ -826,27 +806,6 @@ class V1UserFeatures(object):
826
806
 
827
807
  self._cost_attribution_settings = cost_attribution_settings
828
808
 
829
- @property
830
- def custom_app_domain(self) -> 'bool':
831
- """Gets the custom_app_domain of this V1UserFeatures. # noqa: E501
832
-
833
-
834
- :return: The custom_app_domain of this V1UserFeatures. # noqa: E501
835
- :rtype: bool
836
- """
837
- return self._custom_app_domain
838
-
839
- @custom_app_domain.setter
840
- def custom_app_domain(self, custom_app_domain: 'bool'):
841
- """Sets the custom_app_domain of this V1UserFeatures.
842
-
843
-
844
- :param custom_app_domain: The custom_app_domain of this V1UserFeatures. # noqa: E501
845
- :type: bool
846
- """
847
-
848
- self._custom_app_domain = custom_app_domain
849
-
850
809
  @property
851
810
  def datasets(self) -> 'bool':
852
811
  """Gets the datasets of this V1UserFeatures. # noqa: E501
@@ -889,27 +848,6 @@ class V1UserFeatures(object):
889
848
 
890
849
  self._default_one_cluster = default_one_cluster
891
850
 
892
- @property
893
- def deployment_persistent_disk(self) -> 'bool':
894
- """Gets the deployment_persistent_disk of this V1UserFeatures. # noqa: E501
895
-
896
-
897
- :return: The deployment_persistent_disk of this V1UserFeatures. # noqa: E501
898
- :rtype: bool
899
- """
900
- return self._deployment_persistent_disk
901
-
902
- @deployment_persistent_disk.setter
903
- def deployment_persistent_disk(self, deployment_persistent_disk: 'bool'):
904
- """Sets the deployment_persistent_disk of this V1UserFeatures.
905
-
906
-
907
- :param deployment_persistent_disk: The deployment_persistent_disk of this V1UserFeatures. # noqa: E501
908
- :type: bool
909
- """
910
-
911
- self._deployment_persistent_disk = deployment_persistent_disk
912
-
913
851
  @property
914
852
  def drive_v2(self) -> 'bool':
915
853
  """Gets the drive_v2 of this V1UserFeatures. # noqa: E501
@@ -1267,27 +1205,6 @@ class V1UserFeatures(object):
1267
1205
 
1268
1206
  self._f259 = f259
1269
1207
 
1270
- @property
1271
- def f260(self) -> 'bool':
1272
- """Gets the f260 of this V1UserFeatures. # noqa: E501
1273
-
1274
-
1275
- :return: The f260 of this V1UserFeatures. # noqa: E501
1276
- :rtype: bool
1277
- """
1278
- return self._f260
1279
-
1280
- @f260.setter
1281
- def f260(self, f260: 'bool'):
1282
- """Sets the f260 of this V1UserFeatures.
1283
-
1284
-
1285
- :param f260: The f260 of this V1UserFeatures. # noqa: E501
1286
- :type: bool
1287
- """
1288
-
1289
- self._f260 = f260
1290
-
1291
1208
  @property
1292
1209
  def f261(self) -> 'bool':
1293
1210
  """Gets the f261 of this V1UserFeatures. # noqa: E501
@@ -1330,27 +1247,6 @@ class V1UserFeatures(object):
1330
1247
 
1331
1248
  self._f262 = f262
1332
1249
 
1333
- @property
1334
- def f263(self) -> 'bool':
1335
- """Gets the f263 of this V1UserFeatures. # noqa: E501
1336
-
1337
-
1338
- :return: The f263 of this V1UserFeatures. # noqa: E501
1339
- :rtype: bool
1340
- """
1341
- return self._f263
1342
-
1343
- @f263.setter
1344
- def f263(self, f263: 'bool'):
1345
- """Sets the f263 of this V1UserFeatures.
1346
-
1347
-
1348
- :param f263: The f263 of this V1UserFeatures. # noqa: E501
1349
- :type: bool
1350
- """
1351
-
1352
- self._f263 = f263
1353
-
1354
1250
  @property
1355
1251
  def f265(self) -> 'bool':
1356
1252
  """Gets the f265 of this V1UserFeatures. # noqa: E501
@@ -1393,27 +1289,6 @@ class V1UserFeatures(object):
1393
1289
 
1394
1290
  self._f266 = f266
1395
1291
 
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
1292
  @property
1418
1293
  def f268(self) -> 'bool':
1419
1294
  """Gets the f268 of this V1UserFeatures. # noqa: E501
@@ -1477,6 +1352,69 @@ class V1UserFeatures(object):
1477
1352
 
1478
1353
  self._f270 = f270
1479
1354
 
1355
+ @property
1356
+ def f271(self) -> 'bool':
1357
+ """Gets the f271 of this V1UserFeatures. # noqa: E501
1358
+
1359
+
1360
+ :return: The f271 of this V1UserFeatures. # noqa: E501
1361
+ :rtype: bool
1362
+ """
1363
+ return self._f271
1364
+
1365
+ @f271.setter
1366
+ def f271(self, f271: 'bool'):
1367
+ """Sets the f271 of this V1UserFeatures.
1368
+
1369
+
1370
+ :param f271: The f271 of this V1UserFeatures. # noqa: E501
1371
+ :type: bool
1372
+ """
1373
+
1374
+ self._f271 = f271
1375
+
1376
+ @property
1377
+ def f272(self) -> 'bool':
1378
+ """Gets the f272 of this V1UserFeatures. # noqa: E501
1379
+
1380
+
1381
+ :return: The f272 of this V1UserFeatures. # noqa: E501
1382
+ :rtype: bool
1383
+ """
1384
+ return self._f272
1385
+
1386
+ @f272.setter
1387
+ def f272(self, f272: 'bool'):
1388
+ """Sets the f272 of this V1UserFeatures.
1389
+
1390
+
1391
+ :param f272: The f272 of this V1UserFeatures. # noqa: E501
1392
+ :type: bool
1393
+ """
1394
+
1395
+ self._f272 = f272
1396
+
1397
+ @property
1398
+ def f273(self) -> 'bool':
1399
+ """Gets the f273 of this V1UserFeatures. # noqa: E501
1400
+
1401
+
1402
+ :return: The f273 of this V1UserFeatures. # noqa: E501
1403
+ :rtype: bool
1404
+ """
1405
+ return self._f273
1406
+
1407
+ @f273.setter
1408
+ def f273(self, f273: 'bool'):
1409
+ """Sets the f273 of this V1UserFeatures.
1410
+
1411
+
1412
+ :param f273: The f273 of this V1UserFeatures. # noqa: E501
1413
+ :type: bool
1414
+ """
1415
+
1416
+ self._f273 = f273
1417
+
1480
1418
  @property
1481
1419
  def fair_share(self) -> 'bool':
1482
1420
  """Gets the fair_share of this V1UserFeatures. # noqa: E501
@@ -1687,27 +1625,6 @@ class V1UserFeatures(object):
1687
1625
 
1688
1626
  self._mmt_strategy_selector = mmt_strategy_selector
1689
1627
 
1690
- @property
1691
- def model_api_dashboard(self) -> 'bool':
1692
- """Gets the model_api_dashboard of this V1UserFeatures. # noqa: E501
1693
-
1694
-
1695
- :return: The model_api_dashboard of this V1UserFeatures. # noqa: E501
1696
- :rtype: bool
1697
- """
1698
- return self._model_api_dashboard
1699
-
1700
- @model_api_dashboard.setter
1701
- def model_api_dashboard(self, model_api_dashboard: 'bool'):
1702
- """Sets the model_api_dashboard of this V1UserFeatures.
1703
-
1704
-
1705
- :param model_api_dashboard: The model_api_dashboard of this V1UserFeatures. # noqa: E501
1706
- :type: bool
1707
- """
1708
-
1709
- self._model_api_dashboard = model_api_dashboard
1710
-
1711
1628
  @property
1712
1629
  def multiple_studio_versions(self) -> 'bool':
1713
1630
  """Gets the multiple_studio_versions of this V1UserFeatures. # noqa: E501
@@ -2233,27 +2150,6 @@ class V1UserFeatures(object):
2233
2150
 
2234
2151
  self._studio_config = studio_config
2235
2152
 
2236
- @property
2237
- def studio_sharing_v2(self) -> 'bool':
2238
- """Gets the studio_sharing_v2 of this V1UserFeatures. # noqa: E501
2239
-
2240
-
2241
- :return: The studio_sharing_v2 of this V1UserFeatures. # noqa: E501
2242
- :rtype: bool
2243
- """
2244
- return self._studio_sharing_v2
2245
-
2246
- @studio_sharing_v2.setter
2247
- def studio_sharing_v2(self, studio_sharing_v2: 'bool'):
2248
- """Sets the studio_sharing_v2 of this V1UserFeatures.
2249
-
2250
-
2251
- :param studio_sharing_v2: The studio_sharing_v2 of this V1UserFeatures. # noqa: E501
2252
- :type: bool
2253
- """
2254
-
2255
- self._studio_sharing_v2 = studio_sharing_v2
2256
-
2257
2153
  @property
2258
2154
  def studio_version_visibility(self) -> 'bool':
2259
2155
  """Gets the studio_version_visibility of this V1UserFeatures. # noqa: E501
lightning_sdk/studio.py CHANGED
@@ -17,6 +17,7 @@ from lightning_sdk.owner import Owner
17
17
  from lightning_sdk.status import Status
18
18
  from lightning_sdk.teamspace import Teamspace
19
19
  from lightning_sdk.user import User
20
+ from lightning_sdk.utils.logging import TrackCallsMeta
20
21
  from lightning_sdk.utils.names import random_unique_name
21
22
  from lightning_sdk.utils.resolve import (
22
23
  _get_org_id,
@@ -34,7 +35,7 @@ if TYPE_CHECKING:
34
35
  _logger = _setup_logger(__name__)
35
36
 
36
37
 
37
- class Studio:
38
+ class Studio(metaclass=TrackCallsMeta):
38
39
  """A single Lightning AI Studio.
39
40
 
40
41
  Allows to fully control a studio, including retrieving the status, running commands
@@ -106,7 +107,7 @@ class Studio:
106
107
  # Check to see if we're inside a studio
107
108
  current_studio = None
108
109
  studio_id = os.environ.get("LIGHTNING_CLOUD_SPACE_ID", None)
109
- if studio_id is not None:
110
+ if studio_id is not None and self._teamspace is not None:
110
111
  # We're inside a studio, get it by ID
111
112
  current_studio = self._studio_api.get_studio_by_id(studio_id=studio_id, teamspace_id=self._teamspace.id)
112
113
 
@@ -0,0 +1,72 @@
1
+ import functools
2
+ import inspect
3
+ import time
4
+ import traceback
5
+ from contextlib import suppress
6
+ from typing import Callable, Dict, Tuple
7
+
8
+ from lightning_sdk.lightning_cloud.openapi import V1CreateSDKCommandHistoryRequest, V1SDKCommandHistorySeverity
9
+ from lightning_sdk.lightning_cloud.openapi.models.v1_sdk_command_history_type import V1SDKCommandHistoryType
10
+ from lightning_sdk.lightning_cloud.rest_client import LightningClient
11
+
12
+
13
+ def track_calls() -> Callable[..., any]:
14
+ def decorator(func: Callable[..., any]) -> Callable[..., any]:
15
+ @functools.wraps(func)
16
+ def wrapper(*args: Tuple[any, ...], **kwargs: Dict[str, any]) -> any:
17
+ start_time = time.time()
18
+ sig = inspect.signature(func)
19
+ bound_args = sig.bind(*args, **kwargs)
20
+ bound_args.apply_defaults()
21
+
22
+ message = f"""ARGS: {", ".join(f"{k}: {v}" for k, v in bound_args.arguments.items() if k != "self")} """
23
+
24
+ body = V1CreateSDKCommandHistoryRequest(
25
+ command=func.__qualname__,
26
+ message=message,
27
+ project_id=None,
28
+ severity=V1SDKCommandHistorySeverity.INFO,
29
+ type=V1SDKCommandHistoryType.SDK,
30
+ )
31
+
32
+ try:
33
+ return func(*args, **kwargs)
34
+
35
+ except Exception as e:
36
+ body.severity = V1SDKCommandHistorySeverity.ERROR
37
+ body.message += f" | Error: {type(e).__name__}: {e!s} | Traceback: {traceback.format_exc(limit=3)}"
38
+ body.duration = int(time.time() - start_time)
39
+ with suppress(Exception):
40
+ client = LightningClient(retry=False, max_tries=0)
41
+ client.s_dk_command_history_service_create_sdk_command_history(body=body)
42
+ raise
43
+
44
+ return wrapper
45
+
46
+ return decorator
47
+
48
+
49
+ class TrackCallsMeta(type):
50
+ def __new__(cls, name: any, bases: any, attrs: any) -> type.__new__:
51
+ for attr_name, attr_value in attrs.items():
52
+ if attr_name.startswith("__") and attr_name not in ("__init__", "__call__"):
53
+ attrs[attr_name] = attr_value
54
+ continue
55
+
56
+ # Noisy
57
+ if attr_name in ("_cls_name"):
58
+ attrs[attr_name] = attr_value
59
+ continue
60
+
61
+ if callable(attr_value):
62
+ attrs[attr_name] = track_calls()(attr_value)
63
+
64
+ elif isinstance(attr_value, property):
65
+ fget = track_calls()(attr_value.fget) if attr_value.fget else None
66
+ fset = track_calls()(attr_value.fset) if attr_value.fset else None
67
+ fdel = track_calls()(attr_value.fdel) if attr_value.fdel else None
68
+ attrs[attr_name] = property(fget, fset, fdel)
69
+
70
+ else:
71
+ attrs[attr_name] = attr_value
72
+ return super().__new__(cls, name, bases, attrs)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lightning_sdk
3
- Version: 2025.10.27
3
+ Version: 2025.10.31
4
4
  Summary: SDK to develop using Lightning AI Studios
5
5
  Author-email: Lightning-AI <justus@lightning.ai>
6
6
  License: MIT License