lightning-sdk 0.2.24rc1__py3-none-any.whl → 2025.7.9__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 CHANGED
@@ -31,6 +31,6 @@ __all__ = [
31
31
  "User",
32
32
  ]
33
33
 
34
- __version__ = "0.2.24.rc1"
34
+ __version__ = "2025.07.09"
35
35
  _check_version_and_prompt_upgrade(__version__)
36
36
  _set_tqdm_envvars_noninteractive()
@@ -4,6 +4,7 @@ from lightning_sdk.lightning_cloud.openapi import (
4
4
  Externalv1Cluster,
5
5
  V1CloudProvider,
6
6
  V1ClusterType,
7
+ V1ExternalCluster,
7
8
  V1ListClusterAcceleratorsResponse,
8
9
  )
9
10
  from lightning_sdk.lightning_cloud.rest_client import LightningClient
@@ -28,6 +29,20 @@ class ClusterApi:
28
29
  raise ValueError(f"Cluster {cluster_id} does not exist")
29
30
  return res
30
31
 
32
+ def list_clusters(self, project_id: str) -> List[V1ExternalCluster]:
33
+ """Lists the clusters for a given project.
34
+
35
+ Args:
36
+ project_id: The project to list clusters for
37
+
38
+ Returns:
39
+ A list of clusters
40
+ """
41
+ res = self._client.cluster_service_list_project_clusters(
42
+ project_id=project_id,
43
+ )
44
+ return res.clusters
45
+
31
46
  def list_cluster_accelerators(self, cluster_id: str, org_id: str) -> V1ListClusterAcceleratorsResponse:
