lightning-sdk 0.1.47__py3-none-any.whl → 0.1.48__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 +12 -1
- lightning_sdk/api/lit_container_api.py +19 -0
- lightning_sdk/api/utils.py +1 -1
- lightning_sdk/cli/delete.py +58 -0
- lightning_sdk/cli/entrypoint.py +6 -0
- lightning_sdk/cli/inspect.py +31 -0
- lightning_sdk/cli/job_and_mmt_action.py +37 -0
- lightning_sdk/cli/jobs_menu.py +57 -0
- lightning_sdk/cli/list.py +2 -2
- lightning_sdk/cli/mmts_menu.py +57 -0
- lightning_sdk/cli/run.py +12 -0
- lightning_sdk/cli/stop.py +37 -0
- lightning_sdk/job/base.py +5 -1
- lightning_sdk/job/job.py +34 -9
- lightning_sdk/job/v2.py +11 -3
- lightning_sdk/lightning_cloud/openapi/__init__.py +3 -1
- lightning_sdk/lightning_cloud/openapi/api/lit_registry_service_api.py +124 -23
- lightning_sdk/lightning_cloud/openapi/api/models_store_api.py +250 -8
- lightning_sdk/lightning_cloud/openapi/models/__init__.py +3 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_aws_direct_v1.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/{v1_delete_container_response.py → v1_delete_lit_repository_response.py} +6 -6
- lightning_sdk/lightning_cloud/openapi/models/v1_google_cloud_direct_v1.py +29 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_model.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +1 -53
- lightning_sdk/lightning_cloud/openapi/models/v1_vultr_direct_v1.py +55 -3
- lightning_sdk/lightning_cloud/openapi/models/version_default_body.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/versions_version_body.py +123 -0
- lightning_sdk/lightning_cloud/utils/data_connection.py +1 -0
- lightning_sdk/{lit_registry.py → lit_container.py} +22 -4
- lightning_sdk/mmt/mmt.py +35 -14
- lightning_sdk/mmt/v1.py +5 -1
- lightning_sdk/mmt/v2.py +3 -2
- {lightning_sdk-0.1.47.dist-info → lightning_sdk-0.1.48.dist-info}/METADATA +1 -1
- {lightning_sdk-0.1.47.dist-info → lightning_sdk-0.1.48.dist-info}/RECORD +39 -31
- lightning_sdk/api/lit_registry_api.py +0 -12
- {lightning_sdk-0.1.47.dist-info → lightning_sdk-0.1.48.dist-info}/LICENSE +0 -0
- {lightning_sdk-0.1.47.dist-info → lightning_sdk-0.1.48.dist-info}/WHEEL +0 -0
- {lightning_sdk-0.1.47.dist-info → lightning_sdk-0.1.48.dist-info}/entry_points.txt +0 -0
- {lightning_sdk-0.1.47.dist-info → lightning_sdk-0.1.48.dist-info}/top_level.txt +0 -0
|
@@ -148,45 +148,45 @@ class LitRegistryServiceApi(object):
|
|
|
148
148
|
_request_timeout=params.get('_request_timeout'),
|
|
149
149
|
collection_formats=collection_formats)
|
|
150
150
|
|
|
151
|
-
def
|
|
152
|
-
"""
|
|
151
|
+
def lit_registry_service_delete_lit_repository(self, project_id: 'str', lit_repo_name: 'str', **kwargs) -> 'V1DeleteLitRepositoryResponse': # noqa: E501
|
|
152
|
+
"""lit_registry_service_delete_lit_repository # noqa: E501
|
|
153
153
|
|
|
154
154
|
This method makes a synchronous HTTP request by default. To make an
|
|
155
155
|
asynchronous HTTP request, please pass async_req=True
|
|
156
|
-
>>> thread = api.
|
|
156
|
+
>>> thread = api.lit_registry_service_delete_lit_repository(project_id, lit_repo_name, async_req=True)
|
|
157
157
|
>>> result = thread.get()
|
|
158
158
|
|
|
159
159
|
:param async_req bool
|
|
160
160
|
:param str project_id: (required)
|
|
161
|
-
:param str
|
|
162
|
-
:return:
|
|
161
|
+
:param str lit_repo_name: (required)
|
|
162
|
+
:return: V1DeleteLitRepositoryResponse
|
|
163
163
|
If the method is called asynchronously,
|
|
164
164
|
returns the request thread.
|
|
165
165
|
"""
|
|
166
166
|
kwargs['_return_http_data_only'] = True
|
|
167
167
|
if kwargs.get('async_req'):
|
|
168
|
-
return self.
|
|
168
|
+
return self.lit_registry_service_delete_lit_repository_with_http_info(project_id, lit_repo_name, **kwargs) # noqa: E501
|
|
169
169
|
else:
|
|
170
|
-
(data) = self.
|
|
170
|
+
(data) = self.lit_registry_service_delete_lit_repository_with_http_info(project_id, lit_repo_name, **kwargs) # noqa: E501
|
|
171
171
|
return data
|
|
172
172
|
|
|
173
|
-
def
|
|
174
|
-
"""
|
|
173
|
+
def lit_registry_service_delete_lit_repository_with_http_info(self, project_id: 'str', lit_repo_name: 'str', **kwargs) -> 'V1DeleteLitRepositoryResponse': # noqa: E501
|
|
174
|
+
"""lit_registry_service_delete_lit_repository # noqa: E501
|
|
175
175
|
|
|
176
176
|
This method makes a synchronous HTTP request by default. To make an
|
|
177
177
|
asynchronous HTTP request, please pass async_req=True
|
|
178
|
-
>>> thread = api.
|
|
178
|
+
>>> thread = api.lit_registry_service_delete_lit_repository_with_http_info(project_id, lit_repo_name, async_req=True)
|
|
179
179
|
>>> result = thread.get()
|
|
180
180
|
|
|
181
181
|
:param async_req bool
|
|
182
182
|
:param str project_id: (required)
|
|
183
|
-
:param str
|
|
184
|
-
:return:
|
|
183
|
+
:param str lit_repo_name: (required)
|
|
184
|
+
:return: V1DeleteLitRepositoryResponse
|
|
185
185
|
If the method is called asynchronously,
|
|
186
186
|
returns the request thread.
|
|
187
187
|
"""
|
|
188
188
|
|
|
189
|
-
all_params = ['project_id', '
|
|
189
|
+
all_params = ['project_id', 'lit_repo_name'] # noqa: E501
|
|
190
190
|
all_params.append('async_req')
|
|
191
191
|
all_params.append('_return_http_data_only')
|
|
192
192
|
all_params.append('_preload_content')
|
|
@@ -197,26 +197,26 @@ class LitRegistryServiceApi(object):
|
|
|
197
197
|
if key not in all_params:
|
|
198
198
|
raise TypeError(
|
|
199
199
|
"Got an unexpected keyword argument '%s'"
|
|
200
|
-
" to method
|
|
200
|
+
" to method lit_registry_service_delete_lit_repository" % key
|
|
201
201
|
)
|
|
202
202
|
params[key] = val
|
|
203
203
|
del params['kwargs']
|
|
204
204
|
# verify the required parameter 'project_id' is set
|
|
205
205
|
if ('project_id' not in params or
|
|
206
206
|
params['project_id'] is None):
|
|
207
|
-
raise ValueError("Missing the required parameter `project_id` when calling `
|
|
208
|
-
# verify the required parameter '
|
|
209
|
-
if ('
|
|
210
|
-
params['
|
|
211
|
-
raise ValueError("Missing the required parameter `
|
|
207
|
+
raise ValueError("Missing the required parameter `project_id` when calling `lit_registry_service_delete_lit_repository`") # noqa: E501
|
|
208
|
+
# verify the required parameter 'lit_repo_name' is set
|
|
209
|
+
if ('lit_repo_name' not in params or
|
|
210
|
+
params['lit_repo_name'] is None):
|
|
211
|
+
raise ValueError("Missing the required parameter `lit_repo_name` when calling `lit_registry_service_delete_lit_repository`") # noqa: E501
|
|
212
212
|
|
|
213
213
|
collection_formats = {}
|
|
214
214
|
|
|
215
215
|
path_params = {}
|
|
216
216
|
if 'project_id' in params:
|
|
217
217
|
path_params['projectId'] = params['project_id'] # noqa: E501
|
|
218
|
-
if '
|
|
219
|
-
path_params['
|
|
218
|
+
if 'lit_repo_name' in params:
|
|
219
|
+
path_params['litRepoName'] = params['lit_repo_name'] # noqa: E501
|
|
220
220
|
|
|
221
221
|
query_params = []
|
|
222
222
|
|
|
@@ -234,14 +234,14 @@ class LitRegistryServiceApi(object):
|
|
|
234
234
|
auth_settings = [] # noqa: E501
|
|
235
235
|
|
|
236
236
|
return self.api_client.call_api(
|
|
237
|
-
'/v1/projects/{projectId}/lit-registry/{
|
|
237
|
+
'/v1/projects/{projectId}/lit-registry/{litRepoName}', 'DELETE',
|
|
238
238
|
path_params,
|
|
239
239
|
query_params,
|
|
240
240
|
header_params,
|
|
241
241
|
body=body_params,
|
|
242
242
|
post_params=form_params,
|
|
243
243
|
files=local_var_files,
|
|
244
|
-
response_type='
|
|
244
|
+
response_type='V1DeleteLitRepositoryResponse', # noqa: E501
|
|
245
245
|
auth_settings=auth_settings,
|
|
246
246
|
async_req=params.get('async_req'),
|
|
247
247
|
_return_http_data_only=params.get('_return_http_data_only'),
|
|
@@ -341,3 +341,104 @@ class LitRegistryServiceApi(object):
|
|
|
341
341
|
_preload_content=params.get('_preload_content', True),
|
|
342
342
|
_request_timeout=params.get('_request_timeout'),
|
|
343
343
|
collection_formats=collection_formats)
|
|
344
|
+
|
|
345
|
+
def lit_registry_service_get_lit_repository(self, project_id: 'str', lit_repo_name: 'str', **kwargs) -> 'V1LitRepository': # noqa: E501
|
|
346
|
+
"""lit_registry_service_get_lit_repository # noqa: E501
|
|
347
|
+
|
|
348
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
349
|
+
asynchronous HTTP request, please pass async_req=True
|
|
350
|
+
>>> thread = api.lit_registry_service_get_lit_repository(project_id, lit_repo_name, async_req=True)
|
|
351
|
+
>>> result = thread.get()
|
|
352
|
+
|
|
353
|
+
:param async_req bool
|
|
354
|
+
:param str project_id: (required)
|
|
355
|
+
:param str lit_repo_name: (required)
|
|
356
|
+
:return: V1LitRepository
|
|
357
|
+
If the method is called asynchronously,
|
|
358
|
+
returns the request thread.
|
|
359
|
+
"""
|
|
360
|
+
kwargs['_return_http_data_only'] = True
|
|
361
|
+
if kwargs.get('async_req'):
|
|
362
|
+
return self.lit_registry_service_get_lit_repository_with_http_info(project_id, lit_repo_name, **kwargs) # noqa: E501
|
|
363
|
+
else:
|
|
364
|
+
(data) = self.lit_registry_service_get_lit_repository_with_http_info(project_id, lit_repo_name, **kwargs) # noqa: E501
|
|
365
|
+
return data
|
|
366
|
+
|
|
367
|
+
def lit_registry_service_get_lit_repository_with_http_info(self, project_id: 'str', lit_repo_name: 'str', **kwargs) -> 'V1LitRepository': # noqa: E501
|
|
368
|
+
"""lit_registry_service_get_lit_repository # noqa: E501
|
|
369
|
+
|
|
370
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
371
|
+
asynchronous HTTP request, please pass async_req=True
|
|
372
|
+
>>> thread = api.lit_registry_service_get_lit_repository_with_http_info(project_id, lit_repo_name, async_req=True)
|
|
373
|
+
>>> result = thread.get()
|
|
374
|
+
|
|
375
|
+
:param async_req bool
|
|
376
|
+
:param str project_id: (required)
|
|
377
|
+
:param str lit_repo_name: (required)
|
|
378
|
+
:return: V1LitRepository
|
|
379
|
+
If the method is called asynchronously,
|
|
380
|
+
returns the request thread.
|
|
381
|
+
"""
|
|
382
|
+
|
|
383
|
+
all_params = ['project_id', 'lit_repo_name'] # noqa: E501
|
|
384
|
+
all_params.append('async_req')
|
|
385
|
+
all_params.append('_return_http_data_only')
|
|
386
|
+
all_params.append('_preload_content')
|
|
387
|
+
all_params.append('_request_timeout')
|
|
388
|
+
|
|
389
|
+
params = locals()
|
|
390
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
391
|
+
if key not in all_params:
|
|
392
|
+
raise TypeError(
|
|
393
|
+
"Got an unexpected keyword argument '%s'"
|
|
394
|
+
" to method lit_registry_service_get_lit_repository" % key
|
|
395
|
+
)
|
|
396
|
+
params[key] = val
|
|
397
|
+
del params['kwargs']
|
|
398
|
+
# verify the required parameter 'project_id' is set
|
|
399
|
+
if ('project_id' not in params or
|
|
400
|
+
params['project_id'] is None):
|
|
401
|
+
raise ValueError("Missing the required parameter `project_id` when calling `lit_registry_service_get_lit_repository`") # noqa: E501
|
|
402
|
+
# verify the required parameter 'lit_repo_name' is set
|
|
403
|
+
if ('lit_repo_name' not in params or
|
|
404
|
+
params['lit_repo_name'] is None):
|
|
405
|
+
raise ValueError("Missing the required parameter `lit_repo_name` when calling `lit_registry_service_get_lit_repository`") # noqa: E501
|
|
406
|
+
|
|
407
|
+
collection_formats = {}
|
|
408
|
+
|
|
409
|
+
path_params = {}
|
|
410
|
+
if 'project_id' in params:
|
|
411
|
+
path_params['projectId'] = params['project_id'] # noqa: E501
|
|
412
|
+
if 'lit_repo_name' in params:
|
|
413
|
+
path_params['litRepoName'] = params['lit_repo_name'] # noqa: E501
|
|
414
|
+
|
|
415
|
+
query_params = []
|
|
416
|
+
|
|
417
|
+
header_params = {}
|
|
418
|
+
|
|
419
|
+
form_params = []
|
|
420
|
+
local_var_files = {}
|
|
421
|
+
|
|
422
|
+
body_params = None
|
|
423
|
+
# HTTP header `Accept`
|
|
424
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
425
|
+
['application/json']) # noqa: E501
|
|
426
|
+
|
|
427
|
+
# Authentication setting
|
|
428
|
+
auth_settings = [] # noqa: E501
|
|
429
|
+
|
|
430
|
+
return self.api_client.call_api(
|
|
431
|
+
'/v1/projects/{projectId}/lit-registry/{litRepoName}', 'GET',
|
|
432
|
+
path_params,
|
|
433
|
+
query_params,
|
|
434
|
+
header_params,
|
|
435
|
+
body=body_params,
|
|
436
|
+
post_params=form_params,
|
|
437
|
+
files=local_var_files,
|
|
438
|
+
response_type='V1LitRepository', # noqa: E501
|
|
439
|
+
auth_settings=auth_settings,
|
|
440
|
+
async_req=params.get('async_req'),
|
|
441
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
442
|
+
_preload_content=params.get('_preload_content', True),
|
|
443
|
+
_request_timeout=params.get('_request_timeout'),
|
|
444
|
+
collection_formats=collection_formats)
|
|
@@ -294,7 +294,7 @@ class ModelsStoreApi(object):
|
|
|
294
294
|
collection_formats=collection_formats)
|
|
295
295
|
|
|
296
296
|
def models_store_create_model(self, body: 'ProjectIdModelsBody', project_id: 'str', **kwargs) -> 'V1ModelVersionArchive': # noqa: E501
|
|
297
|
-
"""CreateModel creates a new
|
|
297
|
+
"""CreateModel creates a new model. # noqa: E501
|
|
298
298
|
|
|
299
299
|
This method makes a synchronous HTTP request by default. To make an
|
|
300
300
|
asynchronous HTTP request, please pass async_req=True
|
|
@@ -316,7 +316,7 @@ class ModelsStoreApi(object):
|
|
|
316
316
|
return data
|
|
317
317
|
|
|
318
318
|
def models_store_create_model_with_http_info(self, body: 'ProjectIdModelsBody', project_id: 'str', **kwargs) -> 'V1ModelVersionArchive': # noqa: E501
|
|
319
|
-
"""CreateModel creates a new
|
|
319
|
+
"""CreateModel creates a new model. # noqa: E501
|
|
320
320
|
|
|
321
321
|
This method makes a synchronous HTTP request by default. To make an
|
|
322
322
|
asynchronous HTTP request, please pass async_req=True
|
|
@@ -399,7 +399,7 @@ class ModelsStoreApi(object):
|
|
|
399
399
|
collection_formats=collection_formats)
|
|
400
400
|
|
|
401
401
|
def models_store_create_model_version(self, body: 'ModelIdVersionsBody', project_id: 'str', model_id: 'str', **kwargs) -> 'V1ModelVersionArchive': # noqa: E501
|
|
402
|
-
"""
|
|
402
|
+
"""CreateModelVersion creates a new version of a model and marks the upload as incomplete. Files are expected to be uploaded using the multi-part upload APIs below, followed by a completion request after which the model will be fully visible (can list, delete etc.) # noqa: E501
|
|
403
403
|
|
|
404
404
|
This method makes a synchronous HTTP request by default. To make an
|
|
405
405
|
asynchronous HTTP request, please pass async_req=True
|
|
@@ -422,7 +422,7 @@ class ModelsStoreApi(object):
|
|
|
422
422
|
return data
|
|
423
423
|
|
|
424
424
|
def models_store_create_model_version_with_http_info(self, body: 'ModelIdVersionsBody', project_id: 'str', model_id: 'str', **kwargs) -> 'V1ModelVersionArchive': # noqa: E501
|
|
425
|
-
"""
|
|
425
|
+
"""CreateModelVersion creates a new version of a model and marks the upload as incomplete. Files are expected to be uploaded using the multi-part upload APIs below, followed by a completion request after which the model will be fully visible (can list, delete etc.) # noqa: E501
|
|
426
426
|
|
|
427
427
|
This method makes a synchronous HTTP request by default. To make an
|
|
428
428
|
asynchronous HTTP request, please pass async_req=True
|
|
@@ -1827,8 +1827,129 @@ class ModelsStoreApi(object):
|
|
|
1827
1827
|
_request_timeout=params.get('_request_timeout'),
|
|
1828
1828
|
collection_formats=collection_formats)
|
|
1829
1829
|
|
|
1830
|
+
def models_store_set_model_default_version(self, body: 'VersionDefaultBody', project_id: 'str', model_id: 'str', version: 'str', **kwargs) -> 'V1Model': # noqa: E501
|
|
1831
|
+
"""models_store_set_model_default_version # noqa: E501
|
|
1832
|
+
|
|
1833
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
1834
|
+
asynchronous HTTP request, please pass async_req=True
|
|
1835
|
+
>>> thread = api.models_store_set_model_default_version(body, project_id, model_id, version, async_req=True)
|
|
1836
|
+
>>> result = thread.get()
|
|
1837
|
+
|
|
1838
|
+
:param async_req bool
|
|
1839
|
+
:param VersionDefaultBody body: (required)
|
|
1840
|
+
:param str project_id: (required)
|
|
1841
|
+
:param str model_id: (required)
|
|
1842
|
+
:param str version: (required)
|
|
1843
|
+
:return: V1Model
|
|
1844
|
+
If the method is called asynchronously,
|
|
1845
|
+
returns the request thread.
|
|
1846
|
+
"""
|
|
1847
|
+
kwargs['_return_http_data_only'] = True
|
|
1848
|
+
if kwargs.get('async_req'):
|
|
1849
|
+
return self.models_store_set_model_default_version_with_http_info(body, project_id, model_id, version, **kwargs) # noqa: E501
|
|
1850
|
+
else:
|
|
1851
|
+
(data) = self.models_store_set_model_default_version_with_http_info(body, project_id, model_id, version, **kwargs) # noqa: E501
|
|
1852
|
+
return data
|
|
1853
|
+
|
|
1854
|
+
def models_store_set_model_default_version_with_http_info(self, body: 'VersionDefaultBody', project_id: 'str', model_id: 'str', version: 'str', **kwargs) -> 'V1Model': # noqa: E501
|
|
1855
|
+
"""models_store_set_model_default_version # noqa: E501
|
|
1856
|
+
|
|
1857
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
1858
|
+
asynchronous HTTP request, please pass async_req=True
|
|
1859
|
+
>>> thread = api.models_store_set_model_default_version_with_http_info(body, project_id, model_id, version, async_req=True)
|
|
1860
|
+
>>> result = thread.get()
|
|
1861
|
+
|
|
1862
|
+
:param async_req bool
|
|
1863
|
+
:param VersionDefaultBody body: (required)
|
|
1864
|
+
:param str project_id: (required)
|
|
1865
|
+
:param str model_id: (required)
|
|
1866
|
+
:param str version: (required)
|
|
1867
|
+
:return: V1Model
|
|
1868
|
+
If the method is called asynchronously,
|
|
1869
|
+
returns the request thread.
|
|
1870
|
+
"""
|
|
1871
|
+
|
|
1872
|
+
all_params = ['body', 'project_id', 'model_id', 'version'] # noqa: E501
|
|
1873
|
+
all_params.append('async_req')
|
|
1874
|
+
all_params.append('_return_http_data_only')
|
|
1875
|
+
all_params.append('_preload_content')
|
|
1876
|
+
all_params.append('_request_timeout')
|
|
1877
|
+
|
|
1878
|
+
params = locals()
|
|
1879
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
1880
|
+
if key not in all_params:
|
|
1881
|
+
raise TypeError(
|
|
1882
|
+
"Got an unexpected keyword argument '%s'"
|
|
1883
|
+
" to method models_store_set_model_default_version" % key
|
|
1884
|
+
)
|
|
1885
|
+
params[key] = val
|
|
1886
|
+
del params['kwargs']
|
|
1887
|
+
# verify the required parameter 'body' is set
|
|
1888
|
+
if ('body' not in params or
|
|
1889
|
+
params['body'] is None):
|
|
1890
|
+
raise ValueError("Missing the required parameter `body` when calling `models_store_set_model_default_version`") # noqa: E501
|
|
1891
|
+
# verify the required parameter 'project_id' is set
|
|
1892
|
+
if ('project_id' not in params or
|
|
1893
|
+
params['project_id'] is None):
|
|
1894
|
+
raise ValueError("Missing the required parameter `project_id` when calling `models_store_set_model_default_version`") # noqa: E501
|
|
1895
|
+
# verify the required parameter 'model_id' is set
|
|
1896
|
+
if ('model_id' not in params or
|
|
1897
|
+
params['model_id'] is None):
|
|
1898
|
+
raise ValueError("Missing the required parameter `model_id` when calling `models_store_set_model_default_version`") # noqa: E501
|
|
1899
|
+
# verify the required parameter 'version' is set
|
|
1900
|
+
if ('version' not in params or
|
|
1901
|
+
params['version'] is None):
|
|
1902
|
+
raise ValueError("Missing the required parameter `version` when calling `models_store_set_model_default_version`") # noqa: E501
|
|
1903
|
+
|
|
1904
|
+
collection_formats = {}
|
|
1905
|
+
|
|
1906
|
+
path_params = {}
|
|
1907
|
+
if 'project_id' in params:
|
|
1908
|
+
path_params['projectId'] = params['project_id'] # noqa: E501
|
|
1909
|
+
if 'model_id' in params:
|
|
1910
|
+
path_params['modelId'] = params['model_id'] # noqa: E501
|
|
1911
|
+
if 'version' in params:
|
|
1912
|
+
path_params['version'] = params['version'] # noqa: E501
|
|
1913
|
+
|
|
1914
|
+
query_params = []
|
|
1915
|
+
|
|
1916
|
+
header_params = {}
|
|
1917
|
+
|
|
1918
|
+
form_params = []
|
|
1919
|
+
local_var_files = {}
|
|
1920
|
+
|
|
1921
|
+
body_params = None
|
|
1922
|
+
if 'body' in params:
|
|
1923
|
+
body_params = params['body']
|
|
1924
|
+
# HTTP header `Accept`
|
|
1925
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
1926
|
+
['application/json']) # noqa: E501
|
|
1927
|
+
|
|
1928
|
+
# HTTP header `Content-Type`
|
|
1929
|
+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
1930
|
+
['application/json']) # noqa: E501
|
|
1931
|
+
|
|
1932
|
+
# Authentication setting
|
|
1933
|
+
auth_settings = [] # noqa: E501
|
|
1934
|
+
|
|
1935
|
+
return self.api_client.call_api(
|
|
1936
|
+
'/v1/projects/{projectId}/models/{modelId}/versions/{version}/default', 'PUT',
|
|
1937
|
+
path_params,
|
|
1938
|
+
query_params,
|
|
1939
|
+
header_params,
|
|
1940
|
+
body=body_params,
|
|
1941
|
+
post_params=form_params,
|
|
1942
|
+
files=local_var_files,
|
|
1943
|
+
response_type='V1Model', # noqa: E501
|
|
1944
|
+
auth_settings=auth_settings,
|
|
1945
|
+
async_req=params.get('async_req'),
|
|
1946
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
1947
|
+
_preload_content=params.get('_preload_content', True),
|
|
1948
|
+
_request_timeout=params.get('_request_timeout'),
|
|
1949
|
+
collection_formats=collection_formats)
|
|
1950
|
+
|
|
1830
1951
|
def models_store_update_model(self, body: 'ModelsModelIdBody', project_id: 'str', model_id: 'str', **kwargs) -> 'V1Model': # noqa: E501
|
|
1831
|
-
"""
|
|
1952
|
+
"""UpdateModel updates the model, in particular the model's name. # noqa: E501
|
|
1832
1953
|
|
|
1833
1954
|
This method makes a synchronous HTTP request by default. To make an
|
|
1834
1955
|
asynchronous HTTP request, please pass async_req=True
|
|
@@ -1851,7 +1972,7 @@ class ModelsStoreApi(object):
|
|
|
1851
1972
|
return data
|
|
1852
1973
|
|
|
1853
1974
|
def models_store_update_model_with_http_info(self, body: 'ModelsModelIdBody', project_id: 'str', model_id: 'str', **kwargs) -> 'V1Model': # noqa: E501
|
|
1854
|
-
"""
|
|
1975
|
+
"""UpdateModel updates the model, in particular the model's name. # noqa: E501
|
|
1855
1976
|
|
|
1856
1977
|
This method makes a synchronous HTTP request by default. To make an
|
|
1857
1978
|
asynchronous HTTP request, please pass async_req=True
|
|
@@ -1940,8 +2061,129 @@ class ModelsStoreApi(object):
|
|
|
1940
2061
|
_request_timeout=params.get('_request_timeout'),
|
|
1941
2062
|
collection_formats=collection_formats)
|
|
1942
2063
|
|
|
2064
|
+
def models_store_update_model_version(self, body: 'VersionsVersionBody', project_id: 'str', model_id: 'str', version: 'str', **kwargs) -> 'V1ModelVersionArchive': # noqa: E501
|
|
2065
|
+
"""UpdateModelVersion updates the model version, in particular the model version's name. # noqa: E501
|
|
2066
|
+
|
|
2067
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
2068
|
+
asynchronous HTTP request, please pass async_req=True
|
|
2069
|
+
>>> thread = api.models_store_update_model_version(body, project_id, model_id, version, async_req=True)
|
|
2070
|
+
>>> result = thread.get()
|
|
2071
|
+
|
|
2072
|
+
:param async_req bool
|
|
2073
|
+
:param VersionsVersionBody body: (required)
|
|
2074
|
+
:param str project_id: (required)
|
|
2075
|
+
:param str model_id: (required)
|
|
2076
|
+
:param str version: (required)
|
|
2077
|
+
:return: V1ModelVersionArchive
|
|
2078
|
+
If the method is called asynchronously,
|
|
2079
|
+
returns the request thread.
|
|
2080
|
+
"""
|
|
2081
|
+
kwargs['_return_http_data_only'] = True
|
|
2082
|
+
if kwargs.get('async_req'):
|
|
2083
|
+
return self.models_store_update_model_version_with_http_info(body, project_id, model_id, version, **kwargs) # noqa: E501
|
|
2084
|
+
else:
|
|
2085
|
+
(data) = self.models_store_update_model_version_with_http_info(body, project_id, model_id, version, **kwargs) # noqa: E501
|
|
2086
|
+
return data
|
|
2087
|
+
|
|
2088
|
+
def models_store_update_model_version_with_http_info(self, body: 'VersionsVersionBody', project_id: 'str', model_id: 'str', version: 'str', **kwargs) -> 'V1ModelVersionArchive': # noqa: E501
|
|
2089
|
+
"""UpdateModelVersion updates the model version, in particular the model version's name. # noqa: E501
|
|
2090
|
+
|
|
2091
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
2092
|
+
asynchronous HTTP request, please pass async_req=True
|
|
2093
|
+
>>> thread = api.models_store_update_model_version_with_http_info(body, project_id, model_id, version, async_req=True)
|
|
2094
|
+
>>> result = thread.get()
|
|
2095
|
+
|
|
2096
|
+
:param async_req bool
|
|
2097
|
+
:param VersionsVersionBody body: (required)
|
|
2098
|
+
:param str project_id: (required)
|
|
2099
|
+
:param str model_id: (required)
|
|
2100
|
+
:param str version: (required)
|
|
2101
|
+
:return: V1ModelVersionArchive
|
|
2102
|
+
If the method is called asynchronously,
|
|
2103
|
+
returns the request thread.
|
|
2104
|
+
"""
|
|
2105
|
+
|
|
2106
|
+
all_params = ['body', 'project_id', 'model_id', 'version'] # noqa: E501
|
|
2107
|
+
all_params.append('async_req')
|
|
2108
|
+
all_params.append('_return_http_data_only')
|
|
2109
|
+
all_params.append('_preload_content')
|
|
2110
|
+
all_params.append('_request_timeout')
|
|
2111
|
+
|
|
2112
|
+
params = locals()
|
|
2113
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
2114
|
+
if key not in all_params:
|
|
2115
|
+
raise TypeError(
|
|
2116
|
+
"Got an unexpected keyword argument '%s'"
|
|
2117
|
+
" to method models_store_update_model_version" % key
|
|
2118
|
+
)
|
|
2119
|
+
params[key] = val
|
|
2120
|
+
del params['kwargs']
|
|
2121
|
+
# verify the required parameter 'body' is set
|
|
2122
|
+
if ('body' not in params or
|
|
2123
|
+
params['body'] is None):
|
|
2124
|
+
raise ValueError("Missing the required parameter `body` when calling `models_store_update_model_version`") # noqa: E501
|
|
2125
|
+
# verify the required parameter 'project_id' is set
|
|
2126
|
+
if ('project_id' not in params or
|
|
2127
|
+
params['project_id'] is None):
|
|
2128
|
+
raise ValueError("Missing the required parameter `project_id` when calling `models_store_update_model_version`") # noqa: E501
|
|
2129
|
+
# verify the required parameter 'model_id' is set
|
|
2130
|
+
if ('model_id' not in params or
|
|
2131
|
+
params['model_id'] is None):
|
|
2132
|
+
raise ValueError("Missing the required parameter `model_id` when calling `models_store_update_model_version`") # noqa: E501
|
|
2133
|
+
# verify the required parameter 'version' is set
|
|
2134
|
+
if ('version' not in params or
|
|
2135
|
+
params['version'] is None):
|
|
2136
|
+
raise ValueError("Missing the required parameter `version` when calling `models_store_update_model_version`") # noqa: E501
|
|
2137
|
+
|
|
2138
|
+
collection_formats = {}
|
|
2139
|
+
|
|
2140
|
+
path_params = {}
|
|
2141
|
+
if 'project_id' in params:
|
|
2142
|
+
path_params['projectId'] = params['project_id'] # noqa: E501
|
|
2143
|
+
if 'model_id' in params:
|
|
2144
|
+
path_params['modelId'] = params['model_id'] # noqa: E501
|
|
2145
|
+
if 'version' in params:
|
|
2146
|
+
path_params['version'] = params['version'] # noqa: E501
|
|
2147
|
+
|
|
2148
|
+
query_params = []
|
|
2149
|
+
|
|
2150
|
+
header_params = {}
|
|
2151
|
+
|
|
2152
|
+
form_params = []
|
|
2153
|
+
local_var_files = {}
|
|
2154
|
+
|
|
2155
|
+
body_params = None
|
|
2156
|
+
if 'body' in params:
|
|
2157
|
+
body_params = params['body']
|
|
2158
|
+
# HTTP header `Accept`
|
|
2159
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
2160
|
+
['application/json']) # noqa: E501
|
|
2161
|
+
|
|
2162
|
+
# HTTP header `Content-Type`
|
|
2163
|
+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
2164
|
+
['application/json']) # noqa: E501
|
|
2165
|
+
|
|
2166
|
+
# Authentication setting
|
|
2167
|
+
auth_settings = [] # noqa: E501
|
|
2168
|
+
|
|
2169
|
+
return self.api_client.call_api(
|
|
2170
|
+
'/v1/projects/{projectId}/models/{modelId}/versions/{version}', 'PUT',
|
|
2171
|
+
path_params,
|
|
2172
|
+
query_params,
|
|
2173
|
+
header_params,
|
|
2174
|
+
body=body_params,
|
|
2175
|
+
post_params=form_params,
|
|
2176
|
+
files=local_var_files,
|
|
2177
|
+
response_type='V1ModelVersionArchive', # noqa: E501
|
|
2178
|
+
auth_settings=auth_settings,
|
|
2179
|
+
async_req=params.get('async_req'),
|
|
2180
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
2181
|
+
_preload_content=params.get('_preload_content', True),
|
|
2182
|
+
_request_timeout=params.get('_request_timeout'),
|
|
2183
|
+
collection_formats=collection_formats)
|
|
2184
|
+
|
|
1943
2185
|
def models_store_update_model_visibility(self, body: 'ModelIdVisibilityBody', project_id: 'str', model_id: 'str', **kwargs) -> 'V1UpdateModelVisibilityResponse': # noqa: E501
|
|
1944
|
-
"""
|
|
2186
|
+
"""UpdateModelVisibility updates the model version, mainly switch between public and private # noqa: E501
|
|
1945
2187
|
|
|
1946
2188
|
This method makes a synchronous HTTP request by default. To make an
|
|
1947
2189
|
asynchronous HTTP request, please pass async_req=True
|
|
@@ -1964,7 +2206,7 @@ class ModelsStoreApi(object):
|
|
|
1964
2206
|
return data
|
|
1965
2207
|
|
|
1966
2208
|
def models_store_update_model_visibility_with_http_info(self, body: 'ModelIdVisibilityBody', project_id: 'str', model_id: 'str', **kwargs) -> 'V1UpdateModelVisibilityResponse': # noqa: E501
|
|
1967
|
-
"""
|
|
2209
|
+
"""UpdateModelVisibility updates the model version, mainly switch between public and private # noqa: E501
|
|
1968
2210
|
|
|
1969
2211
|
This method makes a synchronous HTTP request by default. To make an
|
|
1970
2212
|
asynchronous HTTP request, please pass async_req=True
|
|
@@ -290,7 +290,6 @@ 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
|
|
294
293
|
from lightning_sdk.lightning_cloud.openapi.models.v1_delete_conversation_response import V1DeleteConversationResponse
|
|
295
294
|
from lightning_sdk.lightning_cloud.openapi.models.v1_delete_data_connection_response import V1DeleteDataConnectionResponse
|
|
296
295
|
from lightning_sdk.lightning_cloud.openapi.models.v1_delete_dataset_response import V1DeleteDatasetResponse
|
|
@@ -305,6 +304,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_delete_lightningapp_instanc
|
|
|
305
304
|
from lightning_sdk.lightning_cloud.openapi.models.v1_delete_lightningapp_instance_response import V1DeleteLightningappInstanceResponse
|
|
306
305
|
from lightning_sdk.lightning_cloud.openapi.models.v1_delete_lightningwork_response import V1DeleteLightningworkResponse
|
|
307
306
|
from lightning_sdk.lightning_cloud.openapi.models.v1_delete_lit_page_response import V1DeleteLitPageResponse
|
|
307
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_delete_lit_repository_response import V1DeleteLitRepositoryResponse
|
|
308
308
|
from lightning_sdk.lightning_cloud.openapi.models.v1_delete_logger_artifact_response import V1DeleteLoggerArtifactResponse
|
|
309
309
|
from lightning_sdk.lightning_cloud.openapi.models.v1_delete_managed_endpoint_response import V1DeleteManagedEndpointResponse
|
|
310
310
|
from lightning_sdk.lightning_cloud.openapi.models.v1_delete_metrics_stream_response import V1DeleteMetricsStreamResponse
|
|
@@ -757,6 +757,8 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_vultr_direct_v1 import V1Vu
|
|
|
757
757
|
from lightning_sdk.lightning_cloud.openapi.models.v1_work import V1Work
|
|
758
758
|
from lightning_sdk.lightning_cloud.openapi.models.validate import Validate
|
|
759
759
|
from lightning_sdk.lightning_cloud.openapi.models.validateautojoindomain_domain_body import ValidateautojoindomainDomainBody
|
|
760
|
+
from lightning_sdk.lightning_cloud.openapi.models.version_default_body import VersionDefaultBody
|
|
760
761
|
from lightning_sdk.lightning_cloud.openapi.models.version_uploads_body import VersionUploadsBody
|
|
761
762
|
from lightning_sdk.lightning_cloud.openapi.models.versions_id_body import VersionsIdBody
|
|
763
|
+
from lightning_sdk.lightning_cloud.openapi.models.versions_version_body import VersionsVersionBody
|
|
762
764
|
from lightning_sdk.lightning_cloud.openapi.models.works_id_body import WorksIdBody
|
|
@@ -41,6 +41,7 @@ class V1AWSDirectV1(object):
|
|
|
41
41
|
and the value is json key in definition.
|
|
42
42
|
"""
|
|
43
43
|
swagger_types = {
|
|
44
|
+
'ami_owner_id': 'str',
|
|
44
45
|
'bucket_endpoint': 'str',
|
|
45
46
|
'bucket_name': 'str',
|
|
46
47
|
'cloud_formation_disabled': 'bool',
|
|
@@ -55,6 +56,7 @@ class V1AWSDirectV1(object):
|
|
|
55
56
|
}
|
|
56
57
|
|
|
57
58
|
attribute_map = {
|
|
59
|
+
'ami_owner_id': 'amiOwnerId',
|
|
58
60
|
'bucket_endpoint': 'bucketEndpoint',
|
|
59
61
|
'bucket_name': 'bucketName',
|
|
60
62
|
'cloud_formation_disabled': 'cloudFormationDisabled',
|
|
@@ -68,8 +70,9 @@ class V1AWSDirectV1(object):
|
|
|
68
70
|
'use_launch_templates': 'useLaunchTemplates'
|
|
69
71
|
}
|
|
70
72
|
|
|
71
|
-
def __init__(self, bucket_endpoint: 'str' =None, bucket_name: 'str' =None, cloud_formation_disabled: 'bool' =None, efs_enabled: 'bool' =None, external_id: 'str' =None, primary_region: 'str' =None, regional_load_balancers: 'list[V1RegionalLoadBalancer]' =None, regions: 'list[str]' =None, role_arn: 'str' =None, source_cidr_ips: 'list[str]' =None, use_launch_templates: 'bool' =None): # noqa: E501
|
|
73
|
+
def __init__(self, ami_owner_id: 'str' =None, bucket_endpoint: 'str' =None, bucket_name: 'str' =None, cloud_formation_disabled: 'bool' =None, efs_enabled: 'bool' =None, external_id: 'str' =None, primary_region: 'str' =None, regional_load_balancers: 'list[V1RegionalLoadBalancer]' =None, regions: 'list[str]' =None, role_arn: 'str' =None, source_cidr_ips: 'list[str]' =None, use_launch_templates: 'bool' =None): # noqa: E501
|
|
72
74
|
"""V1AWSDirectV1 - a model defined in Swagger""" # noqa: E501
|
|
75
|
+
self._ami_owner_id = None
|
|
73
76
|
self._bucket_endpoint = None
|
|
74
77
|
self._bucket_name = None
|
|
75
78
|
self._cloud_formation_disabled = None
|
|
@@ -82,6 +85,8 @@ class V1AWSDirectV1(object):
|
|
|
82
85
|
self._source_cidr_ips = None
|
|
83
86
|
self._use_launch_templates = None
|
|
84
87
|
self.discriminator = None
|
|
88
|
+
if ami_owner_id is not None:
|
|
89
|
+
self.ami_owner_id = ami_owner_id
|
|
85
90
|
if bucket_endpoint is not None:
|
|
86
91
|
self.bucket_endpoint = bucket_endpoint
|
|
87
92
|
if bucket_name is not None:
|
|
@@ -105,6 +110,27 @@ class V1AWSDirectV1(object):
|
|
|
105
110
|
if use_launch_templates is not None:
|
|
106
111
|
self.use_launch_templates = use_launch_templates
|
|
107
112
|
|
|
113
|
+
@property
|
|
114
|
+
def ami_owner_id(self) -> 'str':
|
|
115
|
+
"""Gets the ami_owner_id of this V1AWSDirectV1. # noqa: E501
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
:return: The ami_owner_id of this V1AWSDirectV1. # noqa: E501
|
|
119
|
+
:rtype: str
|
|
120
|
+
"""
|
|
121
|
+
return self._ami_owner_id
|
|
122
|
+
|
|
123
|
+
@ami_owner_id.setter
|
|
124
|
+
def ami_owner_id(self, ami_owner_id: 'str'):
|
|
125
|
+
"""Sets the ami_owner_id of this V1AWSDirectV1.
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
:param ami_owner_id: The ami_owner_id of this V1AWSDirectV1. # noqa: E501
|
|
129
|
+
:type: str
|
|
130
|
+
"""
|
|
131
|
+
|
|
132
|
+
self._ami_owner_id = ami_owner_id
|
|
133
|
+
|
|
108
134
|
@property
|
|
109
135
|
def bucket_endpoint(self) -> 'str':
|
|
110
136
|
"""Gets the bucket_endpoint of this V1AWSDirectV1. # noqa: E501
|