lightning-sdk 0.1.50__py3-none-any.whl → 0.1.53__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 (69) hide show
  1. lightning_sdk/__init__.py +1 -1
  2. lightning_sdk/ai_hub.py +16 -27
  3. lightning_sdk/api/ai_hub_api.py +7 -1
  4. lightning_sdk/api/job_api.py +12 -7
  5. lightning_sdk/api/lit_container_api.py +24 -7
  6. lightning_sdk/api/mmt_api.py +12 -7
  7. lightning_sdk/api/utils.py +52 -0
  8. lightning_sdk/cli/run.py +65 -18
  9. lightning_sdk/cli/serve.py +1 -5
  10. lightning_sdk/cli/upload.py +33 -15
  11. lightning_sdk/helpers.py +1 -1
  12. lightning_sdk/job/base.py +28 -1
  13. lightning_sdk/job/job.py +27 -25
  14. lightning_sdk/job/v1.py +6 -2
  15. lightning_sdk/job/v2.py +12 -12
  16. lightning_sdk/lightning_cloud/login.py +4 -1
  17. lightning_sdk/lightning_cloud/openapi/__init__.py +17 -0
  18. lightning_sdk/lightning_cloud/openapi/api/assistants_service_api.py +105 -0
  19. lightning_sdk/lightning_cloud/openapi/api/cluster_service_api.py +417 -1
  20. lightning_sdk/lightning_cloud/openapi/api/file_system_service_api.py +105 -0
  21. lightning_sdk/lightning_cloud/openapi/api/jobs_service_api.py +5 -1
  22. lightning_sdk/lightning_cloud/openapi/api/lit_registry_service_api.py +113 -0
  23. lightning_sdk/lightning_cloud/openapi/api/storage_service_api.py +101 -0
  24. lightning_sdk/lightning_cloud/openapi/api/user_service_api.py +5 -1
  25. lightning_sdk/lightning_cloud/openapi/models/__init__.py +17 -0
  26. lightning_sdk/lightning_cloud/openapi/models/cluster_id_usagerestrictions_body.py +175 -0
  27. lightning_sdk/lightning_cloud/openapi/models/deployments_id_body.py +27 -1
  28. lightning_sdk/lightning_cloud/openapi/models/id_contactowner_body.py +149 -0
  29. lightning_sdk/lightning_cloud/openapi/models/litregistry_lit_repo_name_body.py +123 -0
  30. lightning_sdk/lightning_cloud/openapi/models/metricsstream_create_body.py +27 -1
  31. lightning_sdk/lightning_cloud/openapi/models/usagerestrictions_id_body.py +175 -0
  32. lightning_sdk/lightning_cloud/openapi/models/v1_assistant_model_status.py +4 -0
  33. lightning_sdk/lightning_cloud/openapi/models/v1_cloud_provider.py +104 -0
  34. lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_artifact_event.py +149 -0
  35. lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_artifact_event_type.py +103 -0
  36. lightning_sdk/lightning_cloud/openapi/models/v1_cluster_accelerator.py +81 -3
  37. lightning_sdk/lightning_cloud/openapi/models/v1_cluster_spec.py +27 -1
  38. lightning_sdk/lightning_cloud/openapi/models/v1_cluster_tagging_options.py +29 -3
  39. lightning_sdk/lightning_cloud/openapi/models/v1_cluster_usage_restriction.py +227 -0
  40. lightning_sdk/lightning_cloud/openapi/models/v1_contact_assistant_owner_reason.py +102 -0
  41. lightning_sdk/lightning_cloud/openapi/models/v1_contact_assistant_owner_response.py +97 -0
  42. lightning_sdk/lightning_cloud/openapi/models/v1_delete_cluster_usage_restriction_response.py +97 -0
  43. lightning_sdk/lightning_cloud/openapi/models/v1_deployment.py +27 -1
  44. lightning_sdk/lightning_cloud/openapi/models/v1_deployment_api.py +53 -1
  45. lightning_sdk/lightning_cloud/openapi/models/v1_filesystem_mmt.py +175 -0
  46. lightning_sdk/lightning_cloud/openapi/models/v1_job_spec.py +27 -1
  47. lightning_sdk/lightning_cloud/openapi/models/v1_list_cluster_usage_restrictions_response.py +123 -0
  48. lightning_sdk/lightning_cloud/openapi/models/v1_list_filesystem_mm_ts_response.py +123 -0
  49. lightning_sdk/lightning_cloud/openapi/models/v1_metrics_stream.py +27 -1
  50. lightning_sdk/lightning_cloud/openapi/models/v1_model.py +27 -1
  51. lightning_sdk/lightning_cloud/openapi/models/v1_path_mapping.py +175 -0
  52. lightning_sdk/lightning_cloud/openapi/models/v1_post_cloud_space_artifact_events_response.py +97 -0
  53. lightning_sdk/lightning_cloud/openapi/models/v1_resource_visibility.py +27 -1
  54. lightning_sdk/lightning_cloud/openapi/models/v1_update_lit_repository_response.py +97 -0
  55. lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +128 -76
  56. lightning_sdk/lightning_cloud/utils/data_connection.py +75 -7
  57. lightning_sdk/mmt/base.py +36 -26
  58. lightning_sdk/mmt/mmt.py +28 -26
  59. lightning_sdk/mmt/v1.py +4 -1
  60. lightning_sdk/mmt/v2.py +14 -13
  61. lightning_sdk/models.py +5 -4
  62. lightning_sdk/studio.py +68 -1
  63. lightning_sdk/utils/resolve.py +7 -0
  64. {lightning_sdk-0.1.50.dist-info → lightning_sdk-0.1.53.dist-info}/METADATA +2 -2
  65. {lightning_sdk-0.1.50.dist-info → lightning_sdk-0.1.53.dist-info}/RECORD +69 -52
  66. {lightning_sdk-0.1.50.dist-info → lightning_sdk-0.1.53.dist-info}/LICENSE +0 -0
  67. {lightning_sdk-0.1.50.dist-info → lightning_sdk-0.1.53.dist-info}/WHEEL +0 -0
  68. {lightning_sdk-0.1.50.dist-info → lightning_sdk-0.1.53.dist-info}/entry_points.txt +0 -0
  69. {lightning_sdk-0.1.50.dist-info → lightning_sdk-0.1.53.dist-info}/top_level.txt +0 -0