32
47
  """Lists the accelerators for a given cluster.
33
48
 
@@ -55,7 +55,7 @@ class PipelineApi:
55
55
  body = ProjectIdPipelinesBody(
56
56
  name=name,
57
57
  steps=steps,
58
- shared_filesystem=self._prepare_shared_filesytem(shared_filesystem, steps, teamspace),
58
+ shared_filesystem=self._prepare_shared_filesystem(shared_filesystem, steps, teamspace),
59
59
  parent_pipeline_id=parent_pipeline_id or "",
60
60
  )
61
61
 
@@ -89,7 +89,7 @@ class PipelineApi:
89
89
  def delete(self, project_id: str, pipeline_id: str) -> V1DeletePipelineResponse:
90
90
  return self._client.pipelines_service_delete_pipeline(project_id, pipeline_id)
91
91
 
92
- def _prepare_shared_filesytem(
92
+ def _prepare_shared_filesystem(
93
93
  self, shared_filesystem: Union[bool, V1SharedFilesystem], steps: List["V1PipelineStep"], teamspace: Teamspace
94
94
  ) -> V1SharedFilesystem:
95
95
  if not shared_filesystem:
@@ -97,14 +97,22 @@ class PipelineApi:
97
97
 
98
98
  from lightning_sdk.pipeline.utils import _get_cloud_account
99
99
 
100
- cluster = self._cluster_api.get_cluster(
101
- cluster_id=_get_cloud_account(steps), project_id=teamspace.id, org_id=teamspace.owner.id
102
- )
100
+ clusters = self._cluster_api.list_clusters(project_id=teamspace.id)
101
+
102
+ selected_cluster = None
103
+ selected_cluster_id = _get_cloud_account(steps)
104
+ for cluster in clusters:
105
+ if cluster.id == selected_cluster_id:
106
+ selected_cluster = cluster
107
+ break
108
+
109
+ if selected_cluster is None:
110
+ raise ValueError(f"Cloud Account {selected_cluster_id} not found")
103
111
 
104
- if cluster.spec.aws_v1:
112
+ if selected_cluster.spec.aws_v1:
105
113
  return V1SharedFilesystem(enabled=True, s3_folder=True)
106
114
 
107
- if cluster.spec.google_cloud_v1:
115
+ if selected_cluster.spec.google_cloud_v1:
108
116
  return V1SharedFilesystem(enabled=True, gcs_folder=True)
109
117
 
110
118
  raise NotImplementedError("This cluster isn't support yet")
@@ -2,7 +2,6 @@ import json
2
2
  import os
3
3
  import tempfile
4
4
  import time
5
- import warnings
6
5
  import zipfile
7
6
  from threading import Event, Thread
8
7
  from typing import Any, Dict, Generator, Mapping, Optional, Tuple, Union
@@ -172,14 +171,6 @@ class StudioApi:
172
171
  self, studio_id: str, teamspace_id: str, machine: Union[Machine, str], interruptible: False
173
172
  ) -> None:
174
173
  """Start an existing Studio."""
175
- if _machine_to_compute_name(machine) == _machine_to_compute_name(Machine.CPU_SMALL):
176
- warnings.warn(
177
- f"{Machine.CPU_SMALL} is not a valid machine for starting a Studio. "
178
- "It is reserved for running jobs only. "
179
- "The Studio will be started with a CPU machine instead."
180
- )
181
- machine = Machine.CPU
182
-
183
174
  self._client.cloud_space_service_start_cloud_space_instance(
184
175
  IdStartBody(
185
176
  compute_config=V1UserRequestedComputeConfig(name=_machine_to_compute_name(machine), spot=interruptible)
@@ -229,14 +220,6 @@ class StudioApi:
229
220
  self, studio_id: str, teamspace_id: str, machine: Union[Machine, str], interruptible: bool
230
221
  ) -> None:
231
222
  """Switches given Studio to a new machine type."""
232
- if _machine_to_compute_name(machine) == _machine_to_compute_name(Machine.CPU_SMALL):
233
- warnings.warn(
234
- f"{Machine.CPU_SMALL} is not a valid machine for switching a Studio. "
235
- "It is reserved for running jobs only. "
236
- "The Studio will be switched to a CPU machine instead."
237
- )
238
- machine = Machine.CPU
239
-
240
223
  compute_name = _machine_to_compute_name(machine)
241
224
  # TODO: UI sends disk size here, maybe we need to also?
242
225
  body = IdCodeconfigBody(compute_config=V1UserRequestedComputeConfig(name=compute_name, spot=interruptible))
@@ -53,6 +53,7 @@ class AssistantIdConversationsBody(object):
53
53
  'parent_conversation_id': 'str',
54
54
  'parent_message_id': 'str',
55
55
  'reasoning_effort': 'str',
56
+ 'sent_at': 'datetime',
56
57
  'store': 'bool',
57
58
  'stream': 'bool',
58
59
  'system_prompt': 'str'
@@ -71,12 +72,13 @@ class AssistantIdConversationsBody(object):
71
72
  'parent_conversation_id': 'parentConversationId',
72
73
  'parent_message_id': 'parentMessageId',
73
74
  'reasoning_effort': 'reasoningEffort',
75
+ 'sent_at': 'sentAt',
74
76
  'store': 'store',
75
77
  'stream': 'stream',
76
78
  'system_prompt': 'systemPrompt'
77
79
  }
78
80
 
79
- def __init__(self, auto_name: 'bool' =None, billing_project_id: 'str' =None, conversation_id: 'str' =None, ephemeral: 'bool' =None, internal_conversation: 'bool' =None, max_tokens: 'str' =None, message: 'V1Message' =None, metadata: 'dict(str, str)' =None, name: 'str' =None, parent_conversation_id: 'str' =None, parent_message_id: 'str' =None, reasoning_effort: 'str' =None, store: 'bool' =None, stream: 'bool' =None, system_prompt: 'str' =None): # noqa: E501
81
+ def __init__(self, auto_name: 'bool' =None, billing_project_id: 'str' =None, conversation_id: 'str' =None, ephemeral: 'bool' =None, internal_conversation: 'bool' =None, max_tokens: 'str' =None, message: 'V1Message' =None, metadata: 'dict(str, str)' =None, name: 'str' =None, parent_conversation_id: 'str' =None, parent_message_id: 'str' =None, reasoning_effort: 'str' =None, sent_at: 'datetime' =None, store: 'bool' =None, stream: 'bool' =None, system_prompt: 'str' =None): # noqa: E501
80
82
  """AssistantIdConversationsBody - a model defined in Swagger""" # noqa: E501
81
83
  self._auto_name = None
82
84
  self._billing_project_id = None
@@ -90,6 +92,7 @@ class AssistantIdConversationsBody(object):
90
92
  self._parent_conversation_id = None
91
93
  self._parent_message_id = None
92
94
  self._reasoning_effort = None
95
+ self._sent_at = None
93
96
  self._store = None
94
97
  self._stream = None
95
98
  self._system_prompt = None
@@ -118,6 +121,8 @@ class AssistantIdConversationsBody(object):
118
121
  self.parent_message_id = parent_message_id
119
122
  if reasoning_effort is not None:
120
123
  self.reasoning_effort = reasoning_effort
124
+ if sent_at is not None:
125
+ self.sent_at = sent_at
121
126
  if store is not None:
122
127
  self.store = store
123
128
  if stream is not None:
@@ -377,6 +382,27 @@ class AssistantIdConversationsBody(object):
377
382
 
378
383
  self._reasoning_effort = reasoning_effort
379
384
 
385
+ @property
386
+ def sent_at(self) -> 'datetime':
387
+ """Gets the sent_at of this AssistantIdConversationsBody. # noqa: E501
388
+
389
+
390
+ :return: The sent_at of this AssistantIdConversationsBody. # noqa: E501
391
+ :rtype: datetime
392
+ """
393
+ return self._sent_at
394
+
395
+ @sent_at.setter
396
+ def sent_at(self, sent_at: 'datetime'):
397
+ """Sets the sent_at of this AssistantIdConversationsBody.
398
+
399
+
400
+ :param sent_at: The sent_at of this AssistantIdConversationsBody. # noqa: E501
401
+ :type: datetime
402
+ """
403
+
404
+ self._sent_at = sent_at
405
+
380
406
  @property
381
407
  def store(self) -> 'bool':
382
408
  """Gets the store of this AssistantIdConversationsBody. # noqa: E501
@@ -46,6 +46,7 @@ class V1ConversationResponseChunk(object):
46
46
  'executable': 'bool',
