lightning-sdk 0.1.46__py3-none-any.whl → 0.1.47__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/job_api.py +25 -5
- lightning_sdk/api/lit_registry_api.py +12 -0
- lightning_sdk/api/mmt_api.py +18 -1
- lightning_sdk/api/teamspace_api.py +19 -1
- lightning_sdk/cli/entrypoint.py +2 -0
- lightning_sdk/cli/list.py +54 -0
- lightning_sdk/cli/teamspace_menu.py +94 -0
- lightning_sdk/job/base.py +66 -2
- lightning_sdk/job/job.py +25 -0
- lightning_sdk/job/v1.py +28 -0
- lightning_sdk/job/v2.py +29 -1
- lightning_sdk/job/work.py +10 -1
- lightning_sdk/lightning_cloud/openapi/__init__.py +1 -0
- lightning_sdk/lightning_cloud/openapi/api/lit_registry_service_api.py +101 -0
- lightning_sdk/lightning_cloud/openapi/models/__init__.py +1 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_delete_container_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_deployment_api.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_deployment_state.py +1 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_google_cloud_direct_v1.py +1 -27
- lightning_sdk/lightning_cloud/openapi/models/v1_job.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_resource_visibility.py +29 -3
- lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +27 -1
- lightning_sdk/lightning_cloud/utils/data_connection.py +1 -2
- lightning_sdk/lit_registry.py +39 -0
- lightning_sdk/machine.py +4 -0
- lightning_sdk/mmt/base.py +39 -1
- lightning_sdk/mmt/mmt.py +24 -0
- lightning_sdk/mmt/v1.py +25 -1
- lightning_sdk/mmt/v2.py +28 -0
- lightning_sdk/status.py +11 -7
- lightning_sdk/teamspace.py +51 -1
- {lightning_sdk-0.1.46.dist-info → lightning_sdk-0.1.47.dist-info}/METADATA +1 -1
- {lightning_sdk-0.1.46.dist-info → lightning_sdk-0.1.47.dist-info}/RECORD +38 -33
- {lightning_sdk-0.1.46.dist-info → lightning_sdk-0.1.47.dist-info}/LICENSE +0 -0
- {lightning_sdk-0.1.46.dist-info → lightning_sdk-0.1.47.dist-info}/WHEEL +0 -0
- {lightning_sdk-0.1.46.dist-info → lightning_sdk-0.1.47.dist-info}/entry_points.txt +0 -0
- {lightning_sdk-0.1.46.dist-info → lightning_sdk-0.1.47.dist-info}/top_level.txt +0 -0
|
@@ -327,6 +327,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_delete_cluster_capacity_res
|
|
|
327
327
|
from lightning_sdk.lightning_cloud.openapi.models.v1_delete_cluster_encryption_key_response import V1DeleteClusterEncryptionKeyResponse
|
|
328
328
|
from lightning_sdk.lightning_cloud.openapi.models.v1_delete_cluster_proxy_response import V1DeleteClusterProxyResponse
|
|
329
329
|
from lightning_sdk.lightning_cloud.openapi.models.v1_delete_cluster_response import V1DeleteClusterResponse
|
|
330
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_delete_container_response import V1DeleteContainerResponse
|
|
330
331
|
from lightning_sdk.lightning_cloud.openapi.models.v1_delete_conversation_response import V1DeleteConversationResponse
|
|
331
332
|
from lightning_sdk.lightning_cloud.openapi.models.v1_delete_data_connection_response import V1DeleteDataConnectionResponse
|
|
332
333
|
from lightning_sdk.lightning_cloud.openapi.models.v1_delete_dataset_response import V1DeleteDatasetResponse
|
|
@@ -148,6 +148,107 @@ class LitRegistryServiceApi(object):
|
|
|
148
148
|
_request_timeout=params.get('_request_timeout'),
|
|
149
149
|
collection_formats=collection_formats)
|
|
150
150
|
|
|
151
|
+
def lit_registry_service_delete_lit_container(self, project_id: 'str', lit_container_name: 'str', **kwargs) -> 'V1DeleteContainerResponse': # noqa: E501
|
|
152
|
+
"""lit_registry_service_delete_lit_container # noqa: E501
|
|
153
|
+
|
|
154
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
155
|
+
asynchronous HTTP request, please pass async_req=True
|
|
156
|
+
>>> thread = api.lit_registry_service_delete_lit_container(project_id, lit_container_name, async_req=True)
|
|
157
|
+
>>> result = thread.get()
|
|
158
|
+
|
|
159
|
+
:param async_req bool
|
|
160
|
+
:param str project_id: (required)
|
|
161
|
+
:param str lit_container_name: (required)
|
|
162
|
+
:return: V1DeleteContainerResponse
|
|
163
|
+
If the method is called asynchronously,
|
|
164
|
+
returns the request thread.
|
|
165
|
+
"""
|
|
166
|
+
kwargs['_return_http_data_only'] = True
|
|
167
|
+
if kwargs.get('async_req'):
|
|
168
|
+
return self.lit_registry_service_delete_lit_container_with_http_info(project_id, lit_container_name, **kwargs) # noqa: E501
|
|
169
|
+
else:
|
|
170
|
+
(data) = self.lit_registry_service_delete_lit_container_with_http_info(project_id, lit_container_name, **kwargs) # noqa: E501
|
|
171
|
+
return data
|
|
172
|
+
|
|
173
|
+
def lit_registry_service_delete_lit_container_with_http_info(self, project_id: 'str', lit_container_name: 'str', **kwargs) -> 'V1DeleteContainerResponse': # noqa: E501
|
|
174
|
+
"""lit_registry_service_delete_lit_container # noqa: E501
|
|
175
|
+
|
|
176
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
177
|
+
asynchronous HTTP request, please pass async_req=True
|
|
178
|
+
>>> thread = api.lit_registry_service_delete_lit_container_with_http_info(project_id, lit_container_name, async_req=True)
|
|
179
|
+
>>> result = thread.get()
|
|
180
|
+
|
|
181
|
+
:param async_req bool
|
|
182
|
+
:param str project_id: (required)
|
|
183
|
+
:param str lit_container_name: (required)
|
|
184
|
+
:return: V1DeleteContainerResponse
|
|
185
|
+
If the method is called asynchronously,
|
|
186
|
+
returns the request thread.
|
|
187
|
+
"""
|
|
188
|
+
|
|
189
|
+
all_params = ['project_id', 'lit_container_name'] # noqa: E501
|
|
190
|
+
all_params.append('async_req')
|
|
191
|
+
all_params.append('_return_http_data_only')
|
|
192
|
+
all_params.append('_preload_content')
|
|
193
|
+
all_params.append('_request_timeout')
|
|
194
|
+
|
|
195
|
+
params = locals()
|
|
196
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
197
|
+
if key not in all_params:
|
|
198
|
+
raise TypeError(
|
|
199
|
+
"Got an unexpected keyword argument '%s'"
|
|
200
|
+
" to method lit_registry_service_delete_lit_container" % key
|
|
201
|
+
)
|
|
202
|
+
params[key] = val
|
|
203
|
+
del params['kwargs']
|
|
204
|
+
# verify the required parameter 'project_id' is set
|
|
205
|
+
if ('project_id' not in params or
|
|
206
|
+
params['project_id'] is None):
|
|
207
|
+
raise ValueError("Missing the required parameter `project_id` when calling `lit_registry_service_delete_lit_container`") # noqa: E501
|
|
208
|
+
# verify the required parameter 'lit_container_name' is set
|
|
209
|
+
if ('lit_container_name' not in params or
|
|
210
|
+
params['lit_container_name'] is None):
|
|
211
|
+
raise ValueError("Missing the required parameter `lit_container_name` when calling `lit_registry_service_delete_lit_container`") # noqa: E501
|
|
212
|
+
|
|
213
|
+
collection_formats = {}
|
|
214
|
+
|
|
215
|
+
path_params = {}
|
|
216
|
+
if 'project_id' in params:
|
|
217
|
+
path_params['projectId'] = params['project_id'] # noqa: E501
|
|
218
|
+
if 'lit_container_name' in params:
|
|
219
|
+
path_params['litContainerName'] = params['lit_container_name'] # noqa: E501
|
|
220
|
+
|
|
221
|
+
query_params = []
|
|
222
|
+
|
|
223
|
+
header_params = {}
|
|
224
|
+
|
|
225
|
+
form_params = []
|
|
226
|
+
local_var_files = {}
|
|
227
|
+
|
|
228
|
+
body_params = None
|
|
229
|
+
# HTTP header `Accept`
|
|
230
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
231
|
+
['application/json']) # noqa: E501
|
|
232
|
+
|
|
233
|
+
# Authentication setting
|
|
234
|
+
auth_settings = [] # noqa: E501
|
|
235
|
+
|
|
236
|
+
return self.api_client.call_api(
|
|
237
|
+
'/v1/projects/{projectId}/lit-registry/{litContainerName}', 'DELETE',
|
|
238
|
+
path_params,
|
|
239
|
+
query_params,
|
|
240
|
+
header_params,
|
|
241
|
+
body=body_params,
|
|
242
|
+
post_params=form_params,
|
|
243
|
+
files=local_var_files,
|
|
244
|
+
response_type='V1DeleteContainerResponse', # noqa: E501
|
|
245
|
+
auth_settings=auth_settings,
|
|
246
|
+
async_req=params.get('async_req'),
|
|
247
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
248
|
+
_preload_content=params.get('_preload_content', True),
|
|
249
|
+
_request_timeout=params.get('_request_timeout'),
|
|
250
|
+
collection_formats=collection_formats)
|
|
251
|
+
|
|
151
252
|
def lit_registry_service_get_lit_project_registry(self, project_id: 'str', **kwargs) -> 'V1LitRegistryProject': # noqa: E501
|
|
152
253
|
"""lit_registry_service_get_lit_project_registry # noqa: E501
|
|
153
254
|
|
|
@@ -290,6 +290,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_delete_cluster_capacity_res
|
|
|
290
290
|
from lightning_sdk.lightning_cloud.openapi.models.v1_delete_cluster_encryption_key_response import V1DeleteClusterEncryptionKeyResponse
|
|
291
291
|
from lightning_sdk.lightning_cloud.openapi.models.v1_delete_cluster_proxy_response import V1DeleteClusterProxyResponse
|
|
292
292
|
from lightning_sdk.lightning_cloud.openapi.models.v1_delete_cluster_response import V1DeleteClusterResponse
|
|
293
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_delete_container_response import V1DeleteContainerResponse
|
|
293
294
|
from lightning_sdk.lightning_cloud.openapi.models.v1_delete_conversation_response import V1DeleteConversationResponse
|
|
294
295
|
from lightning_sdk.lightning_cloud.openapi.models.v1_delete_data_connection_response import V1DeleteDataConnectionResponse
|
|
295
296
|
from lightning_sdk.lightning_cloud.openapi.models.v1_delete_dataset_response import V1DeleteDatasetResponse
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
external/v1/auth_service.proto
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
|
|
7
|
+
|
|
8
|
+
OpenAPI spec version: version not set
|
|
9
|
+
|
|
10
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
11
|
+
|
|
12
|
+
NOTE
|
|
13
|
+
----
|
|
14
|
+
standard swagger-codegen-cli for this python client has been modified
|
|
15
|
+
by custom templates. The purpose of these templates is to include
|
|
16
|
+
typing information in the API and Model code. Please refer to the
|
|
17
|
+
main grid repository for more info
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
import pprint
|
|
21
|
+
import re # noqa: F401
|
|
22
|
+
|
|
23
|
+
from typing import TYPE_CHECKING
|
|
24
|
+
|
|
25
|
+
import six
|
|
26
|
+
|
|
27
|
+
if TYPE_CHECKING:
|
|
28
|
+
from datetime import datetime
|
|
29
|
+
from lightning_sdk.lightning_cloud.openapi.models import *
|
|
30
|
+
|
|
31
|
+
class V1DeleteContainerResponse(object):
|
|
32
|
+
"""NOTE: This class is auto generated by the swagger code generator program.
|
|
33
|
+
|
|
34
|
+
Do not edit the class manually.
|
|
35
|
+
"""
|
|
36
|
+
"""
|
|
37
|
+
Attributes:
|
|
38
|
+
swagger_types (dict): The key is attribute name
|
|
39
|
+
and the value is attribute type.
|
|
40
|
+
attribute_map (dict): The key is attribute name
|
|
41
|
+
and the value is json key in definition.
|
|
42
|
+
"""
|
|
43
|
+
swagger_types = {
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
attribute_map = {
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
def __init__(self): # noqa: E501
|
|
50
|
+
"""V1DeleteContainerResponse - a model defined in Swagger""" # noqa: E501
|
|
51
|
+
self.discriminator = None
|
|
52
|
+
|
|
53
|
+
def to_dict(self) -> dict:
|
|
54
|
+
"""Returns the model properties as a dict"""
|
|
55
|
+
result = {}
|
|
56
|
+
|
|
57
|
+
for attr, _ in six.iteritems(self.swagger_types):
|
|
58
|
+
value = getattr(self, attr)
|
|
59
|
+
if isinstance(value, list):
|
|
60
|
+
result[attr] = list(map(
|
|
61
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
62
|
+
value
|
|
63
|
+
))
|
|
64
|
+
elif hasattr(value, "to_dict"):
|
|
65
|
+
result[attr] = value.to_dict()
|
|
66
|
+
elif isinstance(value, dict):
|
|
67
|
+
result[attr] = dict(map(
|
|
68
|
+
lambda item: (item[0], item[1].to_dict())
|
|
69
|
+
if hasattr(item[1], "to_dict") else item,
|
|
70
|
+
value.items()
|
|
71
|
+
))
|
|
72
|
+
else:
|
|
73
|
+
result[attr] = value
|
|
74
|
+
if issubclass(V1DeleteContainerResponse, dict):
|
|
75
|
+
for key, value in self.items():
|
|
76
|
+
result[key] = value
|
|
77
|
+
|
|
78
|
+
return result
|
|
79
|
+
|
|
80
|
+
def to_str(self) -> str:
|
|
81
|
+
"""Returns the string representation of the model"""
|
|
82
|
+
return pprint.pformat(self.to_dict())
|
|
83
|
+
|
|
84
|
+
def __repr__(self) -> str:
|
|
85
|
+
"""For `print` and `pprint`"""
|
|
86
|
+
return self.to_str()
|
|
87
|
+
|
|
88
|
+
def __eq__(self, other: 'V1DeleteContainerResponse') -> bool:
|
|
89
|
+
"""Returns true if both objects are equal"""
|
|
90
|
+
if not isinstance(other, V1DeleteContainerResponse):
|
|
91
|
+
return False
|
|
92
|
+
|
|
93
|
+
return self.__dict__ == other.__dict__
|
|
94
|
+
|
|
95
|
+
def __ne__(self, other: 'V1DeleteContainerResponse') -> bool:
|
|
96
|
+
"""Returns true if both objects are not equal"""
|
|
97
|
+
return not self == other
|
|
@@ -44,6 +44,7 @@ class V1DeploymentAPI(object):
|
|
|
44
44
|
'body': 'V1Body',
|
|
45
45
|
'headers': 'list[V1Header]',
|
|
46
46
|
'method': 'str',
|
|
47
|
+
'name': 'str',
|
|
47
48
|
'path': 'str',
|
|
48
49
|
'_query_params': 'list[V1QueryParam]'
|
|
49
50
|
}
|
|
@@ -52,15 +53,17 @@ class V1DeploymentAPI(object):
|
|
|
52
53
|
'body': 'body',
|
|
53
54
|
'headers': 'headers',
|
|
54
55
|
'method': 'method',
|
|
56
|
+
'name': 'name',
|
|
55
57
|
'path': 'path',
|
|
56
58
|
'_query_params': 'queryParams'
|
|
57
59
|
}
|
|
58
60
|
|
|
59
|
-
def __init__(self, body: 'V1Body' =None, headers: 'list[V1Header]' =None, method: 'str' =None, path: 'str' =None, _query_params: 'list[V1QueryParam]' =None): # noqa: E501
|
|
61
|
+
def __init__(self, body: 'V1Body' =None, headers: 'list[V1Header]' =None, method: 'str' =None, name: 'str' =None, path: 'str' =None, _query_params: 'list[V1QueryParam]' =None): # noqa: E501
|
|
60
62
|
"""V1DeploymentAPI - a model defined in Swagger""" # noqa: E501
|
|
61
63
|
self._body = None
|
|
62
64
|
self._headers = None
|
|
63
65
|
self._method = None
|
|
66
|
+
self._name = None
|
|
64
67
|
self._path = None
|
|
65
68
|
self.__query_params = None
|
|
66
69
|
self.discriminator = None
|
|
@@ -70,6 +73,8 @@ class V1DeploymentAPI(object):
|
|
|
70
73
|
self.headers = headers
|
|
71
74
|
if method is not None:
|
|
72
75
|
self.method = method
|
|
76
|
+
if name is not None:
|
|
77
|
+
self.name = name
|
|
73
78
|
if path is not None:
|
|
74
79
|
self.path = path
|
|
75
80
|
if _query_params is not None:
|
|
@@ -138,6 +143,27 @@ class V1DeploymentAPI(object):
|
|
|
138
143
|
|
|
139
144
|
self._method = method
|
|
140
145
|
|
|
146
|
+
@property
|
|
147
|
+
def name(self) -> 'str':
|
|
148
|
+
"""Gets the name of this V1DeploymentAPI. # noqa: E501
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
:return: The name of this V1DeploymentAPI. # noqa: E501
|
|
152
|
+
:rtype: str
|
|
153
|
+
"""
|
|
154
|
+
return self._name
|
|
155
|
+
|
|
156
|
+
@name.setter
|
|
157
|
+
def name(self, name: 'str'):
|
|
158
|
+
"""Sets the name of this V1DeploymentAPI.
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
:param name: The name of this V1DeploymentAPI. # noqa: E501
|
|
162
|
+
:type: str
|
|
163
|
+
"""
|
|
164
|
+
|
|
165
|
+
self._name = name
|
|
166
|
+
|
|
141
167
|
@property
|
|
142
168
|
def path(self) -> 'str':
|
|
143
169
|
"""Gets the path of this V1DeploymentAPI. # noqa: E501
|
|
@@ -41,6 +41,7 @@ class V1DeploymentState(object):
|
|
|
41
41
|
RUNNING = "DEPLOYMENT_STATE_RUNNING"
|
|
42
42
|
DELETED = "DEPLOYMENT_STATE_DELETED"
|
|
43
43
|
FAILED = "DEPLOYMENT_STATE_FAILED"
|
|
44
|
+
SUSPENDED = "DEPLOYMENT_STATE_SUSPENDED"
|
|
44
45
|
"""
|
|
45
46
|
Attributes:
|
|
46
47
|
swagger_types (dict): The key is attribute name
|
|
@@ -42,7 +42,6 @@ class V1GoogleCloudDirectV1(object):
|
|
|
42
42
|
"""
|
|
43
43
|
swagger_types = {
|
|
44
44
|
'bucket_name': 'str',
|
|
45
|
-
'compute_list_bucket_project_role': 'str',
|
|
46
45
|
'compute_project_role': 'str',
|
|
47
46
|
'credentials_secret_id': 'str',
|
|
48
47
|
'credentials_service_account_email': 'str',
|
|
@@ -55,7 +54,6 @@ class V1GoogleCloudDirectV1(object):
|
|
|
55
54
|
|
|
56
55
|
attribute_map = {
|
|
57
56
|
'bucket_name': 'bucketName',
|
|
58
|
-
'compute_list_bucket_project_role': 'computeListBucketProjectRole',
|
|
59
57
|
'compute_project_role': 'computeProjectRole',
|
|
60
58
|
'credentials_secret_id': 'credentialsSecretId',
|
|
61
59
|
'credentials_service_account_email': 'credentialsServiceAccountEmail',
|
|
@@ -66,10 +64,9 @@ class V1GoogleCloudDirectV1(object):
|
|
|
66
64
|
'source_cidr_ips': 'sourceCidrIps'
|
|
67
65
|
}
|
|
68
66
|
|
|
69
|
-
def __init__(self, bucket_name: 'str' =None,
|
|
67
|
+
def __init__(self, bucket_name: 'str' =None, compute_project_role: 'str' =None, credentials_secret_id: 'str' =None, credentials_service_account_email: 'str' =None, primary_region: 'str' =None, project_id: 'str' =None, regions: 'list[str]' =None, service_account_email: 'str' =None, source_cidr_ips: 'list[str]' =None): # noqa: E501
|
|
70
68
|
"""V1GoogleCloudDirectV1 - a model defined in Swagger""" # noqa: E501
|
|
71
69
|
self._bucket_name = None
|
|
72
|
-
self._compute_list_bucket_project_role = None
|
|
73
70
|
self._compute_project_role = None
|
|
74
71
|
self._credentials_secret_id = None
|
|
75
72
|
self._credentials_service_account_email = None
|
|
@@ -81,8 +78,6 @@ class V1GoogleCloudDirectV1(object):
|
|
|
81
78
|
self.discriminator = None
|
|
82
79
|
if bucket_name is not None:
|
|
83
80
|
self.bucket_name = bucket_name
|
|
84
|
-
if compute_list_bucket_project_role is not None:
|
|
85
|
-
self.compute_list_bucket_project_role = compute_list_bucket_project_role
|
|
86
81
|
if compute_project_role is not None:
|
|
87
82
|
self.compute_project_role = compute_project_role
|
|
88
83
|
if credentials_secret_id is not None:
|
|
@@ -121,27 +116,6 @@ class V1GoogleCloudDirectV1(object):
|
|
|
121
116
|
|
|
122
117
|
self._bucket_name = bucket_name
|
|
123
118
|
|
|
124
|
-
@property
|
|
125
|
-
def compute_list_bucket_project_role(self) -> 'str':
|
|
126
|
-
"""Gets the compute_list_bucket_project_role of this V1GoogleCloudDirectV1. # noqa: E501
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
:return: The compute_list_bucket_project_role of this V1GoogleCloudDirectV1. # noqa: E501
|
|
130
|
-
:rtype: str
|
|
131
|
-
"""
|
|
132
|
-
return self._compute_list_bucket_project_role
|
|
133
|
-
|
|
134
|
-
@compute_list_bucket_project_role.setter
|
|
135
|
-
def compute_list_bucket_project_role(self, compute_list_bucket_project_role: 'str'):
|
|
136
|
-
"""Sets the compute_list_bucket_project_role of this V1GoogleCloudDirectV1.
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
:param compute_list_bucket_project_role: The compute_list_bucket_project_role of this V1GoogleCloudDirectV1. # noqa: E501
|
|
140
|
-
:type: str
|
|
141
|
-
"""
|
|
142
|
-
|
|
143
|
-
self._compute_list_bucket_project_role = compute_list_bucket_project_role
|
|
144
|
-
|
|
145
119
|
@property
|
|
146
120
|
def compute_project_role(self) -> 'str':
|
|
147
121
|
"""Gets the compute_project_role of this V1GoogleCloudDirectV1. # noqa: E501
|
|
@@ -47,6 +47,7 @@ class V1Job(object):
|
|
|
47
47
|
'id': 'str',
|
|
48
48
|
'is_healthy': 'bool',
|
|
49
49
|
'message': 'str',
|
|
50
|
+
'multi_machine_job_id': 'str',
|
|
50
51
|
'name': 'str',
|
|
51
52
|
'overprovisioned': 'bool',
|
|
52
53
|
'project_id': 'str',
|
|
@@ -73,6 +74,7 @@ class V1Job(object):
|
|
|
73
74
|
'id': 'id',
|
|
74
75
|
'is_healthy': 'isHealthy',
|
|
75
76
|
'message': 'message',
|
|
77
|
+
'multi_machine_job_id': 'multiMachineJobId',
|
|
76
78
|
'name': 'name',
|
|
77
79
|
'overprovisioned': 'overprovisioned',
|
|
78
80
|
'project_id': 'projectId',
|
|
@@ -92,7 +94,7 @@ class V1Job(object):
|
|
|
92
94
|
'user_logs_started_at': 'userLogsStartedAt'
|
|
93
95
|
}
|
|
94
96
|
|
|
95
|
-
def __init__(self, created_at: 'datetime' =None, deployment_id: 'str' =None, endpoint: 'V1Endpoint' =None, id: 'str' =None, is_healthy: 'bool' =None, message: 'str' =None, name: 'str' =None, overprovisioned: 'bool' =None, project_id: 'str' =None, ready_at: 'datetime' =None, release_id: 'str' =None, server_error: 'str' =None, spec: 'V1JobSpec' =None, started_at: 'datetime' =None, state: 'str' =None, stopped_at: 'datetime' =None, timings: 'dict(str, V1JobTiming)' =None, total_cost: 'float' =None, total_size_bytes: 'str' =None, updated_at: 'datetime' =None, urls: 'list[str]' =None, user_id: 'str' =None, user_logs_started_at: 'datetime' =None): # noqa: E501
|
|
97
|
+
def __init__(self, created_at: 'datetime' =None, deployment_id: 'str' =None, endpoint: 'V1Endpoint' =None, id: 'str' =None, is_healthy: 'bool' =None, message: 'str' =None, multi_machine_job_id: 'str' =None, name: 'str' =None, overprovisioned: 'bool' =None, project_id: 'str' =None, ready_at: 'datetime' =None, release_id: 'str' =None, server_error: 'str' =None, spec: 'V1JobSpec' =None, started_at: 'datetime' =None, state: 'str' =None, stopped_at: 'datetime' =None, timings: 'dict(str, V1JobTiming)' =None, total_cost: 'float' =None, total_size_bytes: 'str' =None, updated_at: 'datetime' =None, urls: 'list[str]' =None, user_id: 'str' =None, user_logs_started_at: 'datetime' =None): # noqa: E501
|
|
96
98
|
"""V1Job - a model defined in Swagger""" # noqa: E501
|
|
97
99
|
self._created_at = None
|
|
98
100
|
self._deployment_id = None
|
|
@@ -100,6 +102,7 @@ class V1Job(object):
|
|
|
100
102
|
self._id = None
|
|
101
103
|
self._is_healthy = None
|
|
102
104
|
self._message = None
|
|
105
|
+
self._multi_machine_job_id = None
|
|
103
106
|
self._name = None
|
|
104
107
|
self._overprovisioned = None
|
|
105
108
|
self._project_id = None
|
|
@@ -130,6 +133,8 @@ class V1Job(object):
|
|
|
130
133
|
self.is_healthy = is_healthy
|
|
131
134
|
if message is not None:
|
|
132
135
|
self.message = message
|
|
136
|
+
if multi_machine_job_id is not None:
|
|
137
|
+
self.multi_machine_job_id = multi_machine_job_id
|
|
133
138
|
if name is not None:
|
|
134
139
|
self.name = name
|
|
135
140
|
if overprovisioned is not None:
|
|
@@ -291,6 +296,27 @@ class V1Job(object):
|
|
|
291
296
|
|
|
292
297
|
self._message = message
|
|
293
298
|
|
|
299
|
+
@property
|
|
300
|
+
def multi_machine_job_id(self) -> 'str':
|
|
301
|
+
"""Gets the multi_machine_job_id of this V1Job. # noqa: E501
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
:return: The multi_machine_job_id of this V1Job. # noqa: E501
|
|
305
|
+
:rtype: str
|
|
306
|
+
"""
|
|
307
|
+
return self._multi_machine_job_id
|
|
308
|
+
|
|
309
|
+
@multi_machine_job_id.setter
|
|
310
|
+
def multi_machine_job_id(self, multi_machine_job_id: 'str'):
|
|
311
|
+
"""Sets the multi_machine_job_id of this V1Job.
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
:param multi_machine_job_id: The multi_machine_job_id of this V1Job. # noqa: E501
|
|
315
|
+
:type: str
|
|
316
|
+
"""
|
|
317
|
+
|
|
318
|
+
self._multi_machine_job_id = multi_machine_job_id
|
|
319
|
+
|
|
294
320
|
@property
|
|
295
321
|
def name(self) -> 'str':
|
|
296
322
|
"""Gets the name of this V1Job. # noqa: E501
|
|
@@ -41,19 +41,24 @@ class V1ResourceVisibility(object):
|
|
|
41
41
|
and the value is json key in definition.
|
|
42
42
|
"""
|
|
43
43
|
swagger_types = {
|
|
44
|
-
'all_users': 'bool'
|
|
44
|
+
'all_users': 'bool',
|
|
45
|
+
'user_ids': 'list[str]'
|
|
45
46
|
}
|
|
46
47
|
|
|
47
48
|
attribute_map = {
|
|
48
|
-
'all_users': 'allUsers'
|
|
49
|
+
'all_users': 'allUsers',
|
|
50
|
+
'user_ids': 'userIds'
|
|
49
51
|
}
|
|
50
52
|
|
|
51
|
-
def __init__(self, all_users: 'bool' =None): # noqa: E501
|
|
53
|
+
def __init__(self, all_users: 'bool' =None, user_ids: 'list[str]' =None): # noqa: E501
|
|
52
54
|
"""V1ResourceVisibility - a model defined in Swagger""" # noqa: E501
|
|
53
55
|
self._all_users = None
|
|
56
|
+
self._user_ids = None
|
|
54
57
|
self.discriminator = None
|
|
55
58
|
if all_users is not None:
|
|
56
59
|
self.all_users = all_users
|
|
60
|
+
if user_ids is not None:
|
|
61
|
+
self.user_ids = user_ids
|
|
57
62
|
|
|
58
63
|
@property
|
|
59
64
|
def all_users(self) -> 'bool':
|
|
@@ -76,6 +81,27 @@ class V1ResourceVisibility(object):
|
|
|
76
81
|
|
|
77
82
|
self._all_users = all_users
|
|
78
83
|
|
|
84
|
+
@property
|
|
85
|
+
def user_ids(self) -> 'list[str]':
|
|
86
|
+
"""Gets the user_ids of this V1ResourceVisibility. # noqa: E501
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
:return: The user_ids of this V1ResourceVisibility. # noqa: E501
|
|
90
|
+
:rtype: list[str]
|
|
91
|
+
"""
|
|
92
|
+
return self._user_ids
|
|
93
|
+
|
|
94
|
+
@user_ids.setter
|
|
95
|
+
def user_ids(self, user_ids: 'list[str]'):
|
|
96
|
+
"""Sets the user_ids of this V1ResourceVisibility.
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
:param user_ids: The user_ids of this V1ResourceVisibility. # noqa: E501
|
|
100
|
+
:type: list[str]
|
|
101
|
+
"""
|
|
102
|
+
|
|
103
|
+
self._user_ids = user_ids
|
|
104
|
+
|
|
79
105
|
def to_dict(self) -> dict:
|
|
80
106
|
"""Returns the model properties as a dict"""
|
|
81
107
|
result = {}
|
|
@@ -88,6 +88,7 @@ class V1UserFeatures(object):
|
|
|
88
88
|
'multiple_deployment_versions': 'bool',
|
|
89
89
|
'multiple_studio_versions': 'bool',
|
|
90
90
|
'org_level_member_permissions': 'bool',
|
|
91
|
+
'pipelines': 'bool',
|
|
91
92
|
'plugin_biz_chat': 'bool',
|
|
92
93
|
'plugin_distributed': 'bool',
|
|
93
94
|
'plugin_fiftyone': 'bool',
|
|
@@ -172,6 +173,7 @@ class V1UserFeatures(object):
|
|
|
172
173
|
'multiple_deployment_versions': 'multipleDeploymentVersions',
|
|
173
174
|
'multiple_studio_versions': 'multipleStudioVersions',
|
|
174
175
|
'org_level_member_permissions': 'orgLevelMemberPermissions',
|
|
176
|
+
'pipelines': 'pipelines',
|
|
175
177
|
'plugin_biz_chat': 'pluginBizChat',
|
|
176
178
|
'plugin_distributed': 'pluginDistributed',
|
|
177
179
|
'plugin_fiftyone': 'pluginFiftyone',
|
|
@@ -208,7 +210,7 @@ class V1UserFeatures(object):
|
|
|
208
210
|
'writable_data_connections': 'writableDataConnections'
|
|
209
211
|
}
|
|
210
212
|
|
|
211
|
-
def __init__(self, advanced_deployment_autoscaling: 'bool' =None, affiliate_links: 'bool' =None, agents_v2: 'bool' =None, ai_hub_monetization: 'bool' =None, auto_fast_load: 'bool' =None, auto_join_orgs: 'bool' =None, b2c_experience: 'bool' =None, cap_add: 'list[str]' =None, cap_drop: 'list[str]' =None, capacity_reservation_byoc: 'bool' =None, capacity_reservation_dry_run: 'bool' =None, cluster_proxy: 'bool' =None, code_tab: 'bool' =None, collab_screen_sharing: 'bool' =None, cost_attribution_settings: 'bool' =None, custom_app_domain: 'bool' =None, custom_instance_types: 'bool' =None, default_one_cluster: 'bool' =None, deployment_customize_api: 'bool' =None, deployment_data_path: 'bool' =None, deployment_gallery: 'bool' =None, deployment_persistent_disk: 'bool' =None, deployment_version_visibility: 'bool' =None, docs_agent: 'bool' =None, drive_v2: 'bool' =None, dynamic_workload_scheduling: 'bool' =None, enable_crypto_crackdown: 'bool' =None, enable_efs: 'bool' =None, enable_storage_limits: 'bool' =None, featured_studios_admin: 'bool' =None, filesystem_optimisation: 'bool' =None, gcp: 'bool' =None, inference_job_deployment_plugin: 'bool' =None, instant_capacity_reservation: 'bool' =None, jobs_init: 'bool' =None, jobs_v2: 'bool' =None, landing_studios: 'bool' =None, lightning_registry: 'bool' =None, lit_logger: 'bool' =None, lit_logger_storage_v2: 'bool' =None, mmt_fault_tolerance: 'bool' =None, mmt_strategy_selector: 'bool' =None, mmt_v2: 'bool' =None, model_store: 'bool' =None, multiple_deployment_versions: 'bool' =None, multiple_studio_versions: 'bool' =None, org_level_member_permissions: 'bool' =None, plugin_biz_chat: 'bool' =None, plugin_distributed: 'bool' =None, plugin_fiftyone: 'bool' =None, plugin_inference: 'bool' =None, plugin_label_studio: 'bool' =None, plugin_langflow: 'bool' =None, plugin_lightning_apps: 'bool' =None, plugin_lightning_apps_distributed: 'bool' =None, plugin_mage_ai: 'bool' =None, plugin_milvus: 'bool' =None, plugin_python_profiler: 'bool' =None, plugin_react: 'bool' =None, plugin_service: 'bool' =None, plugin_sweeps: 'bool' =None, plugin_weviate: 'bool' =None, pricing_updates: 'bool' =None, product_generator: 'bool' =None, project_selector: 'bool' =None, restart_ide_on_hang: 'bool' =None, restartable_jobs: 'bool' =None, runnable_public_studio_page: 'bool' =None, show_dev_admin: 'bool' =None, slurm: 'bool' =None, slurm_machine_selector: 'bool' =None, snapshotter_service: 'bool' =None, snowflake_connection: 'bool' =None, spot_v2: 'bool' =None, studio_config: 'bool' =None, studio_on_stop: 'bool' =None, studio_version_visibility: 'bool' =None, teamspace_storage_tab: 'bool' =None, trainium2: 'bool' =None, use_rclone_mounts_only: 'bool' =None, writable_data_connections: 'bool' =None): # noqa: E501
|
|
213
|
+
def __init__(self, advanced_deployment_autoscaling: 'bool' =None, affiliate_links: 'bool' =None, agents_v2: 'bool' =None, ai_hub_monetization: 'bool' =None, auto_fast_load: 'bool' =None, auto_join_orgs: 'bool' =None, b2c_experience: 'bool' =None, cap_add: 'list[str]' =None, cap_drop: 'list[str]' =None, capacity_reservation_byoc: 'bool' =None, capacity_reservation_dry_run: 'bool' =None, cluster_proxy: 'bool' =None, code_tab: 'bool' =None, collab_screen_sharing: 'bool' =None, cost_attribution_settings: 'bool' =None, custom_app_domain: 'bool' =None, custom_instance_types: 'bool' =None, default_one_cluster: 'bool' =None, deployment_customize_api: 'bool' =None, deployment_data_path: 'bool' =None, deployment_gallery: 'bool' =None, deployment_persistent_disk: 'bool' =None, deployment_version_visibility: 'bool' =None, docs_agent: 'bool' =None, drive_v2: 'bool' =None, dynamic_workload_scheduling: 'bool' =None, enable_crypto_crackdown: 'bool' =None, enable_efs: 'bool' =None, enable_storage_limits: 'bool' =None, featured_studios_admin: 'bool' =None, filesystem_optimisation: 'bool' =None, gcp: 'bool' =None, inference_job_deployment_plugin: 'bool' =None, instant_capacity_reservation: 'bool' =None, jobs_init: 'bool' =None, jobs_v2: 'bool' =None, landing_studios: 'bool' =None, lightning_registry: 'bool' =None, lit_logger: 'bool' =None, lit_logger_storage_v2: 'bool' =None, mmt_fault_tolerance: 'bool' =None, mmt_strategy_selector: 'bool' =None, mmt_v2: 'bool' =None, model_store: 'bool' =None, multiple_deployment_versions: 'bool' =None, multiple_studio_versions: 'bool' =None, org_level_member_permissions: 'bool' =None, pipelines: 'bool' =None, plugin_biz_chat: 'bool' =None, plugin_distributed: 'bool' =None, plugin_fiftyone: 'bool' =None, plugin_inference: 'bool' =None, plugin_label_studio: 'bool' =None, plugin_langflow: 'bool' =None, plugin_lightning_apps: 'bool' =None, plugin_lightning_apps_distributed: 'bool' =None, plugin_mage_ai: 'bool' =None, plugin_milvus: 'bool' =None, plugin_python_profiler: 'bool' =None, plugin_react: 'bool' =None, plugin_service: 'bool' =None, plugin_sweeps: 'bool' =None, plugin_weviate: 'bool' =None, pricing_updates: 'bool' =None, product_generator: 'bool' =None, project_selector: 'bool' =None, restart_ide_on_hang: 'bool' =None, restartable_jobs: 'bool' =None, runnable_public_studio_page: 'bool' =None, show_dev_admin: 'bool' =None, slurm: 'bool' =None, slurm_machine_selector: 'bool' =None, snapshotter_service: 'bool' =None, snowflake_connection: 'bool' =None, spot_v2: 'bool' =None, studio_config: 'bool' =None, studio_on_stop: 'bool' =None, studio_version_visibility: 'bool' =None, teamspace_storage_tab: 'bool' =None, trainium2: 'bool' =None, use_rclone_mounts_only: 'bool' =None, writable_data_connections: 'bool' =None): # noqa: E501
|
|
212
214
|
"""V1UserFeatures - a model defined in Swagger""" # noqa: E501
|
|
213
215
|
self._advanced_deployment_autoscaling = None
|
|
214
216
|
self._affiliate_links = None
|
|
@@ -257,6 +259,7 @@ class V1UserFeatures(object):
|
|
|
257
259
|
self._multiple_deployment_versions = None
|
|
258
260
|
self._multiple_studio_versions = None
|
|
259
261
|
self._org_level_member_permissions = None
|
|
262
|
+
self._pipelines = None
|
|
260
263
|
self._plugin_biz_chat = None
|
|
261
264
|
self._plugin_distributed = None
|
|
262
265
|
self._plugin_fiftyone = None
|
|
@@ -386,6 +389,8 @@ class V1UserFeatures(object):
|
|
|
386
389
|
self.multiple_studio_versions = multiple_studio_versions
|
|
387
390
|
if org_level_member_permissions is not None:
|
|
388
391
|
self.org_level_member_permissions = org_level_member_permissions
|
|
392
|
+
if pipelines is not None:
|
|
393
|
+
self.pipelines = pipelines
|
|
389
394
|
if plugin_biz_chat is not None:
|
|
390
395
|
self.plugin_biz_chat = plugin_biz_chat
|
|
391
396
|
if plugin_distributed is not None:
|
|
@@ -1442,6 +1447,27 @@ class V1UserFeatures(object):
|
|
|
1442
1447
|
|
|
1443
1448
|
self._org_level_member_permissions = org_level_member_permissions
|
|
1444
1449
|
|
|
1450
|
+
@property
|
|
1451
|
+
def pipelines(self) -> 'bool':
|
|
1452
|
+
"""Gets the pipelines of this V1UserFeatures. # noqa: E501
|
|
1453
|
+
|
|
1454
|
+
|
|
1455
|
+
:return: The pipelines of this V1UserFeatures. # noqa: E501
|
|
1456
|
+
:rtype: bool
|
|
1457
|
+
"""
|
|
1458
|
+
return self._pipelines
|
|
1459
|
+
|
|
1460
|
+
@pipelines.setter
|
|
1461
|
+
def pipelines(self, pipelines: 'bool'):
|
|
1462
|
+
"""Sets the pipelines of this V1UserFeatures.
|
|
1463
|
+
|
|
1464
|
+
|
|
1465
|
+
:param pipelines: The pipelines of this V1UserFeatures. # noqa: E501
|
|
1466
|
+
:type: bool
|
|
1467
|
+
"""
|
|
1468
|
+
|
|
1469
|
+
self._pipelines = pipelines
|
|
1470
|
+
|
|
1445
1471
|
@property
|
|
1446
1472
|
def plugin_biz_chat(self) -> 'bool':
|
|
1447
1473
|
"""Gets the plugin_biz_chat of this V1UserFeatures. # noqa: E501
|
|
@@ -133,7 +133,6 @@ def create_efs_folder(folder_name: str, region: str) -> None:
|
|
|
133
133
|
cluster_id=cluster_id,
|
|
134
134
|
access_cluster_ids=[cluster_id],
|
|
135
135
|
force=True,
|
|
136
|
-
writable=True,
|
|
137
136
|
efs=V1EfsConfig(region=region),
|
|
138
137
|
)
|
|
139
138
|
try:
|
|
@@ -181,4 +180,4 @@ def delete_data_connection(name: str):
|
|
|
181
180
|
# It may exhaust the attempts before the connection is actually unmounted from the studio.
|
|
182
181
|
# for now it's best to actually stop the studio and all other things where the connection
|
|
183
182
|
# is mounted before trying to delete it
|
|
184
|
-
raise e from None
|
|
183
|
+
raise e from None
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
from typing import Dict, List, Optional
|
|
2
|
+
|
|
3
|
+
from lightning_sdk.api.lit_registry_api import LitRegistryApi
|
|
4
|
+
from lightning_sdk.utils.resolve import _resolve_teamspace
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class LitRegistry:
|
|
8
|
+
def __init__(self) -> None:
|
|
9
|
+
self._api = LitRegistryApi()
|
|
10
|
+
|
|
11
|
+
def list_containers(
|
|
12
|
+
self, teamspace: str, org: Optional[str] = None, user: Optional[str] = None
|
|
13
|
+
) -> List[Dict[str, str]]:
|
|
14
|
+
"""List available containers.
|
|
15
|
+
|
|
16
|
+
Args:
|
|
17
|
+
teamspace: The teamspace to list containers from.
|
|
18
|
+
org: The organization to list containers from.
|
|
19
|
+
user: The user to list the containers from.
|
|
20
|
+
|
|
21
|
+
Returns:
|
|
22
|
+
A list of dictionaries containing repository details.
|
|
23
|
+
"""
|
|
24
|
+
try:
|
|
25
|
+
teamspace = _resolve_teamspace(teamspace=teamspace, org=org, user=user)
|
|
26
|
+
except Exception as e:
|
|
27
|
+
raise ValueError(f"Could not resolve teamspace: {e}") from e
|
|
28
|
+
project_id = teamspace.id
|
|
29
|
+
repositories = self._api.list_containers(project_id)
|
|
30
|
+
table = []
|
|
31
|
+
for repo in repositories:
|
|
32
|
+
table.append(
|
|
33
|
+
{
|
|
34
|
+
"REPOSITORY": repo.name,
|
|
35
|
+
"IMAGE ID": repo.id,
|
|
36
|
+
"CREATED": repo.creation_time.strftime("%Y-%m-%d %H:%M:%S"),
|
|
37
|
+
}
|
|
38
|
+
)
|
|
39
|
+
return table
|