lightning-sdk 0.2.20__py3-none-any.whl → 0.2.21rc0__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 +1 -1
- lightning_sdk/api/license_api.py +2 -2
- lightning_sdk/api/llm_api.py +53 -1
- lightning_sdk/api/studio_api.py +5 -0
- lightning_sdk/lightning_cloud/openapi/__init__.py +0 -1
- lightning_sdk/lightning_cloud/openapi/api/endpoint_service_api.py +11 -1
- lightning_sdk/lightning_cloud/openapi/api/user_service_api.py +0 -85
- lightning_sdk/lightning_cloud/openapi/models/__init__.py +0 -1
- lightning_sdk/lightning_cloud/openapi/models/update.py +79 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_environment_template.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_environment_template_config.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_cluster_deletion_options.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_create_cloud_space_environment_template_request.py +79 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_create_project_request.py +79 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_message.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_routing_telemetry.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +27 -287
- lightning_sdk/llm/__init__.py +2 -1
- lightning_sdk/llm/asyncllm.py +48 -0
- lightning_sdk/services/utilities.py +15 -1
- {lightning_sdk-0.2.20.dist-info → lightning_sdk-0.2.21rc0.dist-info}/METADATA +1 -1
- {lightning_sdk-0.2.20.dist-info → lightning_sdk-0.2.21rc0.dist-info}/RECORD +26 -26
- lightning_sdk/lightning_cloud/openapi/models/v1_get_user_storage_response.py +0 -201
- {lightning_sdk-0.2.20.dist-info → lightning_sdk-0.2.21rc0.dist-info}/LICENSE +0 -0
- {lightning_sdk-0.2.20.dist-info → lightning_sdk-0.2.21rc0.dist-info}/WHEEL +0 -0
- {lightning_sdk-0.2.20.dist-info → lightning_sdk-0.2.21rc0.dist-info}/entry_points.txt +0 -0
- {lightning_sdk-0.2.20.dist-info → lightning_sdk-0.2.21rc0.dist-info}/top_level.txt +0 -0
|
@@ -50,8 +50,6 @@ class V1UserFeatures(object):
|
|
|
50
50
|
'auto_top_up': 'bool',
|
|
51
51
|
'auto_top_up_teamspace': 'bool',
|
|
52
52
|
'b2c_experience': 'bool',
|
|
53
|
-
'blog_route': 'bool',
|
|
54
|
-
'byoc_litcr': 'bool',
|
|
55
53
|
'cap_add': 'list[str]',
|
|
56
54
|
'cap_drop': 'list[str]',
|
|
57
55
|
'capacity_reservation_byoc': 'bool',
|
|
@@ -67,35 +65,29 @@ class V1UserFeatures(object):
|
|
|
67
65
|
'custom_app_domain': 'bool',
|
|
68
66
|
'datasets': 'bool',
|
|
69
67
|
'default_one_cluster': 'bool',
|
|
70
|
-
'deployment_alerts': 'bool',
|
|
71
68
|
'deployment_persistent_disk': 'bool',
|
|
72
|
-
'deployment_requests_tab': 'bool',
|
|
73
|
-
'dgx_cloud': 'bool',
|
|
74
69
|
'docs_agent': 'bool',
|
|
75
70
|
'drive_v2': 'bool',
|
|
76
|
-
'enable_storage_limits': 'bool',
|
|
77
71
|
'enterprise_compute_admin': 'bool',
|
|
78
72
|
'fair_share': 'bool',
|
|
79
73
|
'featured_studios_admin': 'bool',
|
|
80
|
-
'filestore': 'bool',
|
|
81
74
|
'gcs_folders': 'bool',
|
|
82
75
|
'instant_capacity_reservation': 'bool',
|
|
83
76
|
'job_artifacts_v2': 'bool',
|
|
84
77
|
'lambda_labs': 'bool',
|
|
85
78
|
'lambda_labs_studios': 'bool',
|
|
86
79
|
'landing_studios': 'bool',
|
|
87
|
-
'lightning_cloud': 'bool',
|
|
88
80
|
'lit_logger': 'bool',
|
|
89
81
|
'marketplace': 'bool',
|
|
90
82
|
'mmt_fault_tolerance': 'bool',
|
|
91
83
|
'mmt_strategy_selector': 'bool',
|
|
84
|
+
'model_api_dashboard': 'bool',
|
|
92
85
|
'multicloud_folders': 'bool',
|
|
93
86
|
'multicloud_saas': 'bool',
|
|
94
87
|
'multiple_studio_versions': 'bool',
|
|
95
88
|
'nebius': 'bool',
|
|
96
89
|
'nebius_cpu_studios': 'bool',
|
|
97
90
|
'nebius_gpu_studios': 'bool',
|
|
98
|
-
'neocloud_studios': 'bool',
|
|
99
91
|
'nerf_fs_nonpaying': 'bool',
|
|
100
92
|
'org_level_member_permissions': 'bool',
|
|
101
93
|
'org_usage_limits': 'bool',
|
|
@@ -124,13 +116,11 @@ class V1UserFeatures(object):
|
|
|
124
116
|
'single_wallet': 'bool',
|
|
125
117
|
'slurm': 'bool',
|
|
126
118
|
'slurm_machine_selector': 'bool',
|
|
127
|
-
'stop_ide_container_on_shutdown': 'bool',
|
|
128
119
|
'storage_overuse_deletion': 'bool',
|
|
129
120
|
'studio_config': 'bool',
|
|
130
121
|
'studio_version_visibility': 'bool',
|
|
131
122
|
'teamspace_storage_tab': 'bool',
|
|
132
123
|
'trainium2': 'bool',
|
|
133
|
-
'transfer_studios': 'bool',
|
|
134
124
|
'use_rclone_mounts_only': 'bool',
|
|
135
125
|
'voltage_park': 'bool',
|
|
136
126
|
'voltage_park_studios': 'bool',
|
|
@@ -148,8 +138,6 @@ class V1UserFeatures(object):
|
|
|
148
138
|
'auto_top_up': 'autoTopUp',
|
|
149
139
|
'auto_top_up_teamspace': 'autoTopUpTeamspace',
|
|
150
140
|
'b2c_experience': 'b2cExperience',
|
|
151
|
-
'blog_route': 'blogRoute',
|
|
152
|
-
'byoc_litcr': 'byocLitcr',
|
|
153
141
|
'cap_add': 'capAdd',
|
|
154
142
|
'cap_drop': 'capDrop',
|
|
155
143
|
'capacity_reservation_byoc': 'capacityReservationByoc',
|
|
@@ -165,35 +153,29 @@ class V1UserFeatures(object):
|
|
|
165
153
|
'custom_app_domain': 'customAppDomain',
|
|
166
154
|
'datasets': 'datasets',
|
|
167
155
|
'default_one_cluster': 'defaultOneCluster',
|
|
168
|
-
'deployment_alerts': 'deploymentAlerts',
|
|
169
156
|
'deployment_persistent_disk': 'deploymentPersistentDisk',
|
|
170
|
-
'deployment_requests_tab': 'deploymentRequestsTab',
|
|
171
|
-
'dgx_cloud': 'dgxCloud',
|
|
172
157
|
'docs_agent': 'docsAgent',
|
|
173
158
|
'drive_v2': 'driveV2',
|
|
174
|
-
'enable_storage_limits': 'enableStorageLimits',
|
|
175
159
|
'enterprise_compute_admin': 'enterpriseComputeAdmin',
|
|
176
160
|
'fair_share': 'fairShare',
|
|
177
161
|
'featured_studios_admin': 'featuredStudiosAdmin',
|
|
178
|
-
'filestore': 'filestore',
|
|
179
162
|
'gcs_folders': 'gcsFolders',
|
|
180
163
|
'instant_capacity_reservation': 'instantCapacityReservation',
|
|
181
164
|
'job_artifacts_v2': 'jobArtifactsV2',
|
|
182
165
|
'lambda_labs': 'lambdaLabs',
|
|
183
166
|
'lambda_labs_studios': 'lambdaLabsStudios',
|
|
184
167
|
'landing_studios': 'landingStudios',
|
|
185
|
-
'lightning_cloud': 'lightningCloud',
|
|
186
168
|
'lit_logger': 'litLogger',
|
|
187
169
|
'marketplace': 'marketplace',
|
|
188
170
|
'mmt_fault_tolerance': 'mmtFaultTolerance',
|
|
189
171
|
'mmt_strategy_selector': 'mmtStrategySelector',
|
|
172
|
+
'model_api_dashboard': 'modelApiDashboard',
|
|
190
173
|
'multicloud_folders': 'multicloudFolders',
|
|
191
174
|
'multicloud_saas': 'multicloudSaas',
|
|
192
175
|
'multiple_studio_versions': 'multipleStudioVersions',
|
|
193
176
|
'nebius': 'nebius',
|
|
194
177
|
'nebius_cpu_studios': 'nebiusCpuStudios',
|
|
195
178
|
'nebius_gpu_studios': 'nebiusGpuStudios',
|
|
196
|
-
'neocloud_studios': 'neocloudStudios',
|
|
197
179
|
'nerf_fs_nonpaying': 'nerfFsNonpaying',
|
|
198
180
|
'org_level_member_permissions': 'orgLevelMemberPermissions',
|
|
199
181
|
'org_usage_limits': 'orgUsageLimits',
|
|
@@ -222,13 +204,11 @@ class V1UserFeatures(object):
|
|
|
222
204
|
'single_wallet': 'singleWallet',
|
|
223
205
|
'slurm': 'slurm',
|
|
224
206
|
'slurm_machine_selector': 'slurmMachineSelector',
|
|
225
|
-
'stop_ide_container_on_shutdown': 'stopIdeContainerOnShutdown',
|
|
226
207
|
'storage_overuse_deletion': 'storageOveruseDeletion',
|
|
227
208
|
'studio_config': 'studioConfig',
|
|
228
209
|
'studio_version_visibility': 'studioVersionVisibility',
|
|
229
210
|
'teamspace_storage_tab': 'teamspaceStorageTab',
|
|
230
211
|
'trainium2': 'trainium2',
|
|
231
|
-
'transfer_studios': 'transferStudios',
|
|
232
212
|
'use_rclone_mounts_only': 'useRcloneMountsOnly',
|
|
233
213
|
'voltage_park': 'voltagePark',
|
|
234
214
|
'voltage_park_studios': 'voltageParkStudios',
|
|
@@ -236,7 +216,7 @@ class V1UserFeatures(object):
|
|
|
236
216
|
'weka': 'weka'
|
|
237
217
|
}
|
|
238
218
|
|
|
239
|
-
def __init__(self, accurate_billing: '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, auto_top_up: 'bool' =None, auto_top_up_teamspace: 'bool' =None, b2c_experience: 'bool' =None,
|
|
219
|
+
def __init__(self, accurate_billing: '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, auto_top_up: 'bool' =None, auto_top_up_teamspace: '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, chat_models: 'bool' =None, cloud_space_environment_templates: 'bool' =None, cloudy_vibe_code: 'bool' =None, code_tab: 'bool' =None, collab_screen_sharing: 'bool' =None, concurrent_gpu_limit: '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, docs_agent: 'bool' =None, drive_v2: 'bool' =None, enterprise_compute_admin: 'bool' =None, fair_share: 'bool' =None, featured_studios_admin: 'bool' =None, gcs_folders: 'bool' =None, instant_capacity_reservation: 'bool' =None, job_artifacts_v2: 'bool' =None, lambda_labs: 'bool' =None, lambda_labs_studios: '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, multicloud_folders: 'bool' =None, multicloud_saas: 'bool' =None, multiple_studio_versions: 'bool' =None, nebius: 'bool' =None, nebius_cpu_studios: 'bool' =None, nebius_gpu_studios: 'bool' =None, nerf_fs_nonpaying: 'bool' =None, org_level_member_permissions: 'bool' =None, org_usage_limits: 'bool' =None, paygo_free_storage_limit_check: 'bool' =None, pipelines: 'bool' =None, plg_control_center: '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, reserved_machines_tab: 'bool' =None, restartable_jobs: 'bool' =None, runnable_public_studio_page: 'bool' =None, security_docs: 'bool' =None, seoul_aws_region: 'bool' =None, show_dev_admin: 'bool' =None, single_wallet: 'bool' =None, slurm: 'bool' =None, slurm_machine_selector: 'bool' =None, storage_overuse_deletion: 'bool' =None, studio_config: 'bool' =None, studio_version_visibility: 'bool' =None, teamspace_storage_tab: 'bool' =None, trainium2: 'bool' =None, use_rclone_mounts_only: 'bool' =None, voltage_park: 'bool' =None, voltage_park_studios: 'bool' =None, vultr: 'bool' =None, weka: 'bool' =None): # noqa: E501
|
|
240
220
|
"""V1UserFeatures - a model defined in Swagger""" # noqa: E501
|
|
241
221
|
self._accurate_billing = None
|
|
242
222
|
self._affiliate_links = None
|
|
@@ -247,8 +227,6 @@ class V1UserFeatures(object):
|
|
|
247
227
|
self._auto_top_up = None
|
|
248
228
|
self._auto_top_up_teamspace = None
|
|
249
229
|
self._b2c_experience = None
|
|
250
|
-
self._blog_route = None
|
|
251
|
-
self._byoc_litcr = None
|
|
252
230
|
self._cap_add = None
|
|
253
231
|
self._cap_drop = None
|
|
254
232
|
self._capacity_reservation_byoc = None
|
|
@@ -264,35 +242,29 @@ class V1UserFeatures(object):
|
|
|
264
242
|
self._custom_app_domain = None
|
|
265
243
|
self._datasets = None
|
|
266
244
|
self._default_one_cluster = None
|
|
267
|
-
self._deployment_alerts = None
|
|
268
245
|
self._deployment_persistent_disk = None
|
|
269
|
-
self._deployment_requests_tab = None
|
|
270
|
-
self._dgx_cloud = None
|
|
271
246
|
self._docs_agent = None
|
|
272
247
|
self._drive_v2 = None
|
|
273
|
-
self._enable_storage_limits = None
|
|
274
248
|
self._enterprise_compute_admin = None
|
|
275
249
|
self._fair_share = None
|
|
276
250
|
self._featured_studios_admin = None
|
|
277
|
-
self._filestore = None
|
|
278
251
|
self._gcs_folders = None
|
|
279
252
|
self._instant_capacity_reservation = None
|
|
280
253
|
self._job_artifacts_v2 = None
|
|
281
254
|
self._lambda_labs = None
|
|
282
255
|
self._lambda_labs_studios = None
|
|
283
256
|
self._landing_studios = None
|
|
284
|
-
self._lightning_cloud = None
|
|
285
257
|
self._lit_logger = None
|
|
286
258
|
self._marketplace = None
|
|
287
259
|
self._mmt_fault_tolerance = None
|
|
288
260
|
self._mmt_strategy_selector = None
|
|
261
|
+
self._model_api_dashboard = None
|
|
289
262
|
self._multicloud_folders = None
|
|
290
263
|
self._multicloud_saas = None
|
|
291
264
|
self._multiple_studio_versions = None
|
|
292
265
|
self._nebius = None
|
|
293
266
|
self._nebius_cpu_studios = None
|
|
294
267
|
self._nebius_gpu_studios = None
|
|
295
|
-
self._neocloud_studios = None
|
|
296
268
|
self._nerf_fs_nonpaying = None
|
|
297
269
|
self._org_level_member_permissions = None
|
|
298
270
|
self._org_usage_limits = None
|
|
@@ -321,13 +293,11 @@ class V1UserFeatures(object):
|
|
|
321
293
|
self._single_wallet = None
|
|
322
294
|
self._slurm = None
|
|
323
295
|
self._slurm_machine_selector = None
|
|
324
|
-
self._stop_ide_container_on_shutdown = None
|
|
325
296
|
self._storage_overuse_deletion = None
|
|
326
297
|
self._studio_config = None
|
|
327
298
|
self._studio_version_visibility = None
|
|
328
299
|
self._teamspace_storage_tab = None
|
|
329
300
|
self._trainium2 = None
|
|
330
|
-
self._transfer_studios = None
|
|
331
301
|
self._use_rclone_mounts_only = None
|
|
332
302
|
self._voltage_park = None
|
|
333
303
|
self._voltage_park_studios = None
|
|
@@ -352,10 +322,6 @@ class V1UserFeatures(object):
|
|
|
352
322
|
self.auto_top_up_teamspace = auto_top_up_teamspace
|
|
353
323
|
if b2c_experience is not None:
|
|
354
324
|
self.b2c_experience = b2c_experience
|
|
355
|
-
if blog_route is not None:
|
|
356
|
-
self.blog_route = blog_route
|
|
357
|
-
if byoc_litcr is not None:
|
|
358
|
-
self.byoc_litcr = byoc_litcr
|
|
359
325
|
if cap_add is not None:
|
|
360
326
|
self.cap_add = cap_add
|
|
361
327
|
if cap_drop is not None:
|
|
@@ -386,28 +352,18 @@ class V1UserFeatures(object):
|
|
|
386
352
|
self.datasets = datasets
|
|
387
353
|
if default_one_cluster is not None:
|
|
388
354
|
self.default_one_cluster = default_one_cluster
|
|
389
|
-
if deployment_alerts is not None:
|
|
390
|
-
self.deployment_alerts = deployment_alerts
|
|
391
355
|
if deployment_persistent_disk is not None:
|
|
392
356
|
self.deployment_persistent_disk = deployment_persistent_disk
|
|
393
|
-
if deployment_requests_tab is not None:
|
|
394
|
-
self.deployment_requests_tab = deployment_requests_tab
|
|
395
|
-
if dgx_cloud is not None:
|
|
396
|
-
self.dgx_cloud = dgx_cloud
|
|
397
357
|
if docs_agent is not None:
|
|
398
358
|
self.docs_agent = docs_agent
|
|
399
359
|
if drive_v2 is not None:
|
|
400
360
|
self.drive_v2 = drive_v2
|
|
401
|
-
if enable_storage_limits is not None:
|
|
402
|
-
self.enable_storage_limits = enable_storage_limits
|
|
403
361
|
if enterprise_compute_admin is not None:
|
|
404
362
|
self.enterprise_compute_admin = enterprise_compute_admin
|
|
405
363
|
if fair_share is not None:
|
|
406
364
|
self.fair_share = fair_share
|
|
407
365
|
if featured_studios_admin is not None:
|
|
408
366
|
self.featured_studios_admin = featured_studios_admin
|
|
409
|
-
if filestore is not None:
|
|
410
|
-
self.filestore = filestore
|
|
411
367
|
if gcs_folders is not None:
|
|
412
368
|
self.gcs_folders = gcs_folders
|
|
413
369
|
if instant_capacity_reservation is not None:
|
|
@@ -420,8 +376,6 @@ class V1UserFeatures(object):
|
|
|
420
376
|
self.lambda_labs_studios = lambda_labs_studios
|
|
421
377
|
if landing_studios is not None:
|
|
422
378
|
self.landing_studios = landing_studios
|
|
423
|
-
if lightning_cloud is not None:
|
|
424
|
-
self.lightning_cloud = lightning_cloud
|
|
425
379
|
if lit_logger is not None:
|
|
426
380
|
self.lit_logger = lit_logger
|
|
427
381
|
if marketplace is not None:
|
|
@@ -430,6 +384,8 @@ class V1UserFeatures(object):
|
|
|
430
384
|
self.mmt_fault_tolerance = mmt_fault_tolerance
|
|
431
385
|
if mmt_strategy_selector is not None:
|
|
432
386
|
self.mmt_strategy_selector = mmt_strategy_selector
|
|
387
|
+
if model_api_dashboard is not None:
|
|
388
|
+
self.model_api_dashboard = model_api_dashboard
|
|
433
389
|
if multicloud_folders is not None:
|
|
434
390
|
self.multicloud_folders = multicloud_folders
|
|
435
391
|
if multicloud_saas is not None:
|
|
@@ -442,8 +398,6 @@ class V1UserFeatures(object):
|
|
|
442
398
|
self.nebius_cpu_studios = nebius_cpu_studios
|
|
443
399
|
if nebius_gpu_studios is not None:
|
|
444
400
|
self.nebius_gpu_studios = nebius_gpu_studios
|
|
445
|
-
if neocloud_studios is not None:
|
|
446
|
-
self.neocloud_studios = neocloud_studios
|
|
447
401
|
if nerf_fs_nonpaying is not None:
|
|
448
402
|
self.nerf_fs_nonpaying = nerf_fs_nonpaying
|
|
449
403
|
if org_level_member_permissions is not None:
|
|
@@ -500,8 +454,6 @@ class V1UserFeatures(object):
|
|
|
500
454
|
self.slurm = slurm
|
|
501
455
|
if slurm_machine_selector is not None:
|
|
502
456
|
self.slurm_machine_selector = slurm_machine_selector
|
|
503
|
-
if stop_ide_container_on_shutdown is not None:
|
|
504
|
-
self.stop_ide_container_on_shutdown = stop_ide_container_on_shutdown
|
|
505
457
|
if storage_overuse_deletion is not None:
|
|
506
458
|
self.storage_overuse_deletion = storage_overuse_deletion
|
|
507
459
|
if studio_config is not None:
|
|
@@ -512,8 +464,6 @@ class V1UserFeatures(object):
|
|
|
512
464
|
self.teamspace_storage_tab = teamspace_storage_tab
|
|
513
465
|
if trainium2 is not None:
|
|
514
466
|
self.trainium2 = trainium2
|
|
515
|
-
if transfer_studios is not None:
|
|
516
|
-
self.transfer_studios = transfer_studios
|
|
517
467
|
if use_rclone_mounts_only is not None:
|
|
518
468
|
self.use_rclone_mounts_only = use_rclone_mounts_only
|
|
519
469
|
if voltage_park is not None:
|
|
@@ -714,48 +664,6 @@ class V1UserFeatures(object):
|
|
|
714
664
|
|
|
715
665
|
self._b2c_experience = b2c_experience
|
|
716
666
|
|
|
717
|
-
@property
|
|
718
|
-
def blog_route(self) -> 'bool':
|
|
719
|
-
"""Gets the blog_route of this V1UserFeatures. # noqa: E501
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
:return: The blog_route of this V1UserFeatures. # noqa: E501
|
|
723
|
-
:rtype: bool
|
|
724
|
-
"""
|
|
725
|
-
return self._blog_route
|
|
726
|
-
|
|
727
|
-
@blog_route.setter
|
|
728
|
-
def blog_route(self, blog_route: 'bool'):
|
|
729
|
-
"""Sets the blog_route of this V1UserFeatures.
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
:param blog_route: The blog_route of this V1UserFeatures. # noqa: E501
|
|
733
|
-
:type: bool
|
|
734
|
-
"""
|
|
735
|
-
|
|
736
|
-
self._blog_route = blog_route
|
|
737
|
-
|
|
738
|
-
@property
|
|
739
|
-
def byoc_litcr(self) -> 'bool':
|
|
740
|
-
"""Gets the byoc_litcr of this V1UserFeatures. # noqa: E501
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
:return: The byoc_litcr of this V1UserFeatures. # noqa: E501
|
|
744
|
-
:rtype: bool
|
|
745
|
-
"""
|
|
746
|
-
return self._byoc_litcr
|
|
747
|
-
|
|
748
|
-
@byoc_litcr.setter
|
|
749
|
-
def byoc_litcr(self, byoc_litcr: 'bool'):
|
|
750
|
-
"""Sets the byoc_litcr of this V1UserFeatures.
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
:param byoc_litcr: The byoc_litcr of this V1UserFeatures. # noqa: E501
|
|
754
|
-
:type: bool
|
|
755
|
-
"""
|
|
756
|
-
|
|
757
|
-
self._byoc_litcr = byoc_litcr
|
|
758
|
-
|
|
759
667
|
@property
|
|
760
668
|
def cap_add(self) -> 'list[str]':
|
|
761
669
|
"""Gets the cap_add of this V1UserFeatures. # noqa: E501
|
|
@@ -1071,27 +979,6 @@ class V1UserFeatures(object):
|
|
|
1071
979
|
|
|
1072
980
|
self._default_one_cluster = default_one_cluster
|
|
1073
981
|
|
|
1074
|
-
@property
|
|
1075
|
-
def deployment_alerts(self) -> 'bool':
|
|
1076
|
-
"""Gets the deployment_alerts of this V1UserFeatures. # noqa: E501
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
:return: The deployment_alerts of this V1UserFeatures. # noqa: E501
|
|
1080
|
-
:rtype: bool
|
|
1081
|
-
"""
|
|
1082
|
-
return self._deployment_alerts
|
|
1083
|
-
|
|
1084
|
-
@deployment_alerts.setter
|
|
1085
|
-
def deployment_alerts(self, deployment_alerts: 'bool'):
|
|
1086
|
-
"""Sets the deployment_alerts of this V1UserFeatures.
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
:param deployment_alerts: The deployment_alerts of this V1UserFeatures. # noqa: E501
|
|
1090
|
-
:type: bool
|
|
1091
|
-
"""
|
|
1092
|
-
|
|
1093
|
-
self._deployment_alerts = deployment_alerts
|
|
1094
|
-
|
|
1095
982
|
@property
|
|
1096
983
|
def deployment_persistent_disk(self) -> 'bool':
|
|
1097
984
|
"""Gets the deployment_persistent_disk of this V1UserFeatures. # noqa: E501
|
|
@@ -1113,48 +1000,6 @@ class V1UserFeatures(object):
|
|
|
1113
1000
|
|
|
1114
1001
|
self._deployment_persistent_disk = deployment_persistent_disk
|
|
1115
1002
|
|
|
1116
|
-
@property
|
|
1117
|
-
def deployment_requests_tab(self) -> 'bool':
|
|
1118
|
-
"""Gets the deployment_requests_tab of this V1UserFeatures. # noqa: E501
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
:return: The deployment_requests_tab of this V1UserFeatures. # noqa: E501
|
|
1122
|
-
:rtype: bool
|
|
1123
|
-
"""
|
|
1124
|
-
return self._deployment_requests_tab
|
|
1125
|
-
|
|
1126
|
-
@deployment_requests_tab.setter
|
|
1127
|
-
def deployment_requests_tab(self, deployment_requests_tab: 'bool'):
|
|
1128
|
-
"""Sets the deployment_requests_tab of this V1UserFeatures.
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
:param deployment_requests_tab: The deployment_requests_tab of this V1UserFeatures. # noqa: E501
|
|
1132
|
-
:type: bool
|
|
1133
|
-
"""
|
|
1134
|
-
|
|
1135
|
-
self._deployment_requests_tab = deployment_requests_tab
|
|
1136
|
-
|
|
1137
|
-
@property
|
|
1138
|
-
def dgx_cloud(self) -> 'bool':
|
|
1139
|
-
"""Gets the dgx_cloud of this V1UserFeatures. # noqa: E501
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
:return: The dgx_cloud of this V1UserFeatures. # noqa: E501
|
|
1143
|
-
:rtype: bool
|
|
1144
|
-
"""
|
|
1145
|
-
return self._dgx_cloud
|
|
1146
|
-
|
|
1147
|
-
@dgx_cloud.setter
|
|
1148
|
-
def dgx_cloud(self, dgx_cloud: 'bool'):
|
|
1149
|
-
"""Sets the dgx_cloud of this V1UserFeatures.
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
:param dgx_cloud: The dgx_cloud of this V1UserFeatures. # noqa: E501
|
|
1153
|
-
:type: bool
|
|
1154
|
-
"""
|
|
1155
|
-
|
|
1156
|
-
self._dgx_cloud = dgx_cloud
|
|
1157
|
-
|
|
1158
1003
|
@property
|
|
1159
1004
|
def docs_agent(self) -> 'bool':
|
|
1160
1005
|
"""Gets the docs_agent of this V1UserFeatures. # noqa: E501
|
|
@@ -1197,27 +1042,6 @@ class V1UserFeatures(object):
|
|
|
1197
1042
|
|
|
1198
1043
|
self._drive_v2 = drive_v2
|
|
1199
1044
|
|
|
1200
|
-
@property
|
|
1201
|
-
def enable_storage_limits(self) -> 'bool':
|
|
1202
|
-
"""Gets the enable_storage_limits of this V1UserFeatures. # noqa: E501
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
:return: The enable_storage_limits of this V1UserFeatures. # noqa: E501
|
|
1206
|
-
:rtype: bool
|
|
1207
|
-
"""
|
|
1208
|
-
return self._enable_storage_limits
|
|
1209
|
-
|
|
1210
|
-
@enable_storage_limits.setter
|
|
1211
|
-
def enable_storage_limits(self, enable_storage_limits: 'bool'):
|
|
1212
|
-
"""Sets the enable_storage_limits of this V1UserFeatures.
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
:param enable_storage_limits: The enable_storage_limits of this V1UserFeatures. # noqa: E501
|
|
1216
|
-
:type: bool
|
|
1217
|
-
"""
|
|
1218
|
-
|
|
1219
|
-
self._enable_storage_limits = enable_storage_limits
|
|
1220
|
-
|
|
1221
1045
|
@property
|
|
1222
1046
|
def enterprise_compute_admin(self) -> 'bool':
|
|
1223
1047
|
"""Gets the enterprise_compute_admin of this V1UserFeatures. # noqa: E501
|
|
@@ -1281,27 +1105,6 @@ class V1UserFeatures(object):
|
|
|
1281
1105
|
|
|
1282
1106
|
self._featured_studios_admin = featured_studios_admin
|
|
1283
1107
|
|
|
1284
|
-
@property
|
|
1285
|
-
def filestore(self) -> 'bool':
|
|
1286
|
-
"""Gets the filestore of this V1UserFeatures. # noqa: E501
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
:return: The filestore of this V1UserFeatures. # noqa: E501
|
|
1290
|
-
:rtype: bool
|
|
1291
|
-
"""
|
|
1292
|
-
return self._filestore
|
|
1293
|
-
|
|
1294
|
-
@filestore.setter
|
|
1295
|
-
def filestore(self, filestore: 'bool'):
|
|
1296
|
-
"""Sets the filestore of this V1UserFeatures.
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
:param filestore: The filestore of this V1UserFeatures. # noqa: E501
|
|
1300
|
-
:type: bool
|
|
1301
|
-
"""
|
|
1302
|
-
|
|
1303
|
-
self._filestore = filestore
|
|
1304
|
-
|
|
1305
1108
|
@property
|
|
1306
1109
|
def gcs_folders(self) -> 'bool':
|
|
1307
1110
|
"""Gets the gcs_folders of this V1UserFeatures. # noqa: E501
|
|
@@ -1428,27 +1231,6 @@ class V1UserFeatures(object):
|
|
|
1428
1231
|
|
|
1429
1232
|
self._landing_studios = landing_studios
|
|
1430
1233
|
|
|
1431
|
-
@property
|
|
1432
|
-
def lightning_cloud(self) -> 'bool':
|
|
1433
|
-
"""Gets the lightning_cloud of this V1UserFeatures. # noqa: E501
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
:return: The lightning_cloud of this V1UserFeatures. # noqa: E501
|
|
1437
|
-
:rtype: bool
|
|
1438
|
-
"""
|
|
1439
|
-
return self._lightning_cloud
|
|
1440
|
-
|
|
1441
|
-
@lightning_cloud.setter
|
|
1442
|
-
def lightning_cloud(self, lightning_cloud: 'bool'):
|
|
1443
|
-
"""Sets the lightning_cloud of this V1UserFeatures.
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
:param lightning_cloud: The lightning_cloud of this V1UserFeatures. # noqa: E501
|
|
1447
|
-
:type: bool
|
|
1448
|
-
"""
|
|
1449
|
-
|
|
1450
|
-
self._lightning_cloud = lightning_cloud
|
|
1451
|
-
|
|
1452
1234
|
@property
|
|
1453
1235
|
def lit_logger(self) -> 'bool':
|
|
1454
1236
|
"""Gets the lit_logger of this V1UserFeatures. # noqa: E501
|
|
@@ -1533,6 +1315,27 @@ class V1UserFeatures(object):
|
|
|
1533
1315
|
|
|
1534
1316
|
self._mmt_strategy_selector = mmt_strategy_selector
|
|
1535
1317
|
|
|
1318
|
+
@property
|
|
1319
|
+
def model_api_dashboard(self) -> 'bool':
|
|
1320
|
+
"""Gets the model_api_dashboard of this V1UserFeatures. # noqa: E501
|
|
1321
|
+
|
|
1322
|
+
|
|
1323
|
+
:return: The model_api_dashboard of this V1UserFeatures. # noqa: E501
|
|
1324
|
+
:rtype: bool
|
|
1325
|
+
"""
|
|
1326
|
+
return self._model_api_dashboard
|
|
1327
|
+
|
|
1328
|
+
@model_api_dashboard.setter
|
|
1329
|
+
def model_api_dashboard(self, model_api_dashboard: 'bool'):
|
|
1330
|
+
"""Sets the model_api_dashboard of this V1UserFeatures.
|
|
1331
|
+
|
|
1332
|
+
|
|
1333
|
+
:param model_api_dashboard: The model_api_dashboard of this V1UserFeatures. # noqa: E501
|
|
1334
|
+
:type: bool
|
|
1335
|
+
"""
|
|
1336
|
+
|
|
1337
|
+
self._model_api_dashboard = model_api_dashboard
|
|
1338
|
+
|
|
1536
1339
|
@property
|
|
1537
1340
|
def multicloud_folders(self) -> 'bool':
|
|
1538
1341
|
"""Gets the multicloud_folders of this V1UserFeatures. # noqa: E501
|
|
@@ -1659,27 +1462,6 @@ class V1UserFeatures(object):
|
|
|
1659
1462
|
|
|
1660
1463
|
self._nebius_gpu_studios = nebius_gpu_studios
|
|
1661
1464
|
|
|
1662
|
-
@property
|
|
1663
|
-
def neocloud_studios(self) -> 'bool':
|
|
1664
|
-
"""Gets the neocloud_studios of this V1UserFeatures. # noqa: E501
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
:return: The neocloud_studios of this V1UserFeatures. # noqa: E501
|
|
1668
|
-
:rtype: bool
|
|
1669
|
-
"""
|
|
1670
|
-
return self._neocloud_studios
|
|
1671
|
-
|
|
1672
|
-
@neocloud_studios.setter
|
|
1673
|
-
def neocloud_studios(self, neocloud_studios: 'bool'):
|
|
1674
|
-
"""Sets the neocloud_studios of this V1UserFeatures.
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
:param neocloud_studios: The neocloud_studios of this V1UserFeatures. # noqa: E501
|
|
1678
|
-
:type: bool
|
|
1679
|
-
"""
|
|
1680
|
-
|
|
1681
|
-
self._neocloud_studios = neocloud_studios
|
|
1682
|
-
|
|
1683
1465
|
@property
|
|
1684
1466
|
def nerf_fs_nonpaying(self) -> 'bool':
|
|
1685
1467
|
"""Gets the nerf_fs_nonpaying of this V1UserFeatures. # noqa: E501
|
|
@@ -2268,27 +2050,6 @@ class V1UserFeatures(object):
|
|
|
2268
2050
|
|
|
2269
2051
|
self._slurm_machine_selector = slurm_machine_selector
|
|
2270
2052
|
|
|
2271
|
-
@property
|
|
2272
|
-
def stop_ide_container_on_shutdown(self) -> 'bool':
|
|
2273
|
-
"""Gets the stop_ide_container_on_shutdown of this V1UserFeatures. # noqa: E501
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
:return: The stop_ide_container_on_shutdown of this V1UserFeatures. # noqa: E501
|
|
2277
|
-
:rtype: bool
|
|
2278
|
-
"""
|
|
2279
|
-
return self._stop_ide_container_on_shutdown
|
|
2280
|
-
|
|
2281
|
-
@stop_ide_container_on_shutdown.setter
|
|
2282
|
-
def stop_ide_container_on_shutdown(self, stop_ide_container_on_shutdown: 'bool'):
|
|
2283
|
-
"""Sets the stop_ide_container_on_shutdown of this V1UserFeatures.
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
:param stop_ide_container_on_shutdown: The stop_ide_container_on_shutdown of this V1UserFeatures. # noqa: E501
|
|
2287
|
-
:type: bool
|
|
2288
|
-
"""
|
|
2289
|
-
|
|
2290
|
-
self._stop_ide_container_on_shutdown = stop_ide_container_on_shutdown
|
|
2291
|
-
|
|
2292
2053
|
@property
|
|
2293
2054
|
def storage_overuse_deletion(self) -> 'bool':
|
|
2294
2055
|
"""Gets the storage_overuse_deletion of this V1UserFeatures. # noqa: E501
|
|
@@ -2394,27 +2155,6 @@ class V1UserFeatures(object):
|
|
|
2394
2155
|
|
|
2395
2156
|
self._trainium2 = trainium2
|
|
2396
2157
|
|
|
2397
|
-
@property
|
|
2398
|
-
def transfer_studios(self) -> 'bool':
|
|
2399
|
-
"""Gets the transfer_studios of this V1UserFeatures. # noqa: E501
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
:return: The transfer_studios of this V1UserFeatures. # noqa: E501
|
|
2403
|
-
:rtype: bool
|
|
2404
|
-
"""
|
|
2405
|
-
return self._transfer_studios
|
|
2406
|
-
|
|
2407
|
-
@transfer_studios.setter
|
|
2408
|
-
def transfer_studios(self, transfer_studios: 'bool'):
|
|
2409
|
-
"""Sets the transfer_studios of this V1UserFeatures.
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
:param transfer_studios: The transfer_studios of this V1UserFeatures. # noqa: E501
|
|
2413
|
-
:type: bool
|
|
2414
|
-
"""
|
|
2415
|
-
|
|
2416
|
-
self._transfer_studios = transfer_studios
|
|
2417
|
-
|
|
2418
2158
|
@property
|
|
2419
2159
|
def use_rclone_mounts_only(self) -> 'bool':
|
|
2420
2160
|
"""Gets the use_rclone_mounts_only of this V1UserFeatures. # noqa: E501
|
lightning_sdk/llm/__init__.py
CHANGED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import os
|
|
2
|
+
from typing import AsyncGenerator, Dict, List, Optional, Union
|
|
3
|
+
|
|
4
|
+
from lightning_sdk.llm.llm import LLM
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class AsyncLLM(LLM):
|
|
8
|
+
async def chat(
|
|
9
|
+
self,
|
|
10
|
+
prompt: str,
|
|
11
|
+
system_prompt: Optional[str] = None,
|
|
12
|
+
max_completion_tokens: Optional[int] = 500,
|
|
13
|
+
images: Optional[Union[List[str], str]] = None,
|
|
14
|
+
conversation: Optional[str] = None,
|
|
15
|
+
metadata: Optional[Dict[str, str]] = None,
|
|
16
|
+
stream: bool = False,
|
|
17
|
+
upload_local_images: bool = False,
|
|
18
|
+
) -> Union[str, AsyncGenerator[str, None]]:
|
|
19
|
+
if conversation and conversation not in self._conversations:
|
|
20
|
+
self._get_conversations()
|
|
21
|
+
|
|
22
|
+
if images:
|
|
23
|
+
if isinstance(images, str):
|
|
24
|
+
images = [images]
|
|
25
|
+
for image in images:
|
|
26
|
+
if not isinstance(image, str):
|
|
27
|
+
raise NotImplementedError(f"Image type {type(image)} are not supported yet.")
|
|
28
|
+
if not image.startswith("http") and upload_local_images:
|
|
29
|
+
self._teamspace.upload_file(file_path=image, remote_path=f"images/{os.path.basename(image)}")
|
|
30
|
+
|
|
31
|
+
conversation_id = self._conversations.get(conversation) if conversation else None
|
|
32
|
+
output = await self._llm_api.async_start_conversation(
|
|
33
|
+
prompt=prompt,
|
|
34
|
+
system_prompt=system_prompt,
|
|
35
|
+
max_completion_tokens=max_completion_tokens,
|
|
36
|
+
images=images,
|
|
37
|
+
assistant_id=self._model.id,
|
|
38
|
+
conversation_id=conversation_id,
|
|
39
|
+
billing_project_id=self._teamspace.id,
|
|
40
|
+
metadata=metadata,
|
|
41
|
+
name=conversation,
|
|
42
|
+
stream=stream,
|
|
43
|
+
)
|
|
44
|
+
if not stream:
|
|
45
|
+
if conversation and not conversation_id:
|
|
46
|
+
self._conversations[conversation] = output.conversation_id
|
|
47
|
+
return output.choices[0].delta.content
|
|
48
|
+
return self._stream_chat_response(output, conversation=conversation)
|
|
@@ -35,7 +35,9 @@ def _get_project(client: LightningClient, project_name: Optional[str] = None) ->
|
|
|
35
35
|
raise ValueError("No valid projects found. Please reach out to lightning.ai team to create a project")
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
def _get_cluster(
|
|
38
|
+
def _get_cluster(
|
|
39
|
+
client: LightningClient, project_id: str, cluster_id: Optional[str] = None, allow_neoclouds: bool = False
|
|
40
|
+
) -> V1ProjectClusterBinding:
|
|
39
41
|
"""Get a project membership for the user from the backend."""
|
|
40
42
|
clusters = client.projects_service_list_project_cluster_bindings(project_id=project_id)
|
|
41
43
|
if cluster_id:
|
|
@@ -47,6 +49,18 @@ def _get_cluster(client: LightningClient, project_id: str, cluster_id: Optional[
|
|
|
47
49
|
f"Found {[c.cluster_id for c in clusters.clusters]}."
|
|
48
50
|
)
|
|
49
51
|
|
|
52
|
+
# filter neoclouds out
|
|
53
|
+
if not allow_neoclouds:
|
|
54
|
+
cluster_objs = client.cluster_service_list_clusters(project_id=project_id)
|
|
55
|
+
# filter for aws or gcp cluster
|
|
56
|
+
valid_clusters = filter(
|
|
57
|
+
lambda c: c.spec.aws_v1 is not None or c.spec.google_cloud_v1 is not None, cluster_objs.clusters
|
|
58
|
+
)
|
|
59
|
+
valid_clusters = {c.id for c in valid_clusters}
|
|
60
|
+
|
|
61
|
+
if len(valid_clusters):
|
|
62
|
+
clusters.clusters = list(filter(lambda c: c.cluster_id in valid_clusters, clusters.clusters))
|
|
63
|
+
|
|
50
64
|
clusters = sorted(clusters.clusters, key=lambda x: x.created_at)
|
|
51
65
|
if len(clusters):
|
|
52
66
|
return clusters[0]
|