47
47
  'id': 'str',
48
48
  'object': 'str',
49
+ 'stats': 'dict(str, str)',
49
50
  'throughput': 'float',
50
51
  'usage': 'V1TokenUsage'
51
52
  }
@@ -56,17 +57,19 @@ class V1ConversationResponseChunk(object):
56
57
  'executable': 'executable',
57
58
  'id': 'id',
58
59
  'object': 'object',
60
+ 'stats': 'stats',
59
61
  'throughput': 'throughput',
60
62
  'usage': 'usage'
61
63
  }
62
64
 
63
- def __init__(self, choices: 'list[V1ResponseChoice]' =None, conversation_id: 'str' =None, executable: 'bool' =None, id: 'str' =None, object: 'str' =None, throughput: 'float' =None, usage: 'V1TokenUsage' =None): # noqa: E501
65
+ def __init__(self, choices: 'list[V1ResponseChoice]' =None, conversation_id: 'str' =None, executable: 'bool' =None, id: 'str' =None, object: 'str' =None, stats: 'dict(str, str)' =None, throughput: 'float' =None, usage: 'V1TokenUsage' =None): # noqa: E501
64
66
  """V1ConversationResponseChunk - a model defined in Swagger""" # noqa: E501
65
67
  self._choices = None
66
68
  self._conversation_id = None
67
69
  self._executable = None
68
70
  self._id = None
69
71
  self._object = None
72
+ self._stats = None
70
73
  self._throughput = None
71
74
  self._usage = None
72
75
  self.discriminator = None
@@ -80,6 +83,8 @@ class V1ConversationResponseChunk(object):
80
83
  self.id = id
81
84
  if object is not None:
82
85
  self.object = object
86
+ if stats is not None:
87
+ self.stats = stats
83
88
  if throughput is not None:
84
89
  self.throughput = throughput
85
90
  if usage is not None:
@@ -190,6 +195,27 @@ class V1ConversationResponseChunk(object):
190
195
 
191
196
  self._object = object
192
197
 
198
+ @property
199
+ def stats(self) -> 'dict(str, str)':
200
+ """Gets the stats of this V1ConversationResponseChunk. # noqa: E501
201
+
202
+
203
+ :return: The stats of this V1ConversationResponseChunk. # noqa: E501
204
+ :rtype: dict(str, str)
205
+ """
206
+ return self._stats
207
+
208
+ @stats.setter
209
+ def stats(self, stats: 'dict(str, str)'):
210
+ """Sets the stats of this V1ConversationResponseChunk.
211
+
212
+
213
+ :param stats: The stats of this V1ConversationResponseChunk. # noqa: E501
214
+ :type: dict(str, str)
215
+ """
216
+
217
+ self._stats = stats
218
+
193
219
  @property
194
220
  def throughput(self) -> 'float':
195
221
  """Gets the throughput of this V1ConversationResponseChunk. # noqa: E501
@@ -81,12 +81,12 @@ class V1UserFeatures(object):
81
81
  'lambda_labs_studios': 'bool',
82
82
  'landing_studios': 'bool',
83
83
  'lit_logger': 'bool',
84
- 'litcr_byoc_gcp': 'bool',
85
84
  'machine_selector_v2': 'bool',
86
85
  'marketplace': 'bool',
87
86
  'mmt_fault_tolerance': 'bool',
88
87
  'mmt_strategy_selector': 'bool',
89
88
  'model_api_dashboard': 'bool',
89
+ 'model_api_dashboard_clickhouse': 'bool',
90
90
  'multicloud_folders': 'bool',
91
91
  'multicloud_saas': 'bool',
92
92
  'multiple_studio_versions': 'bool',
@@ -175,12 +175,12 @@ class V1UserFeatures(object):
175
175
  'lambda_labs_studios': 'lambdaLabsStudios',
176
176
  'landing_studios': 'landingStudios',
177
177
  'lit_logger': 'litLogger',
178
- 'litcr_byoc_gcp': 'litcrByocGcp',
179
178
  'machine_selector_v2': 'machineSelectorV2',
180
179
  'marketplace': 'marketplace',
181
180
  'mmt_fault_tolerance': 'mmtFaultTolerance',
182
181
  'mmt_strategy_selector': 'mmtStrategySelector',
183
182
  'model_api_dashboard': 'modelApiDashboard',
183
+ 'model_api_dashboard_clickhouse': 'modelApiDashboardClickhouse',
184
184
  'multicloud_folders': 'multicloudFolders',
185
185
  'multicloud_saas': 'multicloudSaas',
186
186
  'multiple_studio_versions': 'multipleStudioVersions',
@@ -228,7 +228,7 @@ class V1UserFeatures(object):
228
228
  'writable_s3_connections': 'writableS3Connections'
229
229
  }
230
230
 
231
- def __init__(self, academic_tier: 'bool' =None, accurate_billing: '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, 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, concurrent_gpu_limit: '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, fair_share: 'bool' =None, featured_studios_admin: '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_clusters: 'bool' =None, lambda_labs: 'bool' =None, lambda_labs_studios: 'bool' =None, landing_studios: 'bool' =None, lit_logger: 'bool' =None, litcr_byoc_gcp: 'bool' =None, machine_selector_v2: '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, onboarding_v2: 'bool' =None, org_level_member_permissions: 'bool' =None, org_usage_limits: 'bool' =None, paygo_free_storage_limit_check: '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, 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, voltage_park: 'bool' =None, voltage_park_studios: 'bool' =None, vultr: 'bool' =None, weka: 'bool' =None, writable_s3_connections: 'bool' =None): # noqa: E501
231
+ def __init__(self, academic_tier: 'bool' =None, accurate_billing: '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, 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, concurrent_gpu_limit: '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, fair_share: 'bool' =None, featured_studios_admin: '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_clusters: 'bool' =None, lambda_labs: 'bool' =None, lambda_labs_studios: 'bool' =None, landing_studios: 'bool' =None, lit_logger: 'bool' =None, machine_selector_v2: '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, 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, onboarding_v2: 'bool' =None, org_level_member_permissions: 'bool' =None, org_usage_limits: 'bool' =None, paygo_free_storage_limit_check: '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, 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, voltage_park: 'bool' =None, voltage_park_studios: 'bool' =None, vultr: 'bool' =None, weka: 'bool' =None, writable_s3_connections: 'bool' =None): # noqa: E501
232
232
  """V1UserFeatures - a model defined in Swagger""" # noqa: E501
233
233
  self._academic_tier = None
234
234
  self._accurate_billing = None
@@ -270,12 +270,12 @@ class V1UserFeatures(object):
270
270
  self._lambda_labs_studios = None
271
271
  self._landing_studios = None
272
272
  self._lit_logger = None
273
- self._litcr_byoc_gcp = None
274
273
  self._machine_selector_v2 = None
275
274
  self._marketplace = None
276
275
  self._mmt_fault_tolerance = None
277
276
  self._mmt_strategy_selector = None
278
277
  self._model_api_dashboard = None
278
+ self._model_api_dashboard_clickhouse = None
279
279
  self._multicloud_folders = None
280
280
  self._multicloud_saas = None
281
281
  self._multiple_studio_versions = None
@@ -402,8 +402,6 @@ class V1UserFeatures(object):
402
402
  self.landing_studios = landing_studios
403
403
  if lit_logger is not None:
404
404
  self.lit_logger = lit_logger
405
- if litcr_byoc_gcp is not None:
406
- self.litcr_byoc_gcp = litcr_byoc_gcp
407
405
  if machine_selector_v2 is not None:
408
406
  self.machine_selector_v2 = machine_selector_v2
409
407
  if marketplace is not None:
@@ -414,6 +412,8 @@ class V1UserFeatures(object):
414
412
  self.mmt_strategy_selector = mmt_strategy_selector
415
413
  if model_api_dashboard is not None:
416
414
  self.model_api_dashboard = model_api_dashboard
415
+ if model_api_dashboard_clickhouse is not None:
416
+ self.model_api_dashboard_clickhouse = model_api_dashboard_clickhouse
417
417
  if multicloud_folders is not None:
418
418
  self.multicloud_folders = multicloud_folders
419
419
  if multicloud_saas is not None:
@@ -1345,27 +1345,6 @@ class V1UserFeatures(object):
1345
1345
 
1346
1346
  self._lit_logger = lit_logger
1347
1347
 
1348
- @property
1349
- def litcr_byoc_gcp(self) -> 'bool':
1350
- """Gets the litcr_byoc_gcp of this V1UserFeatures. # noqa: E501
1351
-
1352
-
1353
- :return: The litcr_byoc_gcp of this V1UserFeatures. # noqa: E501
1354
- :rtype: bool
1355
- """
1356
- return self._litcr_byoc_gcp
1357
-
1358
- @litcr_byoc_gcp.setter
1359
- def litcr_byoc_gcp(self, litcr_byoc_gcp: 'bool'):
1360
- """Sets the litcr_byoc_gcp of this V1UserFeatures.
1361
-
1362
-
1363
- :param litcr_byoc_gcp: The litcr_byoc_gcp of this V1UserFeatures. # noqa: E501
1364
- :type: bool
1365
- """
1366
-
1367
- self._litcr_byoc_gcp = litcr_byoc_gcp
1368
-
1369
1348
  @property
1370
1349
  def machine_selector_v2(self) -> 'bool':
1371
1350
  """Gets the machine_selector_v2 of this V1UserFeatures. # noqa: E501
@@ -1471,6 +1450,27 @@ class V1UserFeatures(object):
1471
1450
 
1472
1451
  self._model_api_dashboard = model_api_dashboard
1473
1452
 
1453
+ @property
1454
+ def model_api_dashboard_clickhouse(self) -> 'bool':
1455
+ """Gets the model_api_dashboard_clickhouse of this V1UserFeatures. # noqa: E501
1456
+
1457
+
1458
+ :return: The model_api_dashboard_clickhouse of this V1UserFeatures. # noqa: E501
1459
+ :rtype: bool
1460
+ """
1461
+ return self._model_api_dashboard_clickhouse
1462
+
1463
+ @model_api_dashboard_clickhouse.setter
1464
+ def model_api_dashboard_clickhouse(self, model_api_dashboard_clickhouse: 'bool'):
1465
+ """Sets the model_api_dashboard_clickhouse of this V1UserFeatures.
1466
+
1467
+
1468
+ :param model_api_dashboard_clickhouse: The model_api_dashboard_clickhouse of this V1UserFeatures. # noqa: E501
1469
+ :type: bool
1470
+ """
1471
+
1472
+ self._model_api_dashboard_clickhouse = model_api_dashboard_clickhouse
1473
+
1474
1474
  @property
1475
1475
  def multicloud_folders(self) -> 'bool':
1476
1476
  """Gets the multicloud_folders of this V1UserFeatures. # noqa: E501
lightning_sdk/machine.py CHANGED
@@ -5,7 +5,6 @@ from typing import Any, ClassVar, Optional, Tuple
5
5
  @dataclass(frozen=True)
6
6
  class Machine:
7
7
  # Default Machines
8
- CPU_SMALL: ClassVar["Machine"]
9
8
  CPU: ClassVar["Machine"]
10
9
  DATA_PREP: ClassVar["Machine"]
11
10
  DATA_PREP_MAX: ClassVar["Machine"]
@@ -45,8 +44,7 @@ class Machine:
45
44
  def is_cpu(self) -> bool:
46
45
  """Whether the machine is a CPU."""
47
46
  return (
48
- self == Machine.CPU_SMALL
49
- or self == Machine.CPU
47
+ self == Machine.CPU
50
48
  or self == Machine.DATA_PREP
51
49
  or self == Machine.DATA_PREP_MAX
52
50
  or self == Machine.DATA_PREP_ULTRA
@@ -67,7 +65,6 @@ class Machine:
67
65
  return cls(machine, machine)
68
66
 
69
67
 
70
- Machine.CPU_SMALL = Machine(name="CPU_SMALL", instance_type="m3.medium")
71
68
  Machine.CPU = Machine(name="CPU", instance_type="cpu-4")
72
69
  Machine.DATA_PREP = Machine(name="DATA_PREP", instance_type="data-large")
73
70
  Machine.DATA_PREP_MAX = Machine(name="DATA_PREP_MAX", instance_type="data-max")
@@ -1,9 +1,7 @@
1
1
  import os
2
2
  from typing import TYPE_CHECKING, List, Optional, Union
3
3
 
4
- from lightning_sdk.api import UserApi
5
4
  from lightning_sdk.api.pipeline_api import PipelineApi
6
- from lightning_sdk.lightning_cloud.login import Auth
7
5
  from lightning_sdk.organization import Organization
8
6
  from lightning_sdk.pipeline.printer import PipelinePrinter
9
7
  from lightning_sdk.pipeline.steps import DeploymentStep, JobStep, MMTStep, _get_studio
@@ -12,7 +10,7 @@ from lightning_sdk.services.utilities import _get_cluster
12
10
  from lightning_sdk.studio import Studio
13
11
  from lightning_sdk.teamspace import Teamspace
14
12
  from lightning_sdk.user import User
15
- from lightning_sdk.utils.resolve import _resolve_org, _resolve_teamspace, _resolve_user
13
+ from lightning_sdk.utils.resolve import _resolve_teamspace
16
14
 
17
15
  if TYPE_CHECKING:
18
16
  from lightning_sdk.pipeline.schedule import Schedule
@@ -40,19 +38,7 @@ class Pipeline:
40
38
  shared_filesystem: Whether the pipeline should use a shared filesystem across all nodes.
41
39
  Note: This forces the pipeline steps to be in the cloud_account and same region
42
40
  """
43
- self._auth = Auth()
44
- self._user = None
45
-
46
- try:
47
- self._auth.authenticate()
48
- if user is None:
49
- self._user = User(name=UserApi()._get_user_by_id(self._auth.user_id).username)
50
- except ConnectionError as e:
51
- raise e
52
-
53
41
  self._name = name
54
- self._org = _resolve_org(org)
55
- self._user = _resolve_user(self._user or user)
56
42
 
57
43
  self._teamspace = _resolve_teamspace(
58
44
  teamspace=teamspace,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lightning_sdk
3
- Version: 0.2.24rc1
3
+ Version: 2025.7.9
4
4
  Summary: SDK to develop using Lightning AI Studios
5
5
  Author-email: Lightning-AI <justus@lightning.ai>
6
6
  License: MIT License
@@ -1,12 +1,12 @@
1
1
  docs/source/conf.py,sha256=r8yX20eC-4mHhMTd0SbQb5TlSWHhO6wnJ0VJ_FBFpag,13249
2
- lightning_sdk/__init__.py,sha256=eOQXMuFcIp5MYfSKoBHS3BG9KbBoanr7fy0bbHkd0Qo,1109
2
+ lightning_sdk/__init__.py,sha256=9BSQ7hp-GqfVziz3SrmjcYVugWAR5Po4PmfDEhFBVQI,1109
3
3
  lightning_sdk/agents.py,sha256=ly6Ma1j0ZgGPFyvPvMN28JWiB9dATIstFa5XM8pMi6I,1577
4
4
  lightning_sdk/ai_hub.py,sha256=iI1vNhgcz_Ff1c3rN1ogN7dK-r-HXRj6NMtS2cA14UA,6925
5
5
  lightning_sdk/base_studio.py,sha256=_Pwwl37R9GRd7t-f2kO5aQXiLNrP4sUtUNht2ZkP8LE,3678
6
6
  lightning_sdk/constants.py,sha256=ztl1PTUBULnqTf3DyKUSJaV_O20hNtUYT6XvAYIrmIk,749
7
7
  lightning_sdk/helpers.py,sha256=KWMWnORHItIIA3PGn71YPs-7RjzGi8IXa2kQ5Qo4U8M,2459
8
8
  lightning_sdk/lit_container.py,sha256=8ys49TXI9MO89jLTA7MwDrKrssTRARAIF9OVmolDLq0,5273
9
- lightning_sdk/machine.py,sha256=EMr-ulyYEYhIkKFnGBOofnFf4asndTSeoOQxlyd3xW4,3632
9
+ lightning_sdk/machine.py,sha256=WNzUUQzThSY34tnHPUXZ_FeG4fDamPAz6LnC4yswqFI,3483
10
10
  lightning_sdk/models.py,sha256=tPFiiDQiDsFhfStcVPH5_PcujbBEfKS2IB5FS9NfwZk,7838
11
11
  lightning_sdk/organization.py,sha256=WCfzdgjtvY1_A07DnxOpp74V2JR2gQwtXbIEcFDnoVU,1232
12
12
  lightning_sdk/owner.py,sha256=t5svD2it4C9pbSpVuG9WJL46CYi37JXNziwnXxhiU5U,1361
@@ -21,7 +21,7 @@ lightning_sdk/api/__init__.py,sha256=Qn2VVRvir_gO7w4yxGLkZY-R3T7kdiTPKgQ57BhIA9k
21
21
  lightning_sdk/api/agents_api.py,sha256=G47TbFo9kYqnBMqdw2RW-lfS1VAUBSXDmzs6fpIEMUs,4059
22
22
  lightning_sdk/api/ai_hub_api.py,sha256=azqDZ-PzasVAcoQHno7k7OO_xFOHQ4NDozxF8jEh83Y,7864
23
23
  lightning_sdk/api/base_studio_api.py,sha256=3R8tucZX2e9yKHBcY2rWFRP4dxqLrC6H75vdBDkH0ck,3617
24
- lightning_sdk/api/cluster_api.py,sha256=mfHGKHy-RNpI7nKlhw9Zc7Jv6f4DCFq-qRIwOR3VptY,3972
24
+ lightning_sdk/api/cluster_api.py,sha256=kAZeJbcNYG9rsYE7if5k1HlcND1Z_6cKivZ7lY4S20U,4392
25
25
  lightning_sdk/api/deployment_api.py,sha256=KvBwGaG896q7WS1OPMOIjFUh05W2g7S1djS2XJMVieQ,24215
26
26
  lightning_sdk/api/job_api.py,sha256=_mMAI_BG_48i-BLwCP_U72zgmM5zYa2KUZ7u66HWkIc,13568
27
27
  lightning_sdk/api/license_api.py,sha256=XV3RhefyPQDYjwY9AaBZe4rByZTEAnsvLDxcdm9q0Wo,2438
@@ -29,8 +29,8 @@ lightning_sdk/api/lit_container_api.py,sha256=jCJVwd-3MNjejL9FyvH89pzt-SeG3G8qCJ
29
29
  lightning_sdk/api/llm_api.py,sha256=G8WKTslOIS8cTYFoOlQNRgtIvzEpqIr2Ez0rxcMAh4k,9100
30
30
  lightning_sdk/api/mmt_api.py,sha256=-v7ATab-ThAM-HRClS92Ehxuu9MlBfdKWWFCGvVUHiM,8962
31
31
  lightning_sdk/api/org_api.py,sha256=Ze3z_ATVrukobujV5YdC42DKj45Vuwl7X52q_Vr-o3U,803
32
- lightning_sdk/api/pipeline_api.py,sha256=OUt_YSKFd7O5mQJKhWJbzvk2TDXicodC0PVGTjn-kkU,4180
33
- lightning_sdk/api/studio_api.py,sha256=K_1tMM__wR0l4CFAiS6UWrFwNoMnMz8F_MDfmbV7hYI,31488
32
+ lightning_sdk/api/pipeline_api.py,sha256=oS0WIBB748SLD7bqkEQ8rnkixrsAML_M01OUunmLFSQ,4470
33
+ lightning_sdk/api/studio_api.py,sha256=J-kp6IoXlQaVz1S4BtaK93VrLAbMOolQYDGJyrkPDRo,30702
34
34
  lightning_sdk/api/teamspace_api.py,sha256=CsaaxmaLmTRIRwu37wtQ3quGYql62HJT3BZJ3Q-1d9c,16854
35
35
  lightning_sdk/api/user_api.py,sha256=sL7RIjjtmZmvCZWx7BBZslhj1BeNh4Idn-RVcdmf7M0,2598
36
36
  lightning_sdk/api/utils.py,sha256=K0Uc6D1KxxjFElqjsuCXg85SYreQi3P7jJ1VzP0MpEQ,23966
@@ -138,7 +138,7 @@ lightning_sdk/lightning_cloud/openapi/models/appinstances_id_body.py,sha256=DfwY
138
138
  lightning_sdk/lightning_cloud/openapi/models/approveautojoindomain_domain_body.py,sha256=gC2puM75rrgB36ekVmgF9rnzWE4mAp6tpaGUrlhARRU,3771
139
139
  lightning_sdk/lightning_cloud/openapi/models/apps_id_body.py,sha256=tjIpEmU6Y8nhLDT0c3JAdywxEjI-NzvgLdEhf2UXWf4,17912
140
140
  lightning_sdk/lightning_cloud/openapi/models/apps_id_body1.py,sha256=Ja_1s0PjD1hIjAvyqyp8U4WXKv2GoUGoQ-HHm8hvRbc,8874
141
- lightning_sdk/lightning_cloud/openapi/models/assistant_id_conversations_body.py,sha256=RmDAeuHhyqiMvZoZNP3w64p6n1HDHrI2PWA0rfgk8gg,15551
141
+ lightning_sdk/lightning_cloud/openapi/models/assistant_id_conversations_body.py,sha256=XRAgtHlFxqIhML1z_4kGNvlrOCQQph3kjm9JWIr-ijQ,16305
142
142
  lightning_sdk/lightning_cloud/openapi/models/billing_checkout_body.py,sha256=bMABc4XkRzK-t2RzWg1bd2YZSwZkqYZoUex9iWO1lPI,5379
143
143
  lightning_sdk/lightning_cloud/openapi/models/billing_transfer_body.py,sha256=MaovoJiJDzOXNhCskZAN5UNwnFEFP7ONF83DPRgfhgk,4510
144
144
  lightning_sdk/lightning_cloud/openapi/models/billing_transfer_body1.py,sha256=6zrWBAHmmKHJgqJtxahcM1mDrO3Z55WxaGK0RY10oOw,5275
@@ -411,7 +411,7 @@ lightning_sdk/lightning_cloud/openapi/models/v1_compute_config.py,sha256=YGkx66e
411
411
  lightning_sdk/lightning_cloud/openapi/models/v1_contact_assistant_owner_reason.py,sha256=9J2PuNGXlDXMcsmINbocUYGXVKhRlvqDdRwgtAH_qPU,3121
412
412
  lightning_sdk/lightning_cloud/openapi/models/v1_contact_assistant_owner_response.py,sha256=_FXW0hslMncLSPPxDmWEbhePRz-4tFc98KpqMf0M_6s,3076
413
413
  lightning_sdk/lightning_cloud/openapi/models/v1_conversation.py,sha256=xINDLIVGuMEXSog0ryP3rQW1y_9PmEIMsL7P7LHzb_M,9220
414
- lightning_sdk/lightning_cloud/openapi/models/v1_conversation_response_chunk.py,sha256=kMBvhXdYj4yE_ccxKfcSeL1zvSfyl5b8u4rvzBwmRAo,8402
414
+ lightning_sdk/lightning_cloud/openapi/models/v1_conversation_response_chunk.py,sha256=7JovH85aN8mwC_gUVdCBDyqUCwwNlsEAqkBGKMTmwMo,9149
415
415
  lightning_sdk/lightning_cloud/openapi/models/v1_count_metrics_streams_response.py,sha256=ovqawh81CI7PvAqcElhGYw0-NVwSzwbm4s2PFErdxHA,3751
416
416
  lightning_sdk/lightning_cloud/openapi/models/v1_cpu_system_metrics.py,sha256=Mgybx_EGelKpTVzfW9WXp5HiiVMLPoes8vdVq8We1TU,10120
417
417
  lightning_sdk/lightning_cloud/openapi/models/v1_create_agent_multipart_upload_response.py,sha256=Ov9pBANdLtAbfz0ed_N-UGBeUwZozYKuqbst0F8u2Cw,3900
@@ -1027,7 +1027,7 @@ lightning_sdk/lightning_cloud/openapi/models/v1_upstream_open_ai.py,sha256=jt1qQ
1027
1027
  lightning_sdk/lightning_cloud/openapi/models/v1_usage.py,sha256=ozMzoGD9mfZGYy4J5j50Dps19Y6o8cn-aYW_oRMZMy8,16865
1028
1028
  lightning_sdk/lightning_cloud/openapi/models/v1_usage_details.py,sha256=U7qC698Xj5tb3D93ZskG6sDf3lTXE13UTlGeDTvtRU4,14062
1029
1029
  lightning_sdk/lightning_cloud/openapi/models/v1_usage_report.py,sha256=k9pDp9UIaOEEWz6bTNWF_KMfcNCOp-F67N-IZ9MO2Rs,8304
1030
- lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py,sha256=aTKyd0pXaiXsKEvaigU6tPNhqGQyzkJKZIDI8gklIs4,82298
1030
+ lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py,sha256=5qLtkUfv5Vyf9xZaOmcDJWMnDKo7Jkjl5q2sNQq6HYU,82617
1031
1031
  lightning_sdk/lightning_cloud/openapi/models/v1_user_requested_compute_config.py,sha256=0fnZpdhxNRXGNyILHtfm3rVztfHpSF4kXGc5kTt4zls,13960
1032
1032
  lightning_sdk/lightning_cloud/openapi/models/v1_user_requested_flow_compute_config.py,sha256=3WpZ-lf7xPwuYyQDMdP7Uc6-dh3vf5TaaUlcMfesfMk,5208
1033
1033
  lightning_sdk/lightning_cloud/openapi/models/v1_user_slurm_job_action_response.py,sha256=BdNzXH8Vsf5PHjl9Rd-TVkpAgx1YC9rf8LD0js-ba20,3058
@@ -1078,7 +1078,7 @@ lightning_sdk/mmt/mmt.py,sha256=swdGP1DOM42a_QmmY1vg3--6ZBDiC4zToAzU9Eycv4U,1344
1078
1078
  lightning_sdk/mmt/v1.py,sha256=TxLtL0ssDoP8eyleDaFyYr4evkOKbLJcckLVIfalOno,8429
1079
1079
  lightning_sdk/mmt/v2.py,sha256=Em1XBoqViqUMKm-sshzdMcSH5UTtZZwbJcsgqY6-mw0,9625
1080
1080
  lightning_sdk/pipeline/__init__.py,sha256=Sja_0NJ8vgh-2ThSVP3WDI9a9qghrWd21LkaQp4Zsp8,378
1081
- lightning_sdk/pipeline/pipeline.py,sha256=xctjiZj4jIXr9klkOvnzYWYjcmLgN9nwKQKqPVOOiVM,5926
1081
+ lightning_sdk/pipeline/pipeline.py,sha256=yF8ebZlhOa0pWxLUpmKqW5oy4VEMT7NFSXpUhdpWbak,5425
1082
1082
  lightning_sdk/pipeline/printer.py,sha256=uNi3JD3RjQMVflJxik9o4CDfifROP70aV_vt6mms5zg,4671
1083
1083
  lightning_sdk/pipeline/schedule.py,sha256=r8L4M_NH5zoXoCf13jpn2icNIJ3hUgUFZrrq-ArnTWA,147
1084
1084
  lightning_sdk/pipeline/steps.py,sha256=5IM7BNiH42Rxq0sJNuwIN64qs-NCa81_XeP8pg_dCL8,12294
@@ -1092,9 +1092,9 @@ lightning_sdk/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSu
1092
1092
  lightning_sdk/utils/dynamic.py,sha256=glUTO1JC9APtQ6Gr9SO02a3zr56-sPAXM5C3NrTpgyQ,1959
1093
1093
  lightning_sdk/utils/enum.py,sha256=h2JRzqoBcSlUdanFHmkj_j5DleBHAu1esQYUsdNI-hU,4106
1094
1094
  lightning_sdk/utils/resolve.py,sha256=6qlBUkOmcFTjhQx_CAGfnvWBbMYp6XrCV_sX_IqplLE,6748
1095
- lightning_sdk-0.2.24rc1.dist-info/LICENSE,sha256=uFIuZwj5z-4TeF2UuacPZ1o17HkvKObT8fY50qN84sg,1064
1096
- lightning_sdk-0.2.24rc1.dist-info/METADATA,sha256=YXSCn2tDME1-uvxH6B5o4i8Ay2jPNxTRjQPz1GhcU1s,3995
1097
- lightning_sdk-0.2.24rc1.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
1098
- lightning_sdk-0.2.24rc1.dist-info/entry_points.txt,sha256=msB9PJWIJ784dX-OP8by51d4IbKYH3Fj1vCuA9oXjHY,68
1099
- lightning_sdk-0.2.24rc1.dist-info/top_level.txt,sha256=ps8doKILFXmN7F1mHncShmnQoTxKBRPIcchC8TpoBw4,19
1100
- lightning_sdk-0.2.24rc1.dist-info/RECORD,,
1095
+ lightning_sdk-2025.7.9.dist-info/LICENSE,sha256=uFIuZwj5z-4TeF2UuacPZ1o17HkvKObT8fY50qN84sg,1064
1096
+ lightning_sdk-2025.7.9.dist-info/METADATA,sha256=RNn6JYhfsIfEL1Cq8yizfZ5drW82S9vN8Eai0hytyvI,3994
1097
+ lightning_sdk-2025.7.9.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
1098
+ lightning_sdk-2025.7.9.dist-info/entry_points.txt,sha256=msB9PJWIJ784dX-OP8by51d4IbKYH3Fj1vCuA9oXjHY,68
1099
+ lightning_sdk-2025.7.9.dist-info/top_level.txt,sha256=ps8doKILFXmN7F1mHncShmnQoTxKBRPIcchC8TpoBw4,19
1100
+ lightning_sdk-2025.7.9.dist-info/RECORD,,