lightning-sdk 2025.7.17__py3-none-any.whl → 2025.7.22__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- lightning_sdk/__init__.py +3 -2
- lightning_sdk/api/cloud_account_api.py +154 -0
- lightning_sdk/api/deployment_api.py +11 -0
- lightning_sdk/api/job_api.py +9 -0
- lightning_sdk/api/mmt_api.py +9 -0
- lightning_sdk/api/pipeline_api.py +4 -3
- lightning_sdk/api/studio_api.py +19 -5
- lightning_sdk/cli/clusters_menu.py +3 -3
- lightning_sdk/cli/create.py +22 -10
- lightning_sdk/cli/deploy/_auth.py +19 -3
- lightning_sdk/cli/deploy/serve.py +18 -4
- lightning_sdk/cli/entrypoint.py +1 -1
- lightning_sdk/cli/start.py +37 -7
- lightning_sdk/deployment/deployment.py +8 -0
- lightning_sdk/job/base.py +27 -3
- lightning_sdk/job/job.py +28 -4
- lightning_sdk/job/v1.py +10 -1
- lightning_sdk/job/v2.py +15 -1
- lightning_sdk/lightning_cloud/openapi/__init__.py +9 -1
- lightning_sdk/lightning_cloud/openapi/api/assistants_service_api.py +335 -0
- lightning_sdk/lightning_cloud/openapi/api/billing_service_api.py +153 -48
- lightning_sdk/lightning_cloud/openapi/models/__init__.py +9 -1
- lightning_sdk/lightning_cloud/openapi/models/blogposts_id_body.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/conversations_id_body1.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/messages_id_body.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/project_id_schedules_body.py +29 -3
- lightning_sdk/lightning_cloud/openapi/models/schedules_id_body.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/user_id_upgradetrigger_body.py +175 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_blog_post.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_conversation.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_create_billing_upgrade_trigger_record_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_create_blog_post_request.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_create_checkout_session_request.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_create_subscription_checkout_session_request.py +29 -3
- lightning_sdk/lightning_cloud/openapi/models/{v1_get_clickhouse_assistant_session_daily_aggregated_response.py → v1_get_assistant_session_daily_aggregated_response.py} +22 -22
- lightning_sdk/lightning_cloud/openapi/models/v1_kubernetes_direct_v1.py +79 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_like_status.py +104 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_published_managed_endpoint_models_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_message.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_quote_subscription_response.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_schedule.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_update_conversation_like_response.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_update_conversation_message_like_response.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +1 -261
- lightning_sdk/llm/llm.py +29 -5
- lightning_sdk/machine.py +12 -0
- lightning_sdk/mmt/base.py +20 -2
- lightning_sdk/mmt/mmt.py +25 -3
- lightning_sdk/mmt/v1.py +7 -1
- lightning_sdk/mmt/v2.py +21 -2
- lightning_sdk/organization.py +4 -0
- lightning_sdk/pipeline/pipeline.py +16 -5
- lightning_sdk/pipeline/printer.py +5 -3
- lightning_sdk/pipeline/schedule.py +844 -1
- lightning_sdk/pipeline/steps.py +19 -4
- lightning_sdk/sandbox.py +4 -1
- lightning_sdk/serve.py +2 -0
- lightning_sdk/studio.py +79 -39
- lightning_sdk/teamspace.py +14 -8
- lightning_sdk/utils/resolve.py +29 -2
- {lightning_sdk-2025.7.17.dist-info → lightning_sdk-2025.7.22.dist-info}/METADATA +1 -1
- {lightning_sdk-2025.7.17.dist-info → lightning_sdk-2025.7.22.dist-info}/RECORD +67 -59
- lightning_sdk/api/cluster_api.py +0 -119
- /lightning_sdk/cli/{inspect.py → inspection.py} +0 -0
- {lightning_sdk-2025.7.17.dist-info → lightning_sdk-2025.7.22.dist-info}/LICENSE +0 -0
- {lightning_sdk-2025.7.17.dist-info → lightning_sdk-2025.7.22.dist-info}/WHEEL +0 -0
- {lightning_sdk-2025.7.17.dist-info → lightning_sdk-2025.7.22.dist-info}/entry_points.txt +0 -0
- {lightning_sdk-2025.7.17.dist-info → lightning_sdk-2025.7.22.dist-info}/top_level.txt +0 -0
|
@@ -79,27 +79,19 @@ class V1UserFeatures(object):
|
|
|
79
79
|
'job_artifacts_v2': 'bool',
|
|
80
80
|
'kubernetes_cluster_ui': 'bool',
|
|
81
81
|
'kubernetes_clusters': 'bool',
|
|
82
|
-
'lambda_labs': 'bool',
|
|
83
|
-
'lambda_labs_studios': 'bool',
|
|
84
82
|
'landing_studios': 'bool',
|
|
85
83
|
'lit_logger': 'bool',
|
|
86
|
-
'machine_selector_v2': 'bool',
|
|
87
84
|
'marketplace': 'bool',
|
|
88
85
|
'mmt_fault_tolerance': 'bool',
|
|
89
86
|
'mmt_strategy_selector': 'bool',
|
|
90
87
|
'model_api_dashboard': 'bool',
|
|
91
88
|
'model_api_dashboard_clickhouse': 'bool',
|
|
92
89
|
'multicloud_folders': 'bool',
|
|
93
|
-
'multicloud_saas': 'bool',
|
|
94
90
|
'multiple_studio_versions': 'bool',
|
|
95
|
-
'nebius': 'bool',
|
|
96
|
-
'nebius_cpu_studios': 'bool',
|
|
97
|
-
'nebius_gpu_studios': 'bool',
|
|
98
91
|
'nerf_fs_nonpaying': 'bool',
|
|
99
92
|
'onboarding_v2': 'bool',
|
|
100
93
|
'org_level_member_permissions': 'bool',
|
|
101
94
|
'org_usage_limits': 'bool',
|
|
102
|
-
'paygo_free_storage_limit_check': 'bool',
|
|
103
95
|
'persistent_disk': 'bool',
|
|
104
96
|
'plugin_distributed': 'bool',
|
|
105
97
|
'plugin_inference': 'bool',
|
|
@@ -130,8 +122,6 @@ class V1UserFeatures(object):
|
|
|
130
122
|
'trainium2': 'bool',
|
|
131
123
|
'use_internal_data_connection_mounts': 'bool',
|
|
132
124
|
'use_rclone_mounts_only': 'bool',
|
|
133
|
-
'voltage_park': 'bool',
|
|
134
|
-
'voltage_park_studios': 'bool',
|
|
135
125
|
'vultr': 'bool',
|
|
136
126
|
'weka': 'bool',
|
|
137
127
|
'writable_s3_connections': 'bool'
|
|
@@ -176,27 +166,19 @@ class V1UserFeatures(object):
|
|
|
176
166
|
'job_artifacts_v2': 'jobArtifactsV2',
|
|
177
167
|
'kubernetes_cluster_ui': 'kubernetesClusterUi',
|
|
178
168
|
'kubernetes_clusters': 'kubernetesClusters',
|
|
179
|
-
'lambda_labs': 'lambdaLabs',
|
|
180
|
-
'lambda_labs_studios': 'lambdaLabsStudios',
|
|
181
169
|
'landing_studios': 'landingStudios',
|
|
182
170
|
'lit_logger': 'litLogger',
|
|
183
|
-
'machine_selector_v2': 'machineSelectorV2',
|
|
184
171
|
'marketplace': 'marketplace',
|
|
185
172
|
'mmt_fault_tolerance': 'mmtFaultTolerance',
|
|
186
173
|
'mmt_strategy_selector': 'mmtStrategySelector',
|
|
187
174
|
'model_api_dashboard': 'modelApiDashboard',
|
|
188
175
|
'model_api_dashboard_clickhouse': 'modelApiDashboardClickhouse',
|
|
189
176
|
'multicloud_folders': 'multicloudFolders',
|
|
190
|
-
'multicloud_saas': 'multicloudSaas',
|
|
191
177
|
'multiple_studio_versions': 'multipleStudioVersions',
|
|
192
|
-
'nebius': 'nebius',
|
|
193
|
-
'nebius_cpu_studios': 'nebiusCpuStudios',
|
|
194
|
-
'nebius_gpu_studios': 'nebiusGpuStudios',
|
|
195
178
|
'nerf_fs_nonpaying': 'nerfFsNonpaying',
|
|
196
179
|
'onboarding_v2': 'onboardingV2',
|
|
197
180
|
'org_level_member_permissions': 'orgLevelMemberPermissions',
|
|
198
181
|
'org_usage_limits': 'orgUsageLimits',
|
|
199
|
-
'paygo_free_storage_limit_check': 'paygoFreeStorageLimitCheck',
|
|
200
182
|
'persistent_disk': 'persistentDisk',
|
|
201
183
|
'plugin_distributed': 'pluginDistributed',
|
|
202
184
|
'plugin_inference': 'pluginInference',
|
|
@@ -227,14 +209,12 @@ class V1UserFeatures(object):
|
|
|
227
209
|
'trainium2': 'trainium2',
|
|
228
210
|
'use_internal_data_connection_mounts': 'useInternalDataConnectionMounts',
|
|
229
211
|
'use_rclone_mounts_only': 'useRcloneMountsOnly',
|
|
230
|
-
'voltage_park': 'voltagePark',
|
|
231
|
-
'voltage_park_studios': 'voltageParkStudios',
|
|
232
212
|
'vultr': 'vultr',
|
|
233
213
|
'weka': 'weka',
|
|
234
214
|
'writable_s3_connections': 'writableS3Connections'
|
|
235
215
|
}
|
|
236
216
|
|
|
237
|
-
def __init__(self, academic_tier: 'bool' =None, add_data_v2: '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, 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, cloudy_vibe_code: '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, data_connection_flushing_v2: 'bool' =None, datasets: 'bool' =None, default_one_cluster: 'bool' =None, deployment_persistent_disk: 'bool' =None, drive_v2: 'bool' =None, enterprise_compute_admin: 'bool' =None, f236: 'bool' =None, fair_share: 'bool' =None, featured_studios_admin: 'bool' =None, gcp_overprovisioning: 'bool' =None, gcs_connections_optimized: 'bool' =None, gcs_folders: 'bool' =None, gcs_fuse: 'bool' =None, instant_capacity_reservation: 'bool' =None, job_artifacts_v2: 'bool' =None, kubernetes_cluster_ui: 'bool' =None, kubernetes_clusters: 'bool' =None,
|
|
217
|
+
def __init__(self, academic_tier: 'bool' =None, add_data_v2: '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, 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, cloudy_vibe_code: '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, data_connection_flushing_v2: 'bool' =None, datasets: 'bool' =None, default_one_cluster: 'bool' =None, deployment_persistent_disk: 'bool' =None, drive_v2: 'bool' =None, enterprise_compute_admin: 'bool' =None, f236: 'bool' =None, fair_share: 'bool' =None, featured_studios_admin: 'bool' =None, gcp_overprovisioning: 'bool' =None, gcs_connections_optimized: 'bool' =None, gcs_folders: 'bool' =None, gcs_fuse: 'bool' =None, instant_capacity_reservation: '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, model_api_dashboard_clickhouse: 'bool' =None, multicloud_folders: 'bool' =None, multiple_studio_versions: 'bool' =None, nerf_fs_nonpaying: 'bool' =None, onboarding_v2: '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_service: '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, r2_data_connections: 'bool' =None, r2_uploads: '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, single_wallet: '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, trainium2: 'bool' =None, use_internal_data_connection_mounts: 'bool' =None, use_rclone_mounts_only: 'bool' =None, vultr: 'bool' =None, weka: 'bool' =None, writable_s3_connections: 'bool' =None): # noqa: E501
|
|
238
218
|
"""V1UserFeatures - a model defined in Swagger""" # noqa: E501
|
|
239
219
|
self._academic_tier = None
|
|
240
220
|
self._add_data_v2 = None
|
|
@@ -274,27 +254,19 @@ class V1UserFeatures(object):
|
|
|
274
254
|
self._job_artifacts_v2 = None
|
|
275
255
|
self._kubernetes_cluster_ui = None
|
|
276
256
|
self._kubernetes_clusters = None
|
|
277
|
-
self._lambda_labs = None
|
|
278
|
-
self._lambda_labs_studios = None
|
|
279
257
|
self._landing_studios = None
|
|
280
258
|
self._lit_logger = None
|
|
281
|
-
self._machine_selector_v2 = None
|
|
282
259
|
self._marketplace = None
|
|
283
260
|
self._mmt_fault_tolerance = None
|
|
284
261
|
self._mmt_strategy_selector = None
|
|
285
262
|
self._model_api_dashboard = None
|
|
286
263
|
self._model_api_dashboard_clickhouse = None
|
|
287
264
|
self._multicloud_folders = None
|
|
288
|
-
self._multicloud_saas = None
|
|
289
265
|
self._multiple_studio_versions = None
|
|
290
|
-
self._nebius = None
|
|
291
|
-
self._nebius_cpu_studios = None
|
|
292
|
-
self._nebius_gpu_studios = None
|
|
293
266
|
self._nerf_fs_nonpaying = None
|
|
294
267
|
self._onboarding_v2 = None
|
|
295
268
|
self._org_level_member_permissions = None
|
|
296
269
|
self._org_usage_limits = None
|
|
297
|
-
self._paygo_free_storage_limit_check = None
|
|
298
270
|
self._persistent_disk = None
|
|
299
271
|
self._plugin_distributed = None
|
|
300
272
|
self._plugin_inference = None
|
|
@@ -325,8 +297,6 @@ class V1UserFeatures(object):
|
|
|
325
297
|
self._trainium2 = None
|
|
326
298
|
self._use_internal_data_connection_mounts = None
|
|
327
299
|
self._use_rclone_mounts_only = None
|
|
328
|
-
self._voltage_park = None
|
|
329
|
-
self._voltage_park_studios = None
|
|
330
300
|
self._vultr = None
|
|
331
301
|
self._weka = None
|
|
332
302
|
self._writable_s3_connections = None
|
|
@@ -407,16 +377,10 @@ class V1UserFeatures(object):
|
|
|
407
377
|
self.kubernetes_cluster_ui = kubernetes_cluster_ui
|
|
408
378
|
if kubernetes_clusters is not None:
|
|
409
379
|
self.kubernetes_clusters = kubernetes_clusters
|
|
410
|
-
if lambda_labs is not None:
|
|
411
|
-
self.lambda_labs = lambda_labs
|
|
412
|
-
if lambda_labs_studios is not None:
|
|
413
|
-
self.lambda_labs_studios = lambda_labs_studios
|
|
414
380
|
if landing_studios is not None:
|
|
415
381
|
self.landing_studios = landing_studios
|
|
416
382
|
if lit_logger is not None:
|
|
417
383
|
self.lit_logger = lit_logger
|
|
418
|
-
if machine_selector_v2 is not None:
|
|
419
|
-
self.machine_selector_v2 = machine_selector_v2
|
|
420
384
|
if marketplace is not None:
|
|
421
385
|
self.marketplace = marketplace
|
|
422
386
|
if mmt_fault_tolerance is not None:
|
|
@@ -429,16 +393,8 @@ class V1UserFeatures(object):
|
|
|
429
393
|
self.model_api_dashboard_clickhouse = model_api_dashboard_clickhouse
|
|
430
394
|
if multicloud_folders is not None:
|
|
431
395
|
self.multicloud_folders = multicloud_folders
|
|
432
|
-
if multicloud_saas is not None:
|
|
433
|
-
self.multicloud_saas = multicloud_saas
|
|
434
396
|
if multiple_studio_versions is not None:
|
|
435
397
|
self.multiple_studio_versions = multiple_studio_versions
|
|
436
|
-
if nebius is not None:
|
|
437
|
-
self.nebius = nebius
|
|
438
|
-
if nebius_cpu_studios is not None:
|
|
439
|
-
self.nebius_cpu_studios = nebius_cpu_studios
|
|
440
|
-
if nebius_gpu_studios is not None:
|
|
441
|
-
self.nebius_gpu_studios = nebius_gpu_studios
|
|
442
398
|
if nerf_fs_nonpaying is not None:
|
|
443
399
|
self.nerf_fs_nonpaying = nerf_fs_nonpaying
|
|
444
400
|
if onboarding_v2 is not None:
|
|
@@ -447,8 +403,6 @@ class V1UserFeatures(object):
|
|
|
447
403
|
self.org_level_member_permissions = org_level_member_permissions
|
|
448
404
|
if org_usage_limits is not None:
|
|
449
405
|
self.org_usage_limits = org_usage_limits
|
|
450
|
-
if paygo_free_storage_limit_check is not None:
|
|
451
|
-
self.paygo_free_storage_limit_check = paygo_free_storage_limit_check
|
|
452
406
|
if persistent_disk is not None:
|
|
453
407
|
self.persistent_disk = persistent_disk
|
|
454
408
|
if plugin_distributed is not None:
|
|
@@ -509,10 +463,6 @@ class V1UserFeatures(object):
|
|
|
509
463
|
self.use_internal_data_connection_mounts = use_internal_data_connection_mounts
|
|
510
464
|
if use_rclone_mounts_only is not None:
|
|
511
465
|
self.use_rclone_mounts_only = use_rclone_mounts_only
|
|
512
|
-
if voltage_park is not None:
|
|
513
|
-
self.voltage_park = voltage_park
|
|
514
|
-
if voltage_park_studios is not None:
|
|
515
|
-
self.voltage_park_studios = voltage_park_studios
|
|
516
466
|
if vultr is not None:
|
|
517
467
|
self.vultr = vultr
|
|
518
468
|
if weka is not None:
|
|
@@ -1318,48 +1268,6 @@ class V1UserFeatures(object):
|
|
|
1318
1268
|
|
|
1319
1269
|
self._kubernetes_clusters = kubernetes_clusters
|
|
1320
1270
|
|
|
1321
|
-
@property
|
|
1322
|
-
def lambda_labs(self) -> 'bool':
|
|
1323
|
-
"""Gets the lambda_labs of this V1UserFeatures. # noqa: E501
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
:return: The lambda_labs of this V1UserFeatures. # noqa: E501
|
|
1327
|
-
:rtype: bool
|
|
1328
|
-
"""
|
|
1329
|
-
return self._lambda_labs
|
|
1330
|
-
|
|
1331
|
-
@lambda_labs.setter
|
|
1332
|
-
def lambda_labs(self, lambda_labs: 'bool'):
|
|
1333
|
-
"""Sets the lambda_labs of this V1UserFeatures.
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
:param lambda_labs: The lambda_labs of this V1UserFeatures. # noqa: E501
|
|
1337
|
-
:type: bool
|
|
1338
|
-
"""
|
|
1339
|
-
|
|
1340
|
-
self._lambda_labs = lambda_labs
|
|
1341
|
-
|
|
1342
|
-
@property
|
|
1343
|
-
def lambda_labs_studios(self) -> 'bool':
|
|
1344
|
-
"""Gets the lambda_labs_studios of this V1UserFeatures. # noqa: E501
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
:return: The lambda_labs_studios of this V1UserFeatures. # noqa: E501
|
|
1348
|
-
:rtype: bool
|
|
1349
|
-
"""
|
|
1350
|
-
return self._lambda_labs_studios
|
|
1351
|
-
|
|
1352
|
-
@lambda_labs_studios.setter
|
|
1353
|
-
def lambda_labs_studios(self, lambda_labs_studios: 'bool'):
|
|
1354
|
-
"""Sets the lambda_labs_studios of this V1UserFeatures.
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
:param lambda_labs_studios: The lambda_labs_studios of this V1UserFeatures. # noqa: E501
|
|
1358
|
-
:type: bool
|
|
1359
|
-
"""
|
|
1360
|
-
|
|
1361
|
-
self._lambda_labs_studios = lambda_labs_studios
|
|
1362
|
-
|
|
1363
1271
|
@property
|
|
1364
1272
|
def landing_studios(self) -> 'bool':
|
|
1365
1273
|
"""Gets the landing_studios of this V1UserFeatures. # noqa: E501
|
|
@@ -1402,27 +1310,6 @@ class V1UserFeatures(object):
|
|
|
1402
1310
|
|
|
1403
1311
|
self._lit_logger = lit_logger
|
|
1404
1312
|
|
|
1405
|
-
@property
|
|
1406
|
-
def machine_selector_v2(self) -> 'bool':
|
|
1407
|
-
"""Gets the machine_selector_v2 of this V1UserFeatures. # noqa: E501
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
:return: The machine_selector_v2 of this V1UserFeatures. # noqa: E501
|
|
1411
|
-
:rtype: bool
|
|
1412
|
-
"""
|
|
1413
|
-
return self._machine_selector_v2
|
|
1414
|
-
|
|
1415
|
-
@machine_selector_v2.setter
|
|
1416
|
-
def machine_selector_v2(self, machine_selector_v2: 'bool'):
|
|
1417
|
-
"""Sets the machine_selector_v2 of this V1UserFeatures.
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
:param machine_selector_v2: The machine_selector_v2 of this V1UserFeatures. # noqa: E501
|
|
1421
|
-
:type: bool
|
|
1422
|
-
"""
|
|
1423
|
-
|
|
1424
|
-
self._machine_selector_v2 = machine_selector_v2
|
|
1425
|
-
|
|
1426
1313
|
@property
|
|
1427
1314
|
def marketplace(self) -> 'bool':
|
|
1428
1315
|
"""Gets the marketplace of this V1UserFeatures. # noqa: E501
|
|
@@ -1549,27 +1436,6 @@ class V1UserFeatures(object):
|
|
|
1549
1436
|
|
|
1550
1437
|
self._multicloud_folders = multicloud_folders
|
|
1551
1438
|
|
|
1552
|
-
@property
|
|
1553
|
-
def multicloud_saas(self) -> 'bool':
|
|
1554
|
-
"""Gets the multicloud_saas of this V1UserFeatures. # noqa: E501
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
:return: The multicloud_saas of this V1UserFeatures. # noqa: E501
|
|
1558
|
-
:rtype: bool
|
|
1559
|
-
"""
|
|
1560
|
-
return self._multicloud_saas
|
|
1561
|
-
|
|
1562
|
-
@multicloud_saas.setter
|
|
1563
|
-
def multicloud_saas(self, multicloud_saas: 'bool'):
|
|
1564
|
-
"""Sets the multicloud_saas of this V1UserFeatures.
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
:param multicloud_saas: The multicloud_saas of this V1UserFeatures. # noqa: E501
|
|
1568
|
-
:type: bool
|
|
1569
|
-
"""
|
|
1570
|
-
|
|
1571
|
-
self._multicloud_saas = multicloud_saas
|
|
1572
|
-
|
|
1573
1439
|
@property
|
|
1574
1440
|
def multiple_studio_versions(self) -> 'bool':
|
|
1575
1441
|
"""Gets the multiple_studio_versions of this V1UserFeatures. # noqa: E501
|
|
@@ -1591,69 +1457,6 @@ class V1UserFeatures(object):
|
|
|
1591
1457
|
|
|
1592
1458
|
self._multiple_studio_versions = multiple_studio_versions
|
|
1593
1459
|
|
|
1594
|
-
@property
|
|
1595
|
-
def nebius(self) -> 'bool':
|
|
1596
|
-
"""Gets the nebius of this V1UserFeatures. # noqa: E501
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
:return: The nebius of this V1UserFeatures. # noqa: E501
|
|
1600
|
-
:rtype: bool
|
|
1601
|
-
"""
|
|
1602
|
-
return self._nebius
|
|
1603
|
-
|
|
1604
|
-
@nebius.setter
|
|
1605
|
-
def nebius(self, nebius: 'bool'):
|
|
1606
|
-
"""Sets the nebius of this V1UserFeatures.
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
:param nebius: The nebius of this V1UserFeatures. # noqa: E501
|
|
1610
|
-
:type: bool
|
|
1611
|
-
"""
|
|
1612
|
-
|
|
1613
|
-
self._nebius = nebius
|
|
1614
|
-
|
|
1615
|
-
@property
|
|
1616
|
-
def nebius_cpu_studios(self) -> 'bool':
|
|
1617
|
-
"""Gets the nebius_cpu_studios of this V1UserFeatures. # noqa: E501
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
:return: The nebius_cpu_studios of this V1UserFeatures. # noqa: E501
|
|
1621
|
-
:rtype: bool
|
|
1622
|
-
"""
|
|
1623
|
-
return self._nebius_cpu_studios
|
|
1624
|
-
|
|
1625
|
-
@nebius_cpu_studios.setter
|
|
1626
|
-
def nebius_cpu_studios(self, nebius_cpu_studios: 'bool'):
|
|
1627
|
-
"""Sets the nebius_cpu_studios of this V1UserFeatures.
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
:param nebius_cpu_studios: The nebius_cpu_studios of this V1UserFeatures. # noqa: E501
|
|
1631
|
-
:type: bool
|
|
1632
|
-
"""
|
|
1633
|
-
|
|
1634
|
-
self._nebius_cpu_studios = nebius_cpu_studios
|
|
1635
|
-
|
|
1636
|
-
@property
|
|
1637
|
-
def nebius_gpu_studios(self) -> 'bool':
|
|
1638
|
-
"""Gets the nebius_gpu_studios of this V1UserFeatures. # noqa: E501
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
:return: The nebius_gpu_studios of this V1UserFeatures. # noqa: E501
|
|
1642
|
-
:rtype: bool
|
|
1643
|
-
"""
|
|
1644
|
-
return self._nebius_gpu_studios
|
|
1645
|
-
|
|
1646
|
-
@nebius_gpu_studios.setter
|
|
1647
|
-
def nebius_gpu_studios(self, nebius_gpu_studios: 'bool'):
|
|
1648
|
-
"""Sets the nebius_gpu_studios of this V1UserFeatures.
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
:param nebius_gpu_studios: The nebius_gpu_studios of this V1UserFeatures. # noqa: E501
|
|
1652
|
-
:type: bool
|
|
1653
|
-
"""
|
|
1654
|
-
|
|
1655
|
-
self._nebius_gpu_studios = nebius_gpu_studios
|
|
1656
|
-
|
|
1657
1460
|
@property
|
|
1658
1461
|
def nerf_fs_nonpaying(self) -> 'bool':
|
|
1659
1462
|
"""Gets the nerf_fs_nonpaying of this V1UserFeatures. # noqa: E501
|
|
@@ -1738,27 +1541,6 @@ class V1UserFeatures(object):
|
|
|
1738
1541
|
|
|
1739
1542
|
self._org_usage_limits = org_usage_limits
|
|
1740
1543
|
|
|
1741
|
-
@property
|
|
1742
|
-
def paygo_free_storage_limit_check(self) -> 'bool':
|
|
1743
|
-
"""Gets the paygo_free_storage_limit_check of this V1UserFeatures. # noqa: E501
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
:return: The paygo_free_storage_limit_check of this V1UserFeatures. # noqa: E501
|
|
1747
|
-
:rtype: bool
|
|
1748
|
-
"""
|
|
1749
|
-
return self._paygo_free_storage_limit_check
|
|
1750
|
-
|
|
1751
|
-
@paygo_free_storage_limit_check.setter
|
|
1752
|
-
def paygo_free_storage_limit_check(self, paygo_free_storage_limit_check: 'bool'):
|
|
1753
|
-
"""Sets the paygo_free_storage_limit_check of this V1UserFeatures.
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
:param paygo_free_storage_limit_check: The paygo_free_storage_limit_check of this V1UserFeatures. # noqa: E501
|
|
1757
|
-
:type: bool
|
|
1758
|
-
"""
|
|
1759
|
-
|
|
1760
|
-
self._paygo_free_storage_limit_check = paygo_free_storage_limit_check
|
|
1761
|
-
|
|
1762
1544
|
@property
|
|
1763
1545
|
def persistent_disk(self) -> 'bool':
|
|
1764
1546
|
"""Gets the persistent_disk of this V1UserFeatures. # noqa: E501
|
|
@@ -2389,48 +2171,6 @@ class V1UserFeatures(object):
|
|
|
2389
2171
|
|
|
2390
2172
|
self._use_rclone_mounts_only = use_rclone_mounts_only
|
|
2391
2173
|
|
|
2392
|
-
@property
|
|
2393
|
-
def voltage_park(self) -> 'bool':
|
|
2394
|
-
"""Gets the voltage_park of this V1UserFeatures. # noqa: E501
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
:return: The voltage_park of this V1UserFeatures. # noqa: E501
|
|
2398
|
-
:rtype: bool
|
|
2399
|
-
"""
|
|
2400
|
-
return self._voltage_park
|
|
2401
|
-
|
|
2402
|
-
@voltage_park.setter
|
|
2403
|
-
def voltage_park(self, voltage_park: 'bool'):
|
|
2404
|
-
"""Sets the voltage_park of this V1UserFeatures.
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
:param voltage_park: The voltage_park of this V1UserFeatures. # noqa: E501
|
|
2408
|
-
:type: bool
|
|
2409
|
-
"""
|
|
2410
|
-
|
|
2411
|
-
self._voltage_park = voltage_park
|
|
2412
|
-
|
|
2413
|
-
@property
|
|
2414
|
-
def voltage_park_studios(self) -> 'bool':
|
|
2415
|
-
"""Gets the voltage_park_studios of this V1UserFeatures. # noqa: E501
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
:return: The voltage_park_studios of this V1UserFeatures. # noqa: E501
|
|
2419
|
-
:rtype: bool
|
|
2420
|
-
"""
|
|
2421
|
-
return self._voltage_park_studios
|
|
2422
|
-
|
|
2423
|
-
@voltage_park_studios.setter
|
|
2424
|
-
def voltage_park_studios(self, voltage_park_studios: 'bool'):
|
|
2425
|
-
"""Sets the voltage_park_studios of this V1UserFeatures.
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
:param voltage_park_studios: The voltage_park_studios of this V1UserFeatures. # noqa: E501
|
|
2429
|
-
:type: bool
|
|
2430
|
-
"""
|
|
2431
|
-
|
|
2432
|
-
self._voltage_park_studios = voltage_park_studios
|
|
2433
|
-
|
|
2434
2174
|
@property
|
|
2435
2175
|
def vultr(self) -> 'bool':
|
|
2436
2176
|
"""Gets the vultr of this V1UserFeatures. # noqa: E501
|
lightning_sdk/llm/llm.py
CHANGED
|
@@ -55,8 +55,18 @@ class LLM:
|
|
|
55
55
|
Raises:
|
|
56
56
|
ValueError: If teamspace information cannot be resolved.
|
|
57
57
|
"""
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
teamspace_name = None
|
|
59
|
+
if teamspace:
|
|
60
|
+
try:
|
|
61
|
+
owner, teamspace_name = teamspace.split("/", maxsplit=1)
|
|
62
|
+
except ValueError as e:
|
|
63
|
+
raise ValueError(
|
|
64
|
+
f"Invalid teamspace format: '{teamspace}'. "
|
|
65
|
+
"Teamspace should be specified as '{teamspace_owner}/{teamspace_name}' "
|
|
66
|
+
"(e.g., 'my-org/my-teamspace')."
|
|
67
|
+
) from e
|
|
68
|
+
|
|
69
|
+
self._get_auth_info(teamspace_name)
|
|
60
70
|
|
|
61
71
|
self._model_provider, self._model_name = self._parse_model_name(name)
|
|
62
72
|
self._enable_async = enable_async
|
|
@@ -77,13 +87,15 @@ class LLM:
|
|
|
77
87
|
def provider(self) -> str:
|
|
78
88
|
return self._model_provider
|
|
79
89
|
|
|
80
|
-
def _get_auth_info(self) -> None:
|
|
90
|
+
def _get_auth_info(self, teamspace_name: Optional[str] = None) -> None:
|
|
91
|
+
# TODO: Validate user input teamspace name
|
|
81
92
|
if not LLM._auth_info_cached:
|
|
82
|
-
teamspace_name
|
|
93
|
+
if teamspace_name is None:
|
|
94
|
+
teamspace_name = os.environ.get("LIGHTNING_TEAMSPACE", None)
|
|
83
95
|
if teamspace_name is None:
|
|
84
96
|
raise ValueError(
|
|
85
97
|
"Teamspace name must be provided either through "
|
|
86
|
-
"the environment variable LIGHTNING_TEAMSPACE or as an argument
|
|
98
|
+
"the environment variable LIGHTNING_TEAMSPACE or as an argument - LLM(..., teamspace=...)"
|
|
87
99
|
)
|
|
88
100
|
LLM._cached_auth_info = {
|
|
89
101
|
"teamspace_name": teamspace_name,
|
|
@@ -139,6 +151,18 @@ class LLM:
|
|
|
139
151
|
"Please check the model name or provider."
|
|
140
152
|
) from e
|
|
141
153
|
|
|
154
|
+
if self._model_provider == "lightning-ai":
|
|
155
|
+
# Try model provider model
|
|
156
|
+
try:
|
|
157
|
+
return self._llm_api.get_assistant(
|
|
158
|
+
model_provider=self._model_provider,
|
|
159
|
+
model_name=self._model_name,
|
|
160
|
+
user_name="",
|
|
161
|
+
org_name="",
|
|
162
|
+
)
|
|
163
|
+
except Exception:
|
|
164
|
+
pass
|
|
165
|
+
|
|
142
166
|
# Try organization model
|
|
143
167
|
try:
|
|
144
168
|
return self._llm_api.get_assistant(
|
lightning_sdk/machine.py
CHANGED
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
from dataclasses import dataclass
|
|
2
|
+
from enum import Enum
|
|
2
3
|
from typing import Any, ClassVar, Optional, Tuple
|
|
3
4
|
|
|
4
5
|
|
|
6
|
+
class CloudProvider(Enum):
|
|
7
|
+
AWS = "AWS"
|
|
8
|
+
GCP = "GCP"
|
|
9
|
+
VULTR = "VULTR"
|
|
10
|
+
LAMBDA_LABS = "LAMBDA_LABS"
|
|
11
|
+
DGX = "DGX"
|
|
12
|
+
VOLTAGE_PARK = "VOLTAGE_PARK"
|
|
13
|
+
NEBIUS = "NEBIUS"
|
|
14
|
+
LIGHTNING = "LIGHTNING"
|
|
15
|
+
|
|
16
|
+
|
|
5
17
|
@dataclass(frozen=True)
|
|
6
18
|
class Machine:
|
|
7
19
|
# Default Machines
|
lightning_sdk/mmt/base.py
CHANGED
|
@@ -4,7 +4,7 @@ from typing import TYPE_CHECKING, Dict, List, Optional, Protocol, Tuple, Union
|
|
|
4
4
|
|
|
5
5
|
if TYPE_CHECKING:
|
|
6
6
|
from lightning_sdk.job.base import MachineDict
|
|
7
|
-
from lightning_sdk.machine import Machine
|
|
7
|
+
from lightning_sdk.machine import CloudProvider, Machine
|
|
8
8
|
from lightning_sdk.organization import Organization
|
|
9
9
|
from lightning_sdk.status import Status
|
|
10
10
|
from lightning_sdk.studio import Studio
|
|
@@ -64,12 +64,14 @@ class _BaseMMT(_BaseJob):
|
|
|
64
64
|
org: Union[str, "Organization", None] = None,
|
|
65
65
|
user: Union[str, "User", None] = None,
|
|
66
66
|
cloud_account: Optional[str] = None,
|
|
67
|
+
cloud_provider: Optional[Union["CloudProvider", str]] = None,
|
|
67
68
|
env: Optional[Dict[str, str]] = None,
|
|
68
69
|
interruptible: bool = False,
|
|
69
70
|
image_credentials: Optional[str] = None,
|
|
70
71
|
cloud_account_auth: bool = False,
|
|
71
72
|
entrypoint: str = "sh -c",
|
|
72
73
|
path_mappings: Optional[Dict[str, str]] = None,
|
|
74
|
+
max_runtime: Optional[int] = None,
|
|
73
75
|
artifacts_local: Optional[str] = None, # deprecated in favor of path_mappings
|
|
74
76
|
artifacts_remote: Optional[str] = None, # deprecated in favor of path_mappings
|
|
75
77
|
cluster: Optional[str] = None, # deprecated in favor of cloud_account
|
|
@@ -89,7 +91,11 @@ class _BaseMMT(_BaseJob):
|
|
|
89
91
|
user: The user owning the teamspace (if any). Defaults to the current user.
|
|
90
92
|
cloud_account: The cloud account to run the job on.
|
|
91
93
|
Defaults to the studio cloud account if running with studio compute env.
|
|
92
|
-
If not provided
|
|
94
|
+
If not provided and `cloud_account_provider` is set, will resolve cluster from this, else
|
|
95
|
+
will fall back to the teamspaces default cloud account.
|
|
96
|
+
cloud_account_provider: The provider to select the cloud-account from.
|
|
97
|
+
If set, must be in agreement with the provider from the cloud_account (if specified).
|
|
98
|
+
If not specified, falls backto the teamspace default cloud account.
|
|
93
99
|
env: Environment variables to set inside the job.
|
|
94
100
|
interruptible: Whether the job should run on interruptible instances. They are cheaper but can be preempted.
|
|
95
101
|
image_credentials: The credentials used to pull the image. Required if the image is private.
|
|
@@ -109,6 +115,10 @@ class _BaseMMT(_BaseJob):
|
|
|
109
115
|
}
|
|
110
116
|
If the path inside the connection is omitted it's assumed to be the root path of that connection.
|
|
111
117
|
Only applicable when submitting docker jobs.
|
|
118
|
+
max_runtime: the duration (in seconds) for which to allocate the machine.
|
|
119
|
+
Irrelevant for most machines, required for some of the top-end machines on GCP.
|
|
120
|
+
If in doubt, set it. Won't have an effect on machines not requiring it.
|
|
121
|
+
Defaults to 3h
|
|
112
122
|
"""
|
|
113
123
|
from lightning_sdk.lightning_cloud.openapi.rest import ApiException
|
|
114
124
|
from lightning_sdk.studio import Studio
|
|
@@ -191,6 +201,7 @@ class _BaseMMT(_BaseJob):
|
|
|
191
201
|
num_machines=num_machines,
|
|
192
202
|
machine=machine,
|
|
193
203
|
cloud_account=cloud_account,
|
|
204
|
+
cloud_provider=cloud_provider,
|
|
194
205
|
command=command,
|
|
195
206
|
studio=studio,
|
|
196
207
|
image=image,
|
|
@@ -202,6 +213,7 @@ class _BaseMMT(_BaseJob):
|
|
|
202
213
|
path_mappings=path_mappings,
|
|
203
214
|
artifacts_local=artifacts_local,
|
|
204
215
|
artifacts_remote=artifacts_remote,
|
|
216
|
+
max_runtime=max_runtime,
|
|
205
217
|
)
|
|
206
218
|
return inst
|
|
207
219
|
|
|
@@ -216,12 +228,14 @@ class _BaseMMT(_BaseJob):
|
|
|
216
228
|
env: Optional[Dict[str, str]] = None,
|
|
217
229
|
interruptible: bool = False,
|
|
218
230
|
cloud_account: Optional[str] = None,
|
|
231
|
+
cloud_provider: Optional[Union["CloudProvider", str]] = None,
|
|
219
232
|
image_credentials: Optional[str] = None,
|
|
220
233
|
cloud_account_auth: bool = False,
|
|
221
234
|
entrypoint: str = "sh -c",
|
|
222
235
|
path_mappings: Optional[Dict[str, str]] = None,
|
|
223
236
|
artifacts_local: Optional[str] = None, # deprecated in favor of path_mappings
|
|
224
237
|
artifacts_remote: Optional[str] = None, # deprecated in favor of path_mappings
|
|
238
|
+
max_runtime: Optional[int] = None,
|
|
225
239
|
) -> None:
|
|
226
240
|
"""Submit a new multi-machine job to the Lightning AI platform.
|
|
227
241
|
|
|
@@ -253,6 +267,10 @@ class _BaseMMT(_BaseJob):
|
|
|
253
267
|
}
|
|
254
268
|
If the path inside the connection is omitted it's assumed to be the root path of that connection.
|
|
255
269
|
Only applicable when submitting docker jobs.
|
|
270
|
+
max_runtime: the duration (in seconds) for which to allocate the machine.
|
|
271
|
+
Irrelevant for most machines, required for some of the top-end machines on GCP.
|
|
272
|
+
If in doubt, set it. Won't have an effect on machines not requiring it.
|
|
273
|
+
Defaults to 3h
|
|
256
274
|
"""
|
|
257
275
|
|
|
258
276
|
@property
|