@@ -58,21 +58,23 @@ class V1UserFeatures(object):
58
58
  'custom_app_domain': 'bool',
59
59
  'custom_instance_types': 'bool',
60
60
  'default_one_cluster': 'bool',
61
+ 'deployment_alerts': 'bool',
61
62
  'deployment_customize_api': 'bool',
62
63
  'deployment_data_path': 'bool',
63
- 'deployment_gallery': 'bool',
64
64
  'deployment_persistent_disk': 'bool',
65
+ 'deployment_version_upgrade': 'bool',
65
66
  'deployment_version_visibility': 'bool',
66
67
  'docs_agent': 'bool',
67
68
  'drive_v2': 'bool',
68
69
  'enable_crypto_crackdown': 'bool',
69
70
  'enable_efs': 'bool',
70
71
  'enable_storage_limits': 'bool',
72
+ 'fair_share': 'bool',
71
73
  'featured_studios_admin': 'bool',
72
74
  'filesystem_optimisation': 'bool',
73
- 'gcp': 'bool',
74
75
  'inference_job_deployment_plugin': 'bool',
75
76
  'instant_capacity_reservation': 'bool',
77
+ 'job_artifacts_v2': 'bool',
76
78
  'jobs_init': 'bool',
77
79
  'jobs_v2': 'bool',
78
80
  'landing_studios': 'bool',
@@ -82,7 +84,6 @@ class V1UserFeatures(object):
82
84
  'mmt_fault_tolerance': 'bool',
83
85
  'mmt_strategy_selector': 'bool',
84
86
  'mmt_v2': 'bool',
85
- 'model_store': 'bool',
86
87
  'multiple_deployment_versions': 'bool',
87
88
  'multiple_studio_versions': 'bool',
88
89
  'org_level_member_permissions': 'bool',
@@ -108,6 +109,7 @@ class V1UserFeatures(object):
108
109
  'restart_ide_on_hang': 'bool',
109
110
  'restartable_jobs': 'bool',
110
111
  'runnable_public_studio_page': 'bool',
112
+ 'security_docs': 'bool',
111
113
  'show_dev_admin': 'bool',
112
114
  'slurm': 'bool',
113
115
  'slurm_machine_selector': 'bool',
@@ -142,21 +144,23 @@ class V1UserFeatures(object):
142
144
  'custom_app_domain': 'customAppDomain',
143
145
  'custom_instance_types': 'customInstanceTypes',
144
146
  'default_one_cluster': 'defaultOneCluster',
147
+ 'deployment_alerts': 'deploymentAlerts',
145
148
  'deployment_customize_api': 'deploymentCustomizeApi',
146
149
  'deployment_data_path': 'deploymentDataPath',
147
- 'deployment_gallery': 'deploymentGallery',
148
150
  'deployment_persistent_disk': 'deploymentPersistentDisk',
151
+ 'deployment_version_upgrade': 'deploymentVersionUpgrade',
149
152
  'deployment_version_visibility': 'deploymentVersionVisibility',
150
153
  'docs_agent': 'docsAgent',
151
154
  'drive_v2': 'driveV2',
152
155
  'enable_crypto_crackdown': 'enableCryptoCrackdown',
153
156
  'enable_efs': 'enableEfs',
154
157
  'enable_storage_limits': 'enableStorageLimits',
158
+ 'fair_share': 'fairShare',
155
159
  'featured_studios_admin': 'featuredStudiosAdmin',
156
160
  'filesystem_optimisation': 'filesystemOptimisation',
157
- 'gcp': 'gcp',
158
161
  'inference_job_deployment_plugin': 'inferenceJobDeploymentPlugin',
159
162
  'instant_capacity_reservation': 'instantCapacityReservation',
163
+ 'job_artifacts_v2': 'jobArtifactsV2',
160
164
  'jobs_init': 'jobsInit',
161
165
  'jobs_v2': 'jobsV2',
162
166
  'landing_studios': 'landingStudios',
@@ -166,7 +170,6 @@ class V1UserFeatures(object):
166
170
  'mmt_fault_tolerance': 'mmtFaultTolerance',
167
171
  'mmt_strategy_selector': 'mmtStrategySelector',
168
172
  'mmt_v2': 'mmtV2',
169
- 'model_store': 'modelStore',
170
173
  'multiple_deployment_versions': 'multipleDeploymentVersions',
171
174
  'multiple_studio_versions': 'multipleStudioVersions',
172
175
  'org_level_member_permissions': 'orgLevelMemberPermissions',
@@ -192,6 +195,7 @@ class V1UserFeatures(object):
192
195
  'restart_ide_on_hang': 'restartIdeOnHang',
193
196
  'restartable_jobs': 'restartableJobs',
194
197
  'runnable_public_studio_page': 'runnablePublicStudioPage',
198
+ 'security_docs': 'securityDocs',
195
199
  'show_dev_admin': 'showDevAdmin',
196
200
  'slurm': 'slurm',
197
201
  'slurm_machine_selector': 'slurmMachineSelector',
@@ -208,7 +212,7 @@ class V1UserFeatures(object):
208
212
  'writable_data_connections': 'writableDataConnections'
209
213
  }
210
214
 
211
- def __init__(self, advanced_deployment_autoscaling: 'bool' =None, affiliate_links: 'bool' =None, agents_v2: 'bool' =None, ai_hub_monetization: 'bool' =None, auto_fast_load: 'bool' =None, auto_join_orgs: 'bool' =None, b2c_experience: 'bool' =None, cap_add: 'list[str]' =None, cap_drop: 'list[str]' =None, capacity_reservation_byoc: 'bool' =None, capacity_reservation_dry_run: 'bool' =None, code_tab: 'bool' =None, collab_screen_sharing: 'bool' =None, cost_attribution_settings: 'bool' =None, custom_app_domain: 'bool' =None, custom_instance_types: 'bool' =None, default_one_cluster: 'bool' =None, deployment_customize_api: 'bool' =None, deployment_data_path: 'bool' =None, deployment_gallery: 'bool' =None, deployment_persistent_disk: 'bool' =None, deployment_version_visibility: 'bool' =None, docs_agent: 'bool' =None, drive_v2: 'bool' =None, enable_crypto_crackdown: 'bool' =None, enable_efs: 'bool' =None, enable_storage_limits: 'bool' =None, featured_studios_admin: 'bool' =None, filesystem_optimisation: 'bool' =None, gcp: 'bool' =None, inference_job_deployment_plugin: 'bool' =None, instant_capacity_reservation: 'bool' =None, jobs_init: 'bool' =None, jobs_v2: 'bool' =None, landing_studios: 'bool' =None, lightning_registry: 'bool' =None, lit_logger: 'bool' =None, lit_logger_storage_v2: 'bool' =None, mmt_fault_tolerance: 'bool' =None, mmt_strategy_selector: 'bool' =None, mmt_v2: 'bool' =None, model_store: 'bool' =None, multiple_deployment_versions: 'bool' =None, multiple_studio_versions: 'bool' =None, org_level_member_permissions: 'bool' =None, pipelines: 'bool' =None, plugin_biz_chat: 'bool' =None, plugin_distributed: 'bool' =None, plugin_fiftyone: 'bool' =None, plugin_inference: 'bool' =None, plugin_label_studio: 'bool' =None, plugin_langflow: 'bool' =None, plugin_lightning_apps: 'bool' =None, plugin_lightning_apps_distributed: 'bool' =None, plugin_mage_ai: 'bool' =None, plugin_milvus: 'bool' =None, plugin_python_profiler: 'bool' =None, plugin_react: 'bool' =None, plugin_service: 'bool' =None, plugin_sweeps: 'bool' =None, plugin_weviate: 'bool' =None, pricing_updates: 'bool' =None, product_generator: 'bool' =None, project_selector: 'bool' =None, restart_ide_on_hang: 'bool' =None, restartable_jobs: 'bool' =None, runnable_public_studio_page: 'bool' =None, show_dev_admin: 'bool' =None, slurm: 'bool' =None, slurm_machine_selector: 'bool' =None, snapshotter_service: 'bool' =None, snowflake_connection: 'bool' =None, spot_v2: 'bool' =None, studio_config: 'bool' =None, studio_on_stop: 'bool' =None, studio_version_visibility: 'bool' =None, teamspace_storage_tab: 'bool' =None, trainium2: 'bool' =None, use_rclone_mounts_only: 'bool' =None, vultr: 'bool' =None, writable_data_connections: 'bool' =None): # noqa: E501
215
+ def __init__(self, advanced_deployment_autoscaling: 'bool' =None, affiliate_links: 'bool' =None, agents_v2: 'bool' =None, ai_hub_monetization: 'bool' =None, auto_fast_load: 'bool' =None, auto_join_orgs: 'bool' =None, b2c_experience: 'bool' =None, cap_add: 'list[str]' =None, cap_drop: 'list[str]' =None, capacity_reservation_byoc: 'bool' =None, capacity_reservation_dry_run: 'bool' =None, code_tab: 'bool' =None, collab_screen_sharing: 'bool' =None, cost_attribution_settings: 'bool' =None, custom_app_domain: 'bool' =None, custom_instance_types: 'bool' =None, default_one_cluster: 'bool' =None, deployment_alerts: 'bool' =None, deployment_customize_api: 'bool' =None, deployment_data_path: 'bool' =None, deployment_persistent_disk: 'bool' =None, deployment_version_upgrade: 'bool' =None, deployment_version_visibility: 'bool' =None, docs_agent: 'bool' =None, drive_v2: 'bool' =None, enable_crypto_crackdown: 'bool' =None, enable_efs: 'bool' =None, enable_storage_limits: 'bool' =None, fair_share: 'bool' =None, featured_studios_admin: 'bool' =None, filesystem_optimisation: 'bool' =None, inference_job_deployment_plugin: 'bool' =None, instant_capacity_reservation: 'bool' =None, job_artifacts_v2: 'bool' =None, jobs_init: 'bool' =None, jobs_v2: 'bool' =None, landing_studios: 'bool' =None, lightning_registry: 'bool' =None, lit_logger: 'bool' =None, lit_logger_storage_v2: 'bool' =None, mmt_fault_tolerance: 'bool' =None, mmt_strategy_selector: 'bool' =None, mmt_v2: 'bool' =None, multiple_deployment_versions: 'bool' =None, multiple_studio_versions: 'bool' =None, org_level_member_permissions: 'bool' =None, pipelines: 'bool' =None, plugin_biz_chat: 'bool' =None, plugin_distributed: 'bool' =None, plugin_fiftyone: 'bool' =None, plugin_inference: 'bool' =None, plugin_label_studio: 'bool' =None, plugin_langflow: 'bool' =None, plugin_lightning_apps: 'bool' =None, plugin_lightning_apps_distributed: 'bool' =None, plugin_mage_ai: 'bool' =None, plugin_milvus: 'bool' =None, plugin_python_profiler: 'bool' =None, plugin_react: 'bool' =None, plugin_service: 'bool' =None, plugin_sweeps: 'bool' =None, plugin_weviate: 'bool' =None, pricing_updates: 'bool' =None, product_generator: 'bool' =None, project_selector: 'bool' =None, restart_ide_on_hang: 'bool' =None, restartable_jobs: 'bool' =None, runnable_public_studio_page: 'bool' =None, security_docs: 'bool' =None, show_dev_admin: 'bool' =None, slurm: 'bool' =None, slurm_machine_selector: 'bool' =None, snapshotter_service: 'bool' =None, snowflake_connection: 'bool' =None, spot_v2: 'bool' =None, studio_config: 'bool' =None, studio_on_stop: 'bool' =None, studio_version_visibility: 'bool' =None, teamspace_storage_tab: 'bool' =None, trainium2: 'bool' =None, use_rclone_mounts_only: 'bool' =None, vultr: 'bool' =None, writable_data_connections: 'bool' =None): # noqa: E501
212
216
  """V1UserFeatures - a model defined in Swagger""" # noqa: E501
213
217
  self._advanced_deployment_autoscaling = None
214
218
  self._affiliate_links = None
@@ -227,21 +231,23 @@ class V1UserFeatures(object):
227
231
  self._custom_app_domain = None
228
232
  self._custom_instance_types = None
229
233
  self._default_one_cluster = None
234
+ self._deployment_alerts = None
230
235
  self._deployment_customize_api = None
231
236
  self._deployment_data_path = None
232
- self._deployment_gallery = None
233
237
  self._deployment_persistent_disk = None
238
+ self._deployment_version_upgrade = None
234
239
  self._deployment_version_visibility = None
235
240
  self._docs_agent = None
236
241
  self._drive_v2 = None
237
242
  self._enable_crypto_crackdown = None
238
243
  self._enable_efs = None
239
244
  self._enable_storage_limits = None
245
+ self._fair_share = None
240
246
  self._featured_studios_admin = None
241
247
  self._filesystem_optimisation = None
242
- self._gcp = None
243
248
  self._inference_job_deployment_plugin = None
244
249
  self._instant_capacity_reservation = None
250
+ self._job_artifacts_v2 = None
245
251
  self._jobs_init = None
246
252
  self._jobs_v2 = None
247
253
  self._landing_studios = None
@@ -251,7 +257,6 @@ class V1UserFeatures(object):
251
257
  self._mmt_fault_tolerance = None
252
258
  self._mmt_strategy_selector = None
253
259
  self._mmt_v2 = None
254
- self._model_store = None
255
260
  self._multiple_deployment_versions = None
256
261
  self._multiple_studio_versions = None
257
262
  self._org_level_member_permissions = None
@@ -277,6 +282,7 @@ class V1UserFeatures(object):
277
282
  self._restart_ide_on_hang = None
278
283
  self._restartable_jobs = None
279
284
  self._runnable_public_studio_page = None
285
+ self._security_docs = None
280
286
  self._show_dev_admin = None
281
287
  self._slurm = None
282
288
  self._slurm_machine_selector = None
@@ -326,14 +332,16 @@ class V1UserFeatures(object):
326
332
  self.custom_instance_types = custom_instance_types
327
333
  if default_one_cluster is not None:
328
334
  self.default_one_cluster = default_one_cluster
335
+ if deployment_alerts is not None:
336
+ self.deployment_alerts = deployment_alerts
329
337
  if deployment_customize_api is not None:
330
338
  self.deployment_customize_api = deployment_customize_api
331
339
  if deployment_data_path is not None:
332
340
  self.deployment_data_path = deployment_data_path
333
- if deployment_gallery is not None:
334
- self.deployment_gallery = deployment_gallery
335
341
  if deployment_persistent_disk is not None:
336
342
  self.deployment_persistent_disk = deployment_persistent_disk
343
+ if deployment_version_upgrade is not None:
344
+ self.deployment_version_upgrade = deployment_version_upgrade
337
345
  if deployment_version_visibility is not None:
338
346
  self.deployment_version_visibility = deployment_version_visibility
339
347
  if docs_agent is not None:
@@ -346,16 +354,18 @@ class V1UserFeatures(object):
346
354
  self.enable_efs = enable_efs
347
355
  if enable_storage_limits is not None:
348
356
  self.enable_storage_limits = enable_storage_limits
357
+ if fair_share is not None:
358
+ self.fair_share = fair_share
349
359
  if featured_studios_admin is not None:
350
360
  self.featured_studios_admin = featured_studios_admin
351
361
  if filesystem_optimisation is not None:
352
362
  self.filesystem_optimisation = filesystem_optimisation
353
- if gcp is not None:
354
- self.gcp = gcp
355
363
  if inference_job_deployment_plugin is not None:
356
364
  self.inference_job_deployment_plugin = inference_job_deployment_plugin
357
365
  if instant_capacity_reservation is not None:
358
366
  self.instant_capacity_reservation = instant_capacity_reservation
367
+ if job_artifacts_v2 is not None:
368
+ self.job_artifacts_v2 = job_artifacts_v2
359
369
  if jobs_init is not None:
360
370
  self.jobs_init = jobs_init
361
371
  if jobs_v2 is not None:
@@ -374,8 +384,6 @@ class V1UserFeatures(object):
374
384
  self.mmt_strategy_selector = mmt_strategy_selector
375
385
  if mmt_v2 is not None:
376
386
  self.mmt_v2 = mmt_v2
377
- if model_store is not None:
378
- self.model_store = model_store
379
387
  if multiple_deployment_versions is not None:
380
388
  self.multiple_deployment_versions = multiple_deployment_versions
381
389
  if multiple_studio_versions is not None:
@@ -426,6 +434,8 @@ class V1UserFeatures(object):
426
434
  self.restartable_jobs = restartable_jobs
427
435
  if runnable_public_studio_page is not None:
428
436
  self.runnable_public_studio_page = runnable_public_studio_page
437
+ if security_docs is not None:
438
+ self.security_docs = security_docs
429
439
  if show_dev_admin is not None:
430
440
  self.show_dev_admin = show_dev_admin
431
441
  if slurm is not None:
@@ -812,6 +822,27 @@ class V1UserFeatures(object):
812
822
 
813
823
  self._default_one_cluster = default_one_cluster
814
824
 
825
+ @property
826
+ def deployment_alerts(self) -> 'bool':
827
+ """Gets the deployment_alerts of this V1UserFeatures. # noqa: E501
828
+
829
+
830
+ :return: The deployment_alerts of this V1UserFeatures. # noqa: E501
831
+ :rtype: bool
832
+ """
833
+ return self._deployment_alerts
834
+
835
+ @deployment_alerts.setter
836
+ def deployment_alerts(self, deployment_alerts: 'bool'):
837
+ """Sets the deployment_alerts of this V1UserFeatures.
838
+
839
+
840
+ :param deployment_alerts: The deployment_alerts of this V1UserFeatures. # noqa: E501
841
+ :type: bool
842
+ """
843
+
844
+ self._deployment_alerts = deployment_alerts
845
+
815
846
  @property
816
847
  def deployment_customize_api(self) -> 'bool':
817
848
  """Gets the deployment_customize_api of this V1UserFeatures. # noqa: E501
@@ -855,46 +886,46 @@ class V1UserFeatures(object):
855
886
  self._deployment_data_path = deployment_data_path
856
887
 
857
888
  @property
858
- def deployment_gallery(self) -> 'bool':
859
- """Gets the deployment_gallery of this V1UserFeatures. # noqa: E501
889
+ def deployment_persistent_disk(self) -> 'bool':
890
+ """Gets the deployment_persistent_disk of this V1UserFeatures. # noqa: E501
860
891
 
861
892
 
862
- :return: The deployment_gallery of this V1UserFeatures. # noqa: E501
893
+ :return: The deployment_persistent_disk of this V1UserFeatures. # noqa: E501
863
894
  :rtype: bool
864
895
  """
865
- return self._deployment_gallery
896
+ return self._deployment_persistent_disk
866
897
 
867
- @deployment_gallery.setter
868
- def deployment_gallery(self, deployment_gallery: 'bool'):
869
- """Sets the deployment_gallery of this V1UserFeatures.
898
+ @deployment_persistent_disk.setter
899
+ def deployment_persistent_disk(self, deployment_persistent_disk: 'bool'):
900
+ """Sets the deployment_persistent_disk of this V1UserFeatures.
870
901
 
871
902
 
872
- :param deployment_gallery: The deployment_gallery of this V1UserFeatures. # noqa: E501
903
+ :param deployment_persistent_disk: The deployment_persistent_disk of this V1UserFeatures. # noqa: E501
873
904
  :type: bool
874
905
  """
875
906
 
876
- self._deployment_gallery = deployment_gallery
907
+ self._deployment_persistent_disk = deployment_persistent_disk
877
908
 
878
909
  @property
879
- def deployment_persistent_disk(self) -> 'bool':
880
- """Gets the deployment_persistent_disk of this V1UserFeatures. # noqa: E501
910
+ def deployment_version_upgrade(self) -> 'bool':
911
+ """Gets the deployment_version_upgrade of this V1UserFeatures. # noqa: E501
881
912
 
882
913
 
883
- :return: The deployment_persistent_disk of this V1UserFeatures. # noqa: E501
914
+ :return: The deployment_version_upgrade of this V1UserFeatures. # noqa: E501
884
915
  :rtype: bool
885
916
  """
886
- return self._deployment_persistent_disk
917
+ return self._deployment_version_upgrade
887
918
 
888
- @deployment_persistent_disk.setter
889
- def deployment_persistent_disk(self, deployment_persistent_disk: 'bool'):
890
- """Sets the deployment_persistent_disk of this V1UserFeatures.
919
+ @deployment_version_upgrade.setter
920
+ def deployment_version_upgrade(self, deployment_version_upgrade: 'bool'):
921
+ """Sets the deployment_version_upgrade of this V1UserFeatures.
891
922
 
892
923
 
893
- :param deployment_persistent_disk: The deployment_persistent_disk of this V1UserFeatures. # noqa: E501
924
+ :param deployment_version_upgrade: The deployment_version_upgrade of this V1UserFeatures. # noqa: E501
894
925
  :type: bool
895
926
  """
896
927
 
897
- self._deployment_persistent_disk = deployment_persistent_disk
928
+ self._deployment_version_upgrade = deployment_version_upgrade
898
929
 
899
930
  @property
900
931
  def deployment_version_visibility(self) -> 'bool':
@@ -1022,6 +1053,27 @@ class V1UserFeatures(object):
1022
1053
 
1023
1054
  self._enable_storage_limits = enable_storage_limits
1024
1055
 
1056
+ @property
1057
+ def fair_share(self) -> 'bool':
1058
+ """Gets the fair_share of this V1UserFeatures. # noqa: E501
1059
+
1060
+
1061
+ :return: The fair_share of this V1UserFeatures. # noqa: E501
1062
+ :rtype: bool
1063
+ """
1064
+ return self._fair_share
1065
+
1066
+ @fair_share.setter
1067
+ def fair_share(self, fair_share: 'bool'):
1068
+ """Sets the fair_share of this V1UserFeatures.
1069
+
1070
+
1071
+ :param fair_share: The fair_share of this V1UserFeatures. # noqa: E501
1072
+ :type: bool
1073
+ """
1074
+
1075
+ self._fair_share = fair_share
1076
+
1025
1077
  @property
1026
1078
  def featured_studios_admin(self) -> 'bool':
1027
1079
  """Gets the featured_studios_admin of this V1UserFeatures. # noqa: E501
@@ -1064,27 +1116,6 @@ class V1UserFeatures(object):
1064
1116
 
1065
1117
  self._filesystem_optimisation = filesystem_optimisation
1066
1118
 
1067
- @property
1068
- def gcp(self) -> 'bool':
1069
- """Gets the gcp of this V1UserFeatures. # noqa: E501
1070
-
1071
-
1072
- :return: The gcp of this V1UserFeatures. # noqa: E501
1073
- :rtype: bool
1074
- """
1075
- return self._gcp
1076
-
1077
- @gcp.setter
1078
- def gcp(self, gcp: 'bool'):
1079
- """Sets the gcp of this V1UserFeatures.
1080
-
1081
-
1082
- :param gcp: The gcp of this V1UserFeatures. # noqa: E501
1083
- :type: bool
1084
- """
1085
-
1086
- self._gcp = gcp
1087
-
1088
1119
  @property
1089
1120
  def inference_job_deployment_plugin(self) -> 'bool':
1090
1121
  """Gets the inference_job_deployment_plugin of this V1UserFeatures. # noqa: E501
@@ -1127,6 +1158,27 @@ class V1UserFeatures(object):
1127
1158
 
1128
1159
  self._instant_capacity_reservation = instant_capacity_reservation
1129
1160
 
1161
+ @property
1162
+ def job_artifacts_v2(self) -> 'bool':
1163
+ """Gets the job_artifacts_v2 of this V1UserFeatures. # noqa: E501
1164
+
1165
+
1166
+ :return: The job_artifacts_v2 of this V1UserFeatures. # noqa: E501
1167
+ :rtype: bool
1168
+ """
1169
+ return self._job_artifacts_v2
1170
+
1171
+ @job_artifacts_v2.setter
1172
+ def job_artifacts_v2(self, job_artifacts_v2: 'bool'):
1173
+ """Sets the job_artifacts_v2 of this V1UserFeatures.
1174
+
1175
+
1176
+ :param job_artifacts_v2: The job_artifacts_v2 of this V1UserFeatures. # noqa: E501
1177
+ :type: bool
1178
+ """
1179
+
1180
+ self._job_artifacts_v2 = job_artifacts_v2
1181
+
1130
1182
  @property
1131
1183
  def jobs_init(self) -> 'bool':
1132
1184
  """Gets the jobs_init of this V1UserFeatures. # noqa: E501
@@ -1316,27 +1368,6 @@ class V1UserFeatures(object):
1316
1368
 
1317
1369
  self._mmt_v2 = mmt_v2
1318
1370
 
1319
- @property
1320
- def model_store(self) -> 'bool':
1321
- """Gets the model_store of this V1UserFeatures. # noqa: E501
1322
-
1323
-
1324
- :return: The model_store of this V1UserFeatures. # noqa: E501
1325
- :rtype: bool
1326
- """
1327
- return self._model_store
1328
-
1329
- @model_store.setter
1330
- def model_store(self, model_store: 'bool'):
1331
- """Sets the model_store of this V1UserFeatures.
1332
-
1333
-
1334
- :param model_store: The model_store of this V1UserFeatures. # noqa: E501
1335
- :type: bool
1336
- """
1337
-
1338
- self._model_store = model_store
1339
-
1340
1371
  @property
1341
1372
  def multiple_deployment_versions(self) -> 'bool':
1342
1373
  """Gets the multiple_deployment_versions of this V1UserFeatures. # noqa: E501
@@ -1862,6 +1893,27 @@ class V1UserFeatures(object):
1862
1893
 
1863
1894
  self._runnable_public_studio_page = runnable_public_studio_page
1864
1895
 
1896
+ @property
1897
+ def security_docs(self) -> 'bool':
1898
+ """Gets the security_docs of this V1UserFeatures. # noqa: E501
1899
+
1900
+
1901
+ :return: The security_docs of this V1UserFeatures. # noqa: E501
1902
+ :rtype: bool
1903
+ """
1904
+ return self._security_docs
1905
+
1906
+ @security_docs.setter
1907
+ def security_docs(self, security_docs: 'bool'):
1908
+ """Sets the security_docs of this V1UserFeatures.
1909
+
1910
+
1911
+ :param security_docs: The security_docs of this V1UserFeatures. # noqa: E501
1912
+ :type: bool
1913
+ """
1914
+
1915
+ self._security_docs = security_docs
1916
+
1865
1917
  @property
1866
1918
  def show_dev_admin(self) -> 'bool':
1867
1919
  """Gets the show_dev_admin of this V1UserFeatures. # noqa: E501
@@ -4,7 +4,7 @@ from lightning_sdk.lightning_cloud import rest_client
4
4
  from lightning_sdk.lightning_cloud.openapi import Create, V1AwsDataConnection, V1S3FolderDataConnection, V1EfsConfig
5
5
  from lightning_sdk.lightning_cloud.openapi.rest import ApiException
6
6
  import urllib3
7
-
7
+ import os
8
8
 
9
9
  def add_s3_connection(bucket_name: str, region: str = "us-east-1", create_timeout: int = 15) -> None:
10
10
  """Utility to add a data connection."""
@@ -26,7 +26,7 @@ def add_s3_connection(bucket_name: str, region: str = "us-east-1", create_timeou
26
26
  aws=V1AwsDataConnection(
27
27
  source=f"s3://{bucket_name}",
28
28
  region=region
29
- ))
29
+ ))
30
30
  try:
31
31
  client.data_connection_service_create_data_connection(body, project_id)
32
32
  except (ApiException, urllib3.exceptions.HTTPError) as ex:
@@ -44,7 +44,7 @@ def add_s3_connection(bucket_name: str, region: str = "us-east-1", create_timeou
44
44
 
45
45
  while not os.path.isdir(f"/teamspace/s3_connections/{bucket_name}") and (time() - start) < create_timeout:
46
46
  sleep(1)
47
-
47
+
48
48
  return
49
49
 
50
50
  def create_s3_folder(folder_name: str, create_timeout: int = 15) -> None:
@@ -64,7 +64,7 @@ def create_s3_folder(folder_name: str, create_timeout: int = 15) -> None:
64
64
 
65
65
  # Get existing data connections
66
66
  data_connections = client.data_connection_service_list_data_connections(project_id).data_connections
67
-
67
+
68
68
  for connection in data_connections:
69
69
  existing_folder_name = getattr(connection, 'name', None)
70
70
  isS3Folder = getattr(connection, 's3_folder', None) is not None
@@ -102,13 +102,14 @@ def create_s3_folder(folder_name: str, create_timeout: int = 15) -> None:
102
102
 
103
103
  return
104
104
 
105
- def create_efs_folder(folder_name: str, region: str) -> None:
105
+ def create_efs_folder(folder_name: str, region: str, create_timeout: int = 60) -> None:
106
106
  """
107
107
  Utility function to create a EFS folder.
108
108
 
109
109
  Args:
110
110
  folder_name: The name of the folder to create.
111
111
  region: the region to create the efs in. Could be something like "us-east-1"
112
+ create_timeout: Timeout for creating the efs folder. Defaults to 60 seconds
112
113
  """
113
114
  client = rest_client.LightningClient(retry=False)
114
115
 
@@ -137,7 +138,7 @@ def create_efs_folder(folder_name: str, region: str) -> None:
137
138
  efs=V1EfsConfig(region=region),
138
139
  )
139
140
  try:
140
- client.data_connection_service_create_data_connection(body, project_id)
141
+ connection = client.data_connection_service_create_data_connection(body, project_id)
141
142
  except ApiException as e:
142
143
  # Note: This function can be called in a distributed way.
143
144
  # There is a race condition where one machine might create the entry before another machine
@@ -150,6 +151,72 @@ def create_efs_folder(folder_name: str, region: str) -> None:
150
151
  except urllib3.exceptions.HTTPError as e:
151
152
  raise e from None
152
153
 
154
+ start = time()
155
+ while True:
156
+ if time() - start > create_timeout:
157
+ print(f"Dataconnection {connection.name} didn't become accessible withing {create_timeout} seconds!")
158
+
159
+
160
+ data_connection = client.data_connection_service_get_data_connection(project_id=project_id, id=connection.id)
161
+ if data_connection.accessible:
162
+ break
163
+
164
+ sleep(1)
165
+
166
+ def add_efs_connection(name: str, filesystem_id: str, region: str = "us-east-1", create_timeout: int = 60) -> None:
167
+ """Utility to add an existing EFS filesystem as a data connection.
168
+
169
+ Args:
170
+ name: The name to give to the data connection
171
+ filesystem_id: The ID of the existing EFS filesystem (e.g., 'fs-1234567')
172
+ region: AWS region where the EFS filesystem exists (default: 'us-east-1')
173
+ create_timeout: Timeout in seconds to wait for the connection to be accessible (default: 60)
174
+ """
175
+ client = rest_client.LightningClient(retry=False)
176
+
177
+ project_id = os.getenv("LIGHTNING_CLOUD_PROJECT_ID")
178
+ cluster_id = os.getenv("LIGHTNING_CLUSTER_ID")
179
+
180
+ data_connections = client.data_connection_service_list_data_connections(project_id).data_connections
181
+
182
+ if any(d for d in data_connections if d.name == name):
183
+ return
184
+
185
+ body = Create(
186
+ name=name,
187
+ create_resources=False, # Don't create new EFS since we're connecting to existing one
188
+ cluster_id=cluster_id,
189
+ access_cluster_ids=[cluster_id],
190
+ force=True,
191
+ writable=True,
192
+ efs=V1EfsConfig(
193
+ region=region,
194
+ file_system_id=filesystem_id,
195
+ )
196
+ )
197
+
198
+ try:
199
+ connection = client.data_connection_service_create_data_connection(body, project_id)
200
+ except (ApiException, urllib3.exceptions.HTTPError) as ex:
201
+ if isinstance(ex, ApiException) and 'duplicate key value violates unique constraint' in str(ex.body):
202
+ pass
203
+ else:
204
+ raise ex
205
+
206
+ start = time()
207
+ while True:
208
+ if time() - start > create_timeout:
209
+ print(f"Dataconnection {connection.name} didn't become accessible withing {create_timeout} seconds!")
210
+ break
211
+
212
+ data_connection = client.data_connection_service_get_data_connection(project_id=project_id, id=connection.id)
213
+ if data_connection.accessible:
214
+ break
215
+
216
+ sleep(1)
217
+
218
+ return
219
+
153
220
  def delete_data_connection(name: str):
154
221
  """Utility to delete a data connection
155
222
 
@@ -181,4 +248,5 @@ def delete_data_connection(name: str):
181
248
  # It may exhaust the attempts before the connection is actually unmounted from the studio.
182
249
  # for now it's best to actually stop the studio and all other things where the connection
183
250
  # is mounted before trying to delete it
184
- raise e from None
251
+ raise e from None
252
+