lightning-sdk 0.1.51__py3-none-any.whl → 0.1.53__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- lightning_sdk/__init__.py +1 -1
- lightning_sdk/ai_hub.py +16 -27
- lightning_sdk/api/ai_hub_api.py +7 -1
- lightning_sdk/cli/run.py +25 -20
- lightning_sdk/job/base.py +16 -0
- lightning_sdk/lightning_cloud/openapi/__init__.py +14 -0
- lightning_sdk/lightning_cloud/openapi/api/assistants_service_api.py +105 -0
- lightning_sdk/lightning_cloud/openapi/api/cluster_service_api.py +417 -1
- lightning_sdk/lightning_cloud/openapi/api/file_system_service_api.py +105 -0
- lightning_sdk/lightning_cloud/openapi/api/storage_service_api.py +101 -0
- lightning_sdk/lightning_cloud/openapi/api/user_service_api.py +5 -1
- lightning_sdk/lightning_cloud/openapi/models/__init__.py +14 -0
- lightning_sdk/lightning_cloud/openapi/models/cluster_id_usagerestrictions_body.py +175 -0
- lightning_sdk/lightning_cloud/openapi/models/id_contactowner_body.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/metricsstream_create_body.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/usagerestrictions_id_body.py +175 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_assistant_model_status.py +4 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_cloud_provider.py +104 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_artifact_event.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_artifact_event_type.py +103 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_cluster_accelerator.py +81 -3
- lightning_sdk/lightning_cloud/openapi/models/v1_cluster_tagging_options.py +29 -3
- lightning_sdk/lightning_cloud/openapi/models/v1_cluster_usage_restriction.py +227 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_contact_assistant_owner_reason.py +102 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_contact_assistant_owner_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_delete_cluster_usage_restriction_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_deployment_api.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_filesystem_mmt.py +175 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_cluster_usage_restrictions_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_filesystem_mm_ts_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_metrics_stream.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_model.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_post_cloud_space_artifact_events_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_resource_visibility.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +53 -1
- lightning_sdk/lightning_cloud/utils/data_connection.py +75 -7
- lightning_sdk/mmt/mmt.py +1 -1
- lightning_sdk/studio.py +68 -1
- {lightning_sdk-0.1.51.dist-info → lightning_sdk-0.1.53.dist-info}/METADATA +1 -1
- {lightning_sdk-0.1.51.dist-info → lightning_sdk-0.1.53.dist-info}/RECORD +44 -30
- {lightning_sdk-0.1.51.dist-info → lightning_sdk-0.1.53.dist-info}/LICENSE +0 -0
- {lightning_sdk-0.1.51.dist-info → lightning_sdk-0.1.53.dist-info}/WHEEL +0 -0
- {lightning_sdk-0.1.51.dist-info → lightning_sdk-0.1.53.dist-info}/entry_points.txt +0 -0
- {lightning_sdk-0.1.51.dist-info → lightning_sdk-0.1.53.dist-info}/top_level.txt +0 -0
lightning_sdk/__init__.py
CHANGED
lightning_sdk/ai_hub.py
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union
|
|
2
2
|
from urllib.parse import quote
|
|
3
3
|
|
|
4
|
-
from lightning_sdk.api import AIHubApi
|
|
5
|
-
from lightning_sdk.
|
|
6
|
-
from lightning_sdk.lightning_cloud.env import LIGHTNING_CLOUD_URL
|
|
4
|
+
from lightning_sdk.api import AIHubApi
|
|
5
|
+
from lightning_sdk.api.utils import _get_cloud_url
|
|
7
6
|
from lightning_sdk.user import User
|
|
8
|
-
from lightning_sdk.utils.resolve import
|
|
7
|
+
from lightning_sdk.utils.resolve import _resolve_teamspace
|
|
9
8
|
|
|
10
9
|
if TYPE_CHECKING:
|
|
11
10
|
from lightning_sdk import Organization, Teamspace
|
|
@@ -99,26 +98,6 @@ class AIHub:
|
|
|
99
98
|
results.append(result)
|
|
100
99
|
return results
|
|
101
100
|
|
|
102
|
-
def _authenticate(
|
|
103
|
-
self,
|
|
104
|
-
teamspace: Optional[Union[str, "Teamspace"]] = None,
|
|
105
|
-
org: Optional[Union[str, "Organization"]] = None,
|
|
106
|
-
user: Optional[Union[str, "User"]] = None,
|
|
107
|
-
) -> "Teamspace":
|
|
108
|
-
if self._auth is None:
|
|
109
|
-
self._auth = login.Auth()
|
|
110
|
-
try:
|
|
111
|
-
self._auth.authenticate()
|
|
112
|
-
user = User(name=UserApi()._get_user_by_id(self._auth.user_id).username)
|
|
113
|
-
except ConnectionError as e:
|
|
114
|
-
raise e
|
|
115
|
-
|
|
116
|
-
org = _resolve_org(org)
|
|
117
|
-
teamspace = _resolve_teamspace(teamspace=teamspace, org=org, user=user if org is None else None)
|
|
118
|
-
if teamspace is None:
|
|
119
|
-
raise ValueError("You need to pass a teamspace or an org for your deployment.")
|
|
120
|
-
return teamspace
|
|
121
|
-
|
|
122
101
|
def run(
|
|
123
102
|
self,
|
|
124
103
|
api_id: str,
|
|
@@ -127,6 +106,7 @@ class AIHub:
|
|
|
127
106
|
cloud_account: Optional[str] = None,
|
|
128
107
|
teamspace: Optional[Union[str, "Teamspace"]] = None,
|
|
129
108
|
org: Optional[Union[str, "Organization"]] = None,
|
|
109
|
+
user: Optional[Union[str, "User"]] = None,
|
|
130
110
|
) -> Dict[str, Union[str, bool]]:
|
|
131
111
|
"""Deploy an API from the AI Hub.
|
|
132
112
|
|
|
@@ -146,7 +126,8 @@ class AIHub:
|
|
|
146
126
|
cloud_account: The cloud account where you want to run the template, such as "lightning-public-prod".
|
|
147
127
|
Defaults to None.
|
|
148
128
|
teamspace: The team or group for deployment. Defaults to None.
|
|
149
|
-
org: The organization for deployment. Defaults to None.
|
|
129
|
+
org: The organization for deployment. Don't pass user with this. Defaults to None.
|
|
130
|
+
user: The user for deployment. Don't pass org with this. Defaults to None.
|
|
150
131
|
|
|
151
132
|
Returns:
|
|
152
133
|
A dictionary containing the name of the deployed API,
|
|
@@ -156,7 +137,13 @@ class AIHub:
|
|
|
156
137
|
ValueError: If a teamspace or organization is not provided.
|
|
157
138
|
ConnectionError: If there is an issue with logging in.
|
|
158
139
|
"""
|
|
159
|
-
|
|
140
|
+
if user is not None and org is not None:
|
|
141
|
+
raise ValueError("User and org are mutually exclusive. Please only specify the one owns the teamspace.")
|
|
142
|
+
|
|
143
|
+
teamspace = _resolve_teamspace(teamspace=teamspace, org=org, user=user)
|
|
144
|
+
if teamspace is None:
|
|
145
|
+
raise ValueError("You need to pass a teamspace or an org for your deployment.")
|
|
146
|
+
|
|
160
147
|
teamspace_id = teamspace.id
|
|
161
148
|
|
|
162
149
|
api_arguments = api_arguments or {}
|
|
@@ -167,13 +154,15 @@ class AIHub:
|
|
|
167
154
|
name=name,
|
|
168
155
|
api_arguments=api_arguments,
|
|
169
156
|
)
|
|
157
|
+
|
|
170
158
|
url = (
|
|
171
159
|
quote(
|
|
172
|
-
f"{
|
|
160
|
+
f"{_get_cloud_url}/{teamspace.owner.name}/{teamspace.name}/jobs/{deployment.name}",
|
|
173
161
|
safe=":/()",
|
|
174
162
|
)
|
|
175
163
|
+ "?app_id=deployment"
|
|
176
164
|
)
|
|
165
|
+
|
|
177
166
|
print("Deployment available at:", url)
|
|
178
167
|
|
|
179
168
|
return {
|
lightning_sdk/api/ai_hub_api.py
CHANGED
|
@@ -116,6 +116,12 @@ class AIHubApi:
|
|
|
116
116
|
name = name or template.name
|
|
117
117
|
template.spec_v2.endpoint.id = None
|
|
118
118
|
|
|
119
|
+
# These are needed to ensure templates with a max replicas of 0 will start on creation
|
|
120
|
+
if template.spec_v2.autoscaling.max_replicas == "0":
|
|
121
|
+
template.spec_v2.autoscaling.max_replicas = "1"
|
|
122
|
+
if not template.spec_v2.autoscaling.enabled:
|
|
123
|
+
template.spec_v2.autoscaling.enabled = True
|
|
124
|
+
|
|
119
125
|
AIHubApi._set_parameters(template.spec_v2.job, template.parameter_spec.parameters, api_arguments)
|
|
120
126
|
return self._client.jobs_service_create_deployment(
|
|
121
127
|
project_id=project_id,
|
|
@@ -124,7 +130,7 @@ class AIHubApi:
|
|
|
124
130
|
cluster_id=cloud_account,
|
|
125
131
|
endpoint=template.spec_v2.endpoint,
|
|
126
132
|
name=name,
|
|
127
|
-
replicas=
|
|
133
|
+
replicas=1,
|
|
128
134
|
spec=template.spec_v2.job,
|
|
129
135
|
),
|
|
130
136
|
)
|
lightning_sdk/cli/run.py
CHANGED
|
@@ -166,16 +166,7 @@ class _Run:
|
|
|
166
166
|
cloud_account = resolved_teamspace.default_cloud_account
|
|
167
167
|
machine_enum = Machine(machine.upper())
|
|
168
168
|
|
|
169
|
-
path_mappings_dict =
|
|
170
|
-
for mapping in path_mappings.split(","):
|
|
171
|
-
splits = str(mapping).split(":", 1)
|
|
172
|
-
if len(splits) != 2:
|
|
173
|
-
raise RuntimeError(
|
|
174
|
-
"Mapping needs to be of form <CONTAINER_PATH>:<CONNECTION_NAME>[:<PATH_WITHIN_CONNECTION>], "
|
|
175
|
-
f"but got {mapping}"
|
|
176
|
-
)
|
|
177
|
-
|
|
178
|
-
path_mappings_dict[splits[0]] = splits[1]
|
|
169
|
+
path_mappings_dict = self._resolve_path_mapping(path_mappings=path_mappings)
|
|
179
170
|
|
|
180
171
|
Job.run(
|
|
181
172
|
name=name,
|
|
@@ -242,16 +233,7 @@ class _Run:
|
|
|
242
233
|
if image is None:
|
|
243
234
|
raise RuntimeError("Image needs to be specified to run a multi-machine job")
|
|
244
235
|
|
|
245
|
-
path_mappings_dict =
|
|
246
|
-
for mapping in path_mappings.split(","):
|
|
247
|
-
splits = str(mapping).split(":", 1)
|
|
248
|
-
if len(splits) != 2:
|
|
249
|
-
raise RuntimeError(
|
|
250
|
-
"Mapping needs to be of form <CONTAINER_PATH>:<CONNECTION_NAME>[:<PATH_WITHIN_CONNECTION>], "
|
|
251
|
-
f"but got {mapping}"
|
|
252
|
-
)
|
|
253
|
-
|
|
254
|
-
path_mappings_dict[splits[0]] = splits[1]
|
|
236
|
+
path_mappings_dict = self._resolve_path_mapping(path_mappings=path_mappings)
|
|
255
237
|
|
|
256
238
|
MMT.run(
|
|
257
239
|
name=name,
|
|
@@ -273,3 +255,26 @@ class _Run:
|
|
|
273
255
|
artifacts_local=artifacts_local,
|
|
274
256
|
artifacts_remote=artifacts_remote,
|
|
275
257
|
)
|
|
258
|
+
|
|
259
|
+
@staticmethod
|
|
260
|
+
def _resolve_path_mapping(path_mappings: str) -> Dict[str, str]:
|
|
261
|
+
path_mappings = path_mappings.strip()
|
|
262
|
+
|
|
263
|
+
if not path_mappings:
|
|
264
|
+
return {}
|
|
265
|
+
|
|
266
|
+
path_mappings_dict = {}
|
|
267
|
+
for mapping in path_mappings.split(","):
|
|
268
|
+
if not mapping.strip():
|
|
269
|
+
continue
|
|
270
|
+
|
|
271
|
+
splits = str(mapping).split(":", 1)
|
|
272
|
+
if len(splits) != 2:
|
|
273
|
+
raise RuntimeError(
|
|
274
|
+
"Mapping needs to be of form <CONTAINER_PATH>:<CONNECTION_NAME>[:<PATH_WITHIN_CONNECTION>], "
|
|
275
|
+
f"but got {mapping}"
|
|
276
|
+
)
|
|
277
|
+
|
|
278
|
+
path_mappings_dict[splits[0].strip()] = splits[1].strip()
|
|
279
|
+
|
|
280
|
+
return path_mappings_dict
|
lightning_sdk/job/base.py
CHANGED
|
@@ -275,6 +275,22 @@ class _BaseJob(ABC):
|
|
|
275
275
|
Caution: This also deletes all artifacts and snapshots associated with the job.
|
|
276
276
|
"""
|
|
277
277
|
|
|
278
|
+
def wait(self, interval: float = 5.0) -> None:
|
|
279
|
+
"""Waits for the job to be either completed, manually stopped or failed.
|
|
280
|
+
|
|
281
|
+
Args:
|
|
282
|
+
interval: the number of seconds to spend in-between status checks.
|
|
283
|
+
"""
|
|
284
|
+
import time
|
|
285
|
+
|
|
286
|
+
from lightning_sdk.status import Status
|
|
287
|
+
|
|
288
|
+
while True:
|
|
289
|
+
if self.status in (Status.Completed, Status.Stopped, Status.Failed):
|
|
290
|
+
break
|
|
291
|
+
|
|
292
|
+
time.sleep(interval)
|
|
293
|
+
|
|
278
294
|
@property
|
|
279
295
|
@abstractmethod
|
|
280
296
|
def status(self) -> "Status":
|
|
@@ -80,6 +80,7 @@ from lightning_sdk.lightning_cloud.openapi.models.cloudspaces_id_body import Clo
|
|
|
80
80
|
from lightning_sdk.lightning_cloud.openapi.models.cluster_id_capacityblock_body import ClusterIdCapacityblockBody
|
|
81
81
|
from lightning_sdk.lightning_cloud.openapi.models.cluster_id_capacityreservations_body import ClusterIdCapacityreservationsBody
|
|
82
82
|
from lightning_sdk.lightning_cloud.openapi.models.cluster_id_proxies_body import ClusterIdProxiesBody
|
|
83
|
+
from lightning_sdk.lightning_cloud.openapi.models.cluster_id_usagerestrictions_body import ClusterIdUsagerestrictionsBody
|
|
83
84
|
from lightning_sdk.lightning_cloud.openapi.models.clusters_id_body import ClustersIdBody
|
|
84
85
|
from lightning_sdk.lightning_cloud.openapi.models.clusters_id_body1 import ClustersIdBody1
|
|
85
86
|
from lightning_sdk.lightning_cloud.openapi.models.command_argument_command_argument_type import CommandArgumentCommandArgumentType
|
|
@@ -105,6 +106,7 @@ from lightning_sdk.lightning_cloud.openapi.models.id_artifacts_body import IdArt
|
|
|
105
106
|
from lightning_sdk.lightning_cloud.openapi.models.id_codeconfig_body import IdCodeconfigBody
|
|
106
107
|
from lightning_sdk.lightning_cloud.openapi.models.id_collaborate_body import IdCollaborateBody
|
|
107
108
|
from lightning_sdk.lightning_cloud.openapi.models.id_complete_body import IdCompleteBody
|
|
109
|
+
from lightning_sdk.lightning_cloud.openapi.models.id_contactowner_body import IdContactownerBody
|
|
108
110
|
from lightning_sdk.lightning_cloud.openapi.models.id_engage_body import IdEngageBody
|
|
109
111
|
from lightning_sdk.lightning_cloud.openapi.models.id_engage_body1 import IdEngageBody1
|
|
110
112
|
from lightning_sdk.lightning_cloud.openapi.models.id_execute_body import IdExecuteBody
|
|
@@ -191,6 +193,7 @@ from lightning_sdk.lightning_cloud.openapi.models.update import Update
|
|
|
191
193
|
from lightning_sdk.lightning_cloud.openapi.models.upload_id_complete_body import UploadIdCompleteBody
|
|
192
194
|
from lightning_sdk.lightning_cloud.openapi.models.upload_id_parts_body import UploadIdPartsBody
|
|
193
195
|
from lightning_sdk.lightning_cloud.openapi.models.uploads_upload_id_body import UploadsUploadIdBody
|
|
196
|
+
from lightning_sdk.lightning_cloud.openapi.models.usagerestrictions_id_body import UsagerestrictionsIdBody
|
|
194
197
|
from lightning_sdk.lightning_cloud.openapi.models.user_id_affiliatelinks_body import UserIdAffiliatelinksBody
|
|
195
198
|
from lightning_sdk.lightning_cloud.openapi.models.user_id_membershiprolebindings_body import UserIdMembershiprolebindingsBody
|
|
196
199
|
from lightning_sdk.lightning_cloud.openapi.models.user_id_membershiprolebindings_body1 import UserIdMembershiprolebindingsBody1
|
|
@@ -235,11 +238,14 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_capacity_block_offering imp
|
|
|
235
238
|
from lightning_sdk.lightning_cloud.openapi.models.v1_check_external_service_status_response import V1CheckExternalServiceStatusResponse
|
|
236
239
|
from lightning_sdk.lightning_cloud.openapi.models.v1_check_snowflake_connection_response import V1CheckSnowflakeConnectionResponse
|
|
237
240
|
from lightning_sdk.lightning_cloud.openapi.models.v1_checkbox import V1Checkbox
|
|
241
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_cloud_provider import V1CloudProvider
|
|
238
242
|
from lightning_sdk.lightning_cloud.openapi.models.v1_cloud_space import V1CloudSpace
|
|
239
243
|
from lightning_sdk.lightning_cloud.openapi.models.v1_cloud_space_app import V1CloudSpaceApp
|
|
240
244
|
from lightning_sdk.lightning_cloud.openapi.models.v1_cloud_space_app_action import V1CloudSpaceAppAction
|
|
241
245
|
from lightning_sdk.lightning_cloud.openapi.models.v1_cloud_space_app_action_type import V1CloudSpaceAppActionType
|
|
242
246
|
from lightning_sdk.lightning_cloud.openapi.models.v1_cloud_space_app_owner_type import V1CloudSpaceAppOwnerType
|
|
247
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_cloud_space_artifact_event import V1CloudSpaceArtifactEvent
|
|
248
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_cloud_space_artifact_event_type import V1CloudSpaceArtifactEventType
|
|
243
249
|
from lightning_sdk.lightning_cloud.openapi.models.v1_cloud_space_code_version import V1CloudSpaceCodeVersion
|
|
244
250
|
from lightning_sdk.lightning_cloud.openapi.models.v1_cloud_space_code_version_status import V1CloudSpaceCodeVersionStatus
|
|
245
251
|
from lightning_sdk.lightning_cloud.openapi.models.v1_cloud_space_engagement_response import V1CloudSpaceEngagementResponse
|
|
@@ -269,6 +275,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_state import V1Clus
|
|
|
269
275
|
from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_status import V1ClusterStatus
|
|
270
276
|
from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_tagging_options import V1ClusterTaggingOptions
|
|
271
277
|
from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_type import V1ClusterType
|
|
278
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_usage_restriction import V1ClusterUsageRestriction
|
|
272
279
|
from lightning_sdk.lightning_cloud.openapi.models.v1_collab_action import V1CollabAction
|
|
273
280
|
from lightning_sdk.lightning_cloud.openapi.models.v1_collab_session import V1CollabSession
|
|
274
281
|
from lightning_sdk.lightning_cloud.openapi.models.v1_command_argument import V1CommandArgument
|
|
@@ -281,6 +288,8 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_complete_upload_project_art
|
|
|
281
288
|
from lightning_sdk.lightning_cloud.openapi.models.v1_complete_upload_service_execution_artifact_response import V1CompleteUploadServiceExecutionArtifactResponse
|
|
282
289
|
from lightning_sdk.lightning_cloud.openapi.models.v1_completed_part import V1CompletedPart
|
|
283
290
|
from lightning_sdk.lightning_cloud.openapi.models.v1_compute_config import V1ComputeConfig
|
|
291
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_contact_assistant_owner_reason import V1ContactAssistantOwnerReason
|
|
292
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_contact_assistant_owner_response import V1ContactAssistantOwnerResponse
|
|
284
293
|
from lightning_sdk.lightning_cloud.openapi.models.v1_conversation import V1Conversation
|
|
285
294
|
from lightning_sdk.lightning_cloud.openapi.models.v1_conversation_response_chunk import V1ConversationResponseChunk
|
|
286
295
|
from lightning_sdk.lightning_cloud.openapi.models.v1_count_metrics_streams_response import V1CountMetricsStreamsResponse
|
|
@@ -328,6 +337,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_delete_cluster_capacity_res
|
|
|
328
337
|
from lightning_sdk.lightning_cloud.openapi.models.v1_delete_cluster_encryption_key_response import V1DeleteClusterEncryptionKeyResponse
|
|
329
338
|
from lightning_sdk.lightning_cloud.openapi.models.v1_delete_cluster_proxy_response import V1DeleteClusterProxyResponse
|
|
330
339
|
from lightning_sdk.lightning_cloud.openapi.models.v1_delete_cluster_response import V1DeleteClusterResponse
|
|
340
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_delete_cluster_usage_restriction_response import V1DeleteClusterUsageRestrictionResponse
|
|
331
341
|
from lightning_sdk.lightning_cloud.openapi.models.v1_delete_conversation_response import V1DeleteConversationResponse
|
|
332
342
|
from lightning_sdk.lightning_cloud.openapi.models.v1_delete_data_connection_response import V1DeleteDataConnectionResponse
|
|
333
343
|
from lightning_sdk.lightning_cloud.openapi.models.v1_delete_dataset_response import V1DeleteDatasetResponse
|
|
@@ -417,6 +427,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_filesystem_app import V1Fil
|
|
|
417
427
|
from lightning_sdk.lightning_cloud.openapi.models.v1_filesystem_cloud_space import V1FilesystemCloudSpace
|
|
418
428
|
from lightning_sdk.lightning_cloud.openapi.models.v1_filesystem_dataset import V1FilesystemDataset
|
|
419
429
|
from lightning_sdk.lightning_cloud.openapi.models.v1_filesystem_job import V1FilesystemJob
|
|
430
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_filesystem_mmt import V1FilesystemMMT
|
|
420
431
|
from lightning_sdk.lightning_cloud.openapi.models.v1_filesystem_slurm_job import V1FilesystemSlurmJob
|
|
421
432
|
from lightning_sdk.lightning_cloud.openapi.models.v1_filesystem_snowflake_connection import V1FilesystemSnowflakeConnection
|
|
422
433
|
from lightning_sdk.lightning_cloud.openapi.models.v1_filesystem_work import V1FilesystemWork
|
|
@@ -526,6 +537,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_list_cluster_accelerators_r
|
|
|
526
537
|
from lightning_sdk.lightning_cloud.openapi.models.v1_list_cluster_availabilities_response import V1ListClusterAvailabilitiesResponse
|
|
527
538
|
from lightning_sdk.lightning_cloud.openapi.models.v1_list_cluster_capacity_reservations_response import V1ListClusterCapacityReservationsResponse
|
|
528
539
|
from lightning_sdk.lightning_cloud.openapi.models.v1_list_cluster_proxies_response import V1ListClusterProxiesResponse
|
|
540
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_list_cluster_usage_restrictions_response import V1ListClusterUsageRestrictionsResponse
|
|
529
541
|
from lightning_sdk.lightning_cloud.openapi.models.v1_list_clusters_response import V1ListClustersResponse
|
|
530
542
|
from lightning_sdk.lightning_cloud.openapi.models.v1_list_conversations_response import V1ListConversationsResponse
|
|
531
543
|
from lightning_sdk.lightning_cloud.openapi.models.v1_list_data_connection_artifacts_response import V1ListDataConnectionArtifactsResponse
|
|
@@ -544,6 +556,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_list_filesystem_apps_respon
|
|
|
544
556
|
from lightning_sdk.lightning_cloud.openapi.models.v1_list_filesystem_cloud_spaces_response import V1ListFilesystemCloudSpacesResponse
|
|
545
557
|
from lightning_sdk.lightning_cloud.openapi.models.v1_list_filesystem_datasets_response import V1ListFilesystemDatasetsResponse
|
|
546
558
|
from lightning_sdk.lightning_cloud.openapi.models.v1_list_filesystem_jobs_response import V1ListFilesystemJobsResponse
|
|
559
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_list_filesystem_mm_ts_response import V1ListFilesystemMMTsResponse
|
|
547
560
|
from lightning_sdk.lightning_cloud.openapi.models.v1_list_filesystem_slurm_jobs_response import V1ListFilesystemSlurmJobsResponse
|
|
548
561
|
from lightning_sdk.lightning_cloud.openapi.models.v1_list_filesystem_snowflake_response import V1ListFilesystemSnowflakeResponse
|
|
549
562
|
from lightning_sdk.lightning_cloud.openapi.models.v1_list_gallery_components_response import V1ListGalleryComponentsResponse
|
|
@@ -652,6 +665,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_path_telemetry import V1Pat
|
|
|
652
665
|
from lightning_sdk.lightning_cloud.openapi.models.v1_phase_type import V1PhaseType
|
|
653
666
|
from lightning_sdk.lightning_cloud.openapi.models.v1_plugin import V1Plugin
|
|
654
667
|
from lightning_sdk.lightning_cloud.openapi.models.v1_plugins_list_response import V1PluginsListResponse
|
|
668
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_post_cloud_space_artifact_events_response import V1PostCloudSpaceArtifactEventsResponse
|
|
655
669
|
from lightning_sdk.lightning_cloud.openapi.models.v1_presigned_url import V1PresignedUrl
|
|
656
670
|
from lightning_sdk.lightning_cloud.openapi.models.v1_profiler_capture import V1ProfilerCapture
|
|
657
671
|
from lightning_sdk.lightning_cloud.openapi.models.v1_profiler_enabled_response import V1ProfilerEnabledResponse
|
|
@@ -43,6 +43,111 @@ class AssistantsServiceApi(object):
|
|
|
43
43
|
api_client = ApiClient()
|
|
44
44
|
self.api_client = api_client
|
|
45
45
|
|
|
46
|
+
def assistants_service_contact_assistant_owner(self, body: 'IdContactownerBody', id: 'str', **kwargs) -> 'V1ContactAssistantOwnerResponse': # noqa: E501
|
|
47
|
+
"""assistants_service_contact_assistant_owner # noqa: E501
|
|
48
|
+
|
|
49
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
50
|
+
asynchronous HTTP request, please pass async_req=True
|
|
51
|
+
>>> thread = api.assistants_service_contact_assistant_owner(body, id, async_req=True)
|
|
52
|
+
>>> result = thread.get()
|
|
53
|
+
|
|
54
|
+
:param async_req bool
|
|
55
|
+
:param IdContactownerBody body: (required)
|
|
56
|
+
:param str id: (required)
|
|
57
|
+
:return: V1ContactAssistantOwnerResponse
|
|
58
|
+
If the method is called asynchronously,
|
|
59
|
+
returns the request thread.
|
|
60
|
+
"""
|
|
61
|
+
kwargs['_return_http_data_only'] = True
|
|
62
|
+
if kwargs.get('async_req'):
|
|
63
|
+
return self.assistants_service_contact_assistant_owner_with_http_info(body, id, **kwargs) # noqa: E501
|
|
64
|
+
else:
|
|
65
|
+
(data) = self.assistants_service_contact_assistant_owner_with_http_info(body, id, **kwargs) # noqa: E501
|
|
66
|
+
return data
|
|
67
|
+
|
|
68
|
+
def assistants_service_contact_assistant_owner_with_http_info(self, body: 'IdContactownerBody', id: 'str', **kwargs) -> 'V1ContactAssistantOwnerResponse': # noqa: E501
|
|
69
|
+
"""assistants_service_contact_assistant_owner # noqa: E501
|
|
70
|
+
|
|
71
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
72
|
+
asynchronous HTTP request, please pass async_req=True
|
|
73
|
+
>>> thread = api.assistants_service_contact_assistant_owner_with_http_info(body, id, async_req=True)
|
|
74
|
+
>>> result = thread.get()
|
|
75
|
+
|
|
76
|
+
:param async_req bool
|
|
77
|
+
:param IdContactownerBody body: (required)
|
|
78
|
+
:param str id: (required)
|
|
79
|
+
:return: V1ContactAssistantOwnerResponse
|
|
80
|
+
If the method is called asynchronously,
|
|
81
|
+
returns the request thread.
|
|
82
|
+
"""
|
|
83
|
+
|
|
84
|
+
all_params = ['body', 'id'] # noqa: E501
|
|
85
|
+
all_params.append('async_req')
|
|
86
|
+
all_params.append('_return_http_data_only')
|
|
87
|
+
all_params.append('_preload_content')
|
|
88
|
+
all_params.append('_request_timeout')
|
|
89
|
+
|
|
90
|
+
params = locals()
|
|
91
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
92
|
+
if key not in all_params:
|
|
93
|
+
raise TypeError(
|
|
94
|
+
"Got an unexpected keyword argument '%s'"
|
|
95
|
+
" to method assistants_service_contact_assistant_owner" % key
|
|
96
|
+
)
|
|
97
|
+
params[key] = val
|
|
98
|
+
del params['kwargs']
|
|
99
|
+
# verify the required parameter 'body' is set
|
|
100
|
+
if ('body' not in params or
|
|
101
|
+
params['body'] is None):
|
|
102
|
+
raise ValueError("Missing the required parameter `body` when calling `assistants_service_contact_assistant_owner`") # noqa: E501
|
|
103
|
+
# verify the required parameter 'id' is set
|
|
104
|
+
if ('id' not in params or
|
|
105
|
+
params['id'] is None):
|
|
106
|
+
raise ValueError("Missing the required parameter `id` when calling `assistants_service_contact_assistant_owner`") # noqa: E501
|
|
107
|
+
|
|
108
|
+
collection_formats = {}
|
|
109
|
+
|
|
110
|
+
path_params = {}
|
|
111
|
+
if 'id' in params:
|
|
112
|
+
path_params['id'] = params['id'] # noqa: E501
|
|
113
|
+
|
|
114
|
+
query_params = []
|
|
115
|
+
|
|
116
|
+
header_params = {}
|
|
117
|
+
|
|
118
|
+
form_params = []
|
|
119
|
+
local_var_files = {}
|
|
120
|
+
|
|
121
|
+
body_params = None
|
|
122
|
+
if 'body' in params:
|
|
123
|
+
body_params = params['body']
|
|
124
|
+
# HTTP header `Accept`
|
|
125
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
126
|
+
['application/json']) # noqa: E501
|
|
127
|
+
|
|
128
|
+
# HTTP header `Content-Type`
|
|
129
|
+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
130
|
+
['application/json']) # noqa: E501
|
|
131
|
+
|
|
132
|
+
# Authentication setting
|
|
133
|
+
auth_settings = [] # noqa: E501
|
|
134
|
+
|
|
135
|
+
return self.api_client.call_api(
|
|
136
|
+
'/v1/agents/{id}/contact-owner', 'POST',
|
|
137
|
+
path_params,
|
|
138
|
+
query_params,
|
|
139
|
+
header_params,
|
|
140
|
+
body=body_params,
|
|
141
|
+
post_params=form_params,
|
|
142
|
+
files=local_var_files,
|
|
143
|
+
response_type='V1ContactAssistantOwnerResponse', # noqa: E501
|
|
144
|
+
auth_settings=auth_settings,
|
|
145
|
+
async_req=params.get('async_req'),
|
|
146
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
147
|
+
_preload_content=params.get('_preload_content', True),
|
|
148
|
+
_request_timeout=params.get('_request_timeout'),
|
|
149
|
+
collection_formats=collection_formats)
|
|
150
|
+
|
|
46
151
|
def assistants_service_create_assistant(self, body: 'ProjectIdAgentsBody', project_id: 'str', **kwargs) -> 'V1Assistant': # noqa: E501
|
|
47
152
|
"""assistants_service_create_assistant # noqa: E501
|
|
48
153
|
|