lightning-sdk 0.1.30__py3-none-any.whl → 0.1.31__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.
Files changed (31) hide show
  1. lightning_sdk/__init__.py +1 -1
  2. lightning_sdk/api/teamspace_api.py +35 -5
  3. lightning_sdk/lightning_cloud/openapi/__init__.py +4 -0
  4. lightning_sdk/lightning_cloud/openapi/api/cloud_space_service_api.py +4 -4
  5. lightning_sdk/lightning_cloud/openapi/api/cluster_service_api.py +5 -5
  6. lightning_sdk/lightning_cloud/openapi/api/deployment_templates_service_api.py +105 -0
  7. lightning_sdk/lightning_cloud/openapi/api/jobs_service_api.py +5 -1
  8. lightning_sdk/lightning_cloud/openapi/api/models_store_api.py +118 -2
  9. lightning_sdk/lightning_cloud/openapi/models/__init__.py +4 -0
  10. lightning_sdk/lightning_cloud/openapi/models/cluster_id_capacityblock_body.py +15 -15
  11. lightning_sdk/lightning_cloud/openapi/models/deployments_id_body.py +27 -1
  12. lightning_sdk/lightning_cloud/openapi/models/deploymenttemplates_id_body.py +43 -17
  13. lightning_sdk/lightning_cloud/openapi/models/id_engage_body.py +3 -29
  14. lightning_sdk/lightning_cloud/openapi/models/id_engage_body1.py +149 -0
  15. lightning_sdk/lightning_cloud/openapi/models/model_id_versions_body.py +123 -0
  16. lightning_sdk/lightning_cloud/openapi/models/project_id_models_body.py +27 -1
  17. lightning_sdk/lightning_cloud/openapi/models/v1_create_deployment_template_request.py +17 -17
  18. lightning_sdk/lightning_cloud/openapi/models/v1_deployment.py +27 -1
  19. lightning_sdk/lightning_cloud/openapi/models/v1_deployment_template.py +17 -17
  20. lightning_sdk/lightning_cloud/openapi/models/v1_deployment_template_engagement_response.py +97 -0
  21. lightning_sdk/lightning_cloud/openapi/models/v1_deployment_template_parameter_placement.py +2 -0
  22. lightning_sdk/lightning_cloud/openapi/models/v1_model_version_archive.py +27 -1
  23. lightning_sdk/lightning_cloud/openapi/models/v1_parameterization_spec.py +227 -0
  24. lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +27 -27
  25. lightning_sdk/teamspace.py +11 -0
  26. {lightning_sdk-0.1.30.dist-info → lightning_sdk-0.1.31.dist-info}/METADATA +1 -1
  27. {lightning_sdk-0.1.30.dist-info → lightning_sdk-0.1.31.dist-info}/RECORD +31 -27
  28. {lightning_sdk-0.1.30.dist-info → lightning_sdk-0.1.31.dist-info}/LICENSE +0 -0
  29. {lightning_sdk-0.1.30.dist-info → lightning_sdk-0.1.31.dist-info}/WHEEL +0 -0
  30. {lightning_sdk-0.1.30.dist-info → lightning_sdk-0.1.31.dist-info}/entry_points.txt +0 -0
  31. {lightning_sdk-0.1.30.dist-info → lightning_sdk-0.1.31.dist-info}/top_level.txt +0 -0
lightning_sdk/__init__.py CHANGED
@@ -25,5 +25,5 @@ __all__ = [
25
25
  "Agent",
26
26
  ]
27
27
 
28
- __version__ = "0.1.30"
28
+ __version__ = "0.1.31"
29
29
  _check_version_and_prompt_upgrade(__version__)
@@ -6,6 +6,7 @@ from typing import Dict, List, Optional
6
6
  from lightning_sdk.api.utils import _download_model_files, _DummyBody, _ModelFileUploader
7
7
  from lightning_sdk.lightning_cloud.login import Auth
8
8
  from lightning_sdk.lightning_cloud.openapi import (
9
+ ModelIdVersionsBody,
9
10
  ModelsStoreApi,
10
11
  ProjectIdAgentsBody,
11
12
  ProjectIdModelsBody,
@@ -28,6 +29,7 @@ class TeamspaceApi:
28
29
 
29
30
  def __init__(self) -> None:
30
31
  self._client = LightningClient(max_tries=7)
32
+ self._models: Optional[ModelsStoreApi] = None
31
33
 
32
34
  def get_teamspace(self, name: str, owner_id: str) -> V1Project:
33
35
  """Get the current teamspace from the owner."""
@@ -165,9 +167,36 @@ class TeamspaceApi:
165
167
  teamspace_id: str,
166
168
  cluster_id: str,
167
169
  ) -> V1ModelVersionArchive:
168
- api = ModelsStoreApi(self._client.api_client)
169
- body = ProjectIdModelsBody(cluster_id=cluster_id, metadata=metadata, name=name, private=private)
170
- return api.models_store_create_model(body, project_id=teamspace_id)
170
+ if not self._models:
171
+ self._models = ModelsStoreApi(self._client.api_client)
172
+ # ask if such model already exists by listing models with specific name
173
+ models = self._models.models_store_list_models(project_id=teamspace_id, name=name).models
174
+ if len(models) == 0:
175
+ return self._models.models_store_create_model(
176
+ body=ProjectIdModelsBody(cluster_id=cluster_id, metadata=metadata, name=name, private=private),
177
+ project_id=teamspace_id,
178
+ )
179
+ assert len(models) == 1, "Multiple models with the same name found"
180
+ return self._models.models_store_create_model_version(
181
+ body=ModelIdVersionsBody(cluster_id=cluster_id),
182
+ project_id=teamspace_id,
183
+ model_id=models[0].id,
184
+ )
185
+
186
+ def delete_model(self, name: str, version: Optional[str], teamspace_id: str) -> None:
187
+ """Delete a model or a version from the model store."""
188
+ if not self._models:
189
+ self._models = ModelsStoreApi(self._client.api_client)
190
+ models = self._models.models_store_list_models(project_id=teamspace_id, name=name).models
191
+ assert len(models) == 1, "Multiple models with the same name found"
192
+ model_id = models[0].id
193
+ # decide if delete only version of whole model
194
+ if version:
195
+ if version == "latest":
196
+ version = models[0].latest_version
197
+ self._models.models_store_delete_model_version(project_id=teamspace_id, model_id=model_id, version=version)
198
+ else:
199
+ self._models.models_store_delete_model(project_id=teamspace_id, model_id=model_id)
171
200
 
172
201
  def upload_model_file(
173
202
  self,
@@ -213,8 +242,9 @@ class TeamspaceApi:
213
242
  )
214
243
 
215
244
  def complete_model_upload(self, model_id: str, version: str, teamspace_id: str) -> None:
216
- api = ModelsStoreApi(self._client.api_client)
217
- api.models_store_complete_model_upload(
245
+ if not self._models:
246
+ self._models = ModelsStoreApi(self._client.api_client)
247
+ self._models.models_store_complete_model_upload(
218
248
  body=_DummyBody(),
219
249
  project_id=teamspace_id,
220
250
  model_id=model_id,
@@ -104,6 +104,7 @@ from lightning_sdk.lightning_cloud.openapi.models.id_codeconfig_body import IdCo
104
104
  from lightning_sdk.lightning_cloud.openapi.models.id_collaborate_body import IdCollaborateBody
105
105
  from lightning_sdk.lightning_cloud.openapi.models.id_complete_body import IdCompleteBody
106
106
  from lightning_sdk.lightning_cloud.openapi.models.id_engage_body import IdEngageBody
107
+ from lightning_sdk.lightning_cloud.openapi.models.id_engage_body1 import IdEngageBody1
107
108
  from lightning_sdk.lightning_cloud.openapi.models.id_execute_body import IdExecuteBody
108
109
  from lightning_sdk.lightning_cloud.openapi.models.id_execute_body1 import IdExecuteBody1
109
110
  from lightning_sdk.lightning_cloud.openapi.models.id_fork_body import IdForkBody
@@ -133,6 +134,7 @@ from lightning_sdk.lightning_cloud.openapi.models.metrics_stream_id_loggerartifa
133
134
  from lightning_sdk.lightning_cloud.openapi.models.metricsstream_create_body import MetricsstreamCreateBody
134
135
  from lightning_sdk.lightning_cloud.openapi.models.metricsstream_delete_body import MetricsstreamDeleteBody
135
136
  from lightning_sdk.lightning_cloud.openapi.models.metricsstream_id_body import MetricsstreamIdBody
137
+ from lightning_sdk.lightning_cloud.openapi.models.model_id_versions_body import ModelIdVersionsBody
136
138
  from lightning_sdk.lightning_cloud.openapi.models.models_model_id_body import ModelsModelIdBody
137
139
  from lightning_sdk.lightning_cloud.openapi.models.multipartuploads_upload_id_body import MultipartuploadsUploadIdBody
138
140
  from lightning_sdk.lightning_cloud.openapi.models.org_id_memberships_body import OrgIdMembershipsBody
@@ -359,6 +361,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_deployment_state import V1D
359
361
  from lightning_sdk.lightning_cloud.openapi.models.v1_deployment_status import V1DeploymentStatus
360
362
  from lightning_sdk.lightning_cloud.openapi.models.v1_deployment_strategy import V1DeploymentStrategy
361
363
  from lightning_sdk.lightning_cloud.openapi.models.v1_deployment_template import V1DeploymentTemplate
364
+ from lightning_sdk.lightning_cloud.openapi.models.v1_deployment_template_engagement_response import V1DeploymentTemplateEngagementResponse
362
365
  from lightning_sdk.lightning_cloud.openapi.models.v1_deployment_template_gallery_response import V1DeploymentTemplateGalleryResponse
363
366
  from lightning_sdk.lightning_cloud.openapi.models.v1_deployment_template_parameter import V1DeploymentTemplateParameter
364
367
  from lightning_sdk.lightning_cloud.openapi.models.v1_deployment_template_parameter_placement import V1DeploymentTemplateParameterPlacement
@@ -591,6 +594,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_org_role import V1OrgRole
591
594
  from lightning_sdk.lightning_cloud.openapi.models.v1_organization import V1Organization
592
595
  from lightning_sdk.lightning_cloud.openapi.models.v1_owner_type import V1OwnerType
593
596
  from lightning_sdk.lightning_cloud.openapi.models.v1_package_manager import V1PackageManager
597
+ from lightning_sdk.lightning_cloud.openapi.models.v1_parameterization_spec import V1ParameterizationSpec
594
598
  from lightning_sdk.lightning_cloud.openapi.models.v1_path_telemetry import V1PathTelemetry
595
599
  from lightning_sdk.lightning_cloud.openapi.models.v1_phase_type import V1PhaseType
596
600
  from lightning_sdk.lightning_cloud.openapi.models.v1_plugin import V1Plugin
@@ -1955,7 +1955,7 @@ class CloudSpaceServiceApi(object):
1955
1955
  _request_timeout=params.get('_request_timeout'),
1956
1956
  collection_formats=collection_formats)
1957
1957
 
1958
- def cloud_space_service_engage_cloud_space(self, body: 'IdEngageBody', project_id: 'str', id: 'str', **kwargs) -> 'V1CloudSpaceEngagementResponse': # noqa: E501
1958
+ def cloud_space_service_engage_cloud_space(self, body: 'IdEngageBody1', project_id: 'str', id: 'str', **kwargs) -> 'V1CloudSpaceEngagementResponse': # noqa: E501
1959
1959
  """cloud_space_service_engage_cloud_space # noqa: E501
1960
1960
 
1961
1961
  This method makes a synchronous HTTP request by default. To make an
@@ -1964,7 +1964,7 @@ class CloudSpaceServiceApi(object):
1964
1964
  >>> result = thread.get()
1965
1965
 
1966
1966
  :param async_req bool
1967
- :param IdEngageBody body: (required)
1967
+ :param IdEngageBody1 body: (required)
1968
1968
  :param str project_id: (required)
1969
1969
  :param str id: (required)
1970
1970
  :return: V1CloudSpaceEngagementResponse
@@ -1978,7 +1978,7 @@ class CloudSpaceServiceApi(object):
1978
1978
  (data) = self.cloud_space_service_engage_cloud_space_with_http_info(body, project_id, id, **kwargs) # noqa: E501
1979
1979
  return data
1980
1980
 
1981
- def cloud_space_service_engage_cloud_space_with_http_info(self, body: 'IdEngageBody', project_id: 'str', id: 'str', **kwargs) -> 'V1CloudSpaceEngagementResponse': # noqa: E501
1981
+ def cloud_space_service_engage_cloud_space_with_http_info(self, body: 'IdEngageBody1', project_id: 'str', id: 'str', **kwargs) -> 'V1CloudSpaceEngagementResponse': # noqa: E501
1982
1982
  """cloud_space_service_engage_cloud_space # noqa: E501
1983
1983
 
1984
1984
  This method makes a synchronous HTTP request by default. To make an
@@ -1987,7 +1987,7 @@ class CloudSpaceServiceApi(object):
1987
1987
  >>> result = thread.get()
1988
1988
 
1989
1989
  :param async_req bool
1990
- :param IdEngageBody body: (required)
1990
+ :param IdEngageBody1 body: (required)
1991
1991
  :param str project_id: (required)
1992
1992
  :param str id: (required)
1993
1993
  :return: V1CloudSpaceEngagementResponse
@@ -1106,10 +1106,10 @@ class ClusterServiceApi(object):
1106
1106
  :param str cluster_id: (required)
1107
1107
  :param str instance_type:
1108
1108
  :param int instance_count:
1109
- :param int capacity_block_duration_hours:
1110
1109
  :param datetime start_date:
1111
1110
  :param str timezone:
1112
1111
  :param str org_id:
1112
+ :param int capacity_block_duration_days:
1113
1113
  :return: V1FindCapacityBlockOfferingResponse
1114
1114
  If the method is called asynchronously,
1115
1115
  returns the request thread.
@@ -1134,16 +1134,16 @@ class ClusterServiceApi(object):
1134
1134
  :param str cluster_id: (required)
1135
1135
  :param str instance_type:
1136
1136
  :param int instance_count:
1137
- :param int capacity_block_duration_hours:
1138
1137
  :param datetime start_date:
1139
1138
  :param str timezone:
1140
1139
  :param str org_id:
1140
+ :param int capacity_block_duration_days:
1141
1141
  :return: V1FindCapacityBlockOfferingResponse
1142
1142
  If the method is called asynchronously,
1143
1143
  returns the request thread.
1144
1144
  """
1145
1145
 
1146
- all_params = ['project_id', 'cluster_id', 'instance_type', 'instance_count', 'capacity_block_duration_hours', 'start_date', 'timezone', 'org_id'] # noqa: E501
1146
+ all_params = ['project_id', 'cluster_id', 'instance_type', 'instance_count', 'start_date', 'timezone', 'org_id', 'capacity_block_duration_days'] # noqa: E501
1147
1147
  all_params.append('async_req')
1148
1148
  all_params.append('_return_http_data_only')
1149
1149
  all_params.append('_preload_content')
@@ -1180,14 +1180,14 @@ class ClusterServiceApi(object):
1180
1180
  query_params.append(('instanceType', params['instance_type'])) # noqa: E501
1181
1181
  if 'instance_count' in params:
1182
1182
  query_params.append(('instanceCount', params['instance_count'])) # noqa: E501
1183
- if 'capacity_block_duration_hours' in params:
1184
- query_params.append(('capacityBlockDurationHours', params['capacity_block_duration_hours'])) # noqa: E501
1185
1183
  if 'start_date' in params:
1186
1184
  query_params.append(('startDate', params['start_date'])) # noqa: E501
1187
1185
  if 'timezone' in params:
1188
1186
  query_params.append(('timezone', params['timezone'])) # noqa: E501
1189
1187
  if 'org_id' in params:
1190
1188
  query_params.append(('orgId', params['org_id'])) # noqa: E501
1189
+ if 'capacity_block_duration_days' in params:
1190
+ query_params.append(('capacityBlockDurationDays', params['capacity_block_duration_days'])) # noqa: E501
1191
1191
 
1192
1192
  header_params = {}
1193
1193
 
@@ -140,6 +140,111 @@ class DeploymentTemplatesServiceApi(object):
140
140
  _request_timeout=params.get('_request_timeout'),
141
141
  collection_formats=collection_formats)
142
142
 
143
+ def deployment_templates_service_engage_deployment_template(self, body: 'IdEngageBody', id: 'str', **kwargs) -> 'V1DeploymentTemplateEngagementResponse': # noqa: E501
144
+ """deployment_templates_service_engage_deployment_template # noqa: E501
145
+
146
+ This method makes a synchronous HTTP request by default. To make an
147
+ asynchronous HTTP request, please pass async_req=True
148
+ >>> thread = api.deployment_templates_service_engage_deployment_template(body, id, async_req=True)
149
+ >>> result = thread.get()
150
+
151
+ :param async_req bool
152
+ :param IdEngageBody body: (required)
153
+ :param str id: (required)
154
+ :return: V1DeploymentTemplateEngagementResponse
155
+ If the method is called asynchronously,
156
+ returns the request thread.
157
+ """
158
+ kwargs['_return_http_data_only'] = True
159
+ if kwargs.get('async_req'):
160
+ return self.deployment_templates_service_engage_deployment_template_with_http_info(body, id, **kwargs) # noqa: E501
161
+ else:
162
+ (data) = self.deployment_templates_service_engage_deployment_template_with_http_info(body, id, **kwargs) # noqa: E501
163
+ return data
164
+
165
+ def deployment_templates_service_engage_deployment_template_with_http_info(self, body: 'IdEngageBody', id: 'str', **kwargs) -> 'V1DeploymentTemplateEngagementResponse': # noqa: E501
166
+ """deployment_templates_service_engage_deployment_template # noqa: E501
167
+
168
+ This method makes a synchronous HTTP request by default. To make an
169
+ asynchronous HTTP request, please pass async_req=True
170
+ >>> thread = api.deployment_templates_service_engage_deployment_template_with_http_info(body, id, async_req=True)
171
+ >>> result = thread.get()
172
+
173
+ :param async_req bool
174
+ :param IdEngageBody body: (required)
175
+ :param str id: (required)
176
+ :return: V1DeploymentTemplateEngagementResponse
177
+ If the method is called asynchronously,
178
+ returns the request thread.
179
+ """
180
+
181
+ all_params = ['body', 'id'] # noqa: E501
182
+ all_params.append('async_req')
183
+ all_params.append('_return_http_data_only')
184
+ all_params.append('_preload_content')
185
+ all_params.append('_request_timeout')
186
+
187
+ params = locals()
188
+ for key, val in six.iteritems(params['kwargs']):
189
+ if key not in all_params:
190
+ raise TypeError(
191
+ "Got an unexpected keyword argument '%s'"
192
+ " to method deployment_templates_service_engage_deployment_template" % key
193
+ )
194
+ params[key] = val
195
+ del params['kwargs']
196
+ # verify the required parameter 'body' is set
197
+ if ('body' not in params or
198
+ params['body'] is None):
199
+ raise ValueError("Missing the required parameter `body` when calling `deployment_templates_service_engage_deployment_template`") # noqa: E501
200
+ # verify the required parameter 'id' is set
201
+ if ('id' not in params or
202
+ params['id'] is None):
203
+ raise ValueError("Missing the required parameter `id` when calling `deployment_templates_service_engage_deployment_template`") # noqa: E501
204
+
205
+ collection_formats = {}
206
+
207
+ path_params = {}
208
+ if 'id' in params:
209
+ path_params['id'] = params['id'] # noqa: E501
210
+
211
+ query_params = []
212
+
213
+ header_params = {}
214
+
215
+ form_params = []
216
+ local_var_files = {}
217
+
218
+ body_params = None
219
+ if 'body' in params:
220
+ body_params = params['body']
221
+ # HTTP header `Accept`
222
+ header_params['Accept'] = self.api_client.select_header_accept(
223
+ ['application/json']) # noqa: E501
224
+
225
+ # HTTP header `Content-Type`
226
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
227
+ ['application/json']) # noqa: E501
228
+
229
+ # Authentication setting
230
+ auth_settings = [] # noqa: E501
231
+
232
+ return self.api_client.call_api(
233
+ '/v1/deployment-templates/{id}/engage', 'PUT',
234
+ path_params,
235
+ query_params,
236
+ header_params,
237
+ body=body_params,
238
+ post_params=form_params,
239
+ files=local_var_files,
240
+ response_type='V1DeploymentTemplateEngagementResponse', # noqa: E501
241
+ auth_settings=auth_settings,
242
+ async_req=params.get('async_req'),
243
+ _return_http_data_only=params.get('_return_http_data_only'),
244
+ _preload_content=params.get('_preload_content', True),
245
+ _request_timeout=params.get('_request_timeout'),
246
+ collection_formats=collection_formats)
247
+
143
248
  def deployment_templates_service_get_deployment_template(self, id: 'str', **kwargs) -> 'V1DeploymentTemplate': # noqa: E501
144
249
  """deployment_templates_service_get_deployment_template # noqa: E501
145
250
 
@@ -365,6 +365,7 @@ class JobsServiceApi(object):
365
365
  :param async_req bool
366
366
  :param str project_id: (required)
367
367
  :param str id: (required)
368
+ :param bool delete_templates:
368
369
  :return: V1DeleteDeploymentResponse
369
370
  If the method is called asynchronously,
370
371
  returns the request thread.
@@ -387,12 +388,13 @@ class JobsServiceApi(object):
387
388
  :param async_req bool
388
389
  :param str project_id: (required)
389
390
  :param str id: (required)
391
+ :param bool delete_templates:
390
392
  :return: V1DeleteDeploymentResponse
391
393
  If the method is called asynchronously,
392
394
  returns the request thread.
393
395
  """
394
396
 
395
- all_params = ['project_id', 'id'] # noqa: E501
397
+ all_params = ['project_id', 'id', 'delete_templates'] # noqa: E501
396
398
  all_params.append('async_req')
397
399
  all_params.append('_return_http_data_only')
398
400
  all_params.append('_preload_content')
@@ -425,6 +427,8 @@ class JobsServiceApi(object):
425
427
  path_params['id'] = params['id'] # noqa: E501
426
428
 
427
429
  query_params = []
430
+ if 'delete_templates' in params:
431
+ query_params.append(('deleteTemplates', params['delete_templates'])) # noqa: E501
428
432
 
429
433
  header_params = {}
430
434
 
@@ -28,7 +28,6 @@ import six
28
28
  from lightning_sdk.lightning_cloud.openapi.api_client import ApiClient
29
29
 
30
30
  if TYPE_CHECKING:
31
- from datetime import datetime
32
31
  from lightning_sdk.lightning_cloud.openapi.models import *
33
32
 
34
33
  class ModelsStoreApi(object):
@@ -398,6 +397,119 @@ class ModelsStoreApi(object):
398
397
  _request_timeout=params.get('_request_timeout'),
399
398
  collection_formats=collection_formats)
400
399
 
400
+ def models_store_create_model_version(self, body: 'ModelIdVersionsBody', project_id: 'str', model_id: 'str', **kwargs) -> 'V1ModelVersionArchive': # noqa: E501
401
+ """models_store_create_model_version # noqa: E501
402
+
403
+ This method makes a synchronous HTTP request by default. To make an
404
+ asynchronous HTTP request, please pass async_req=True
405
+ >>> thread = api.models_store_create_model_version(body, project_id, model_id, async_req=True)
406
+ >>> result = thread.get()
407
+
408
+ :param async_req bool
409
+ :param ModelIdVersionsBody body: (required)
410
+ :param str project_id: (required)
411
+ :param str model_id: (required)
412
+ :return: V1ModelVersionArchive
413
+ If the method is called asynchronously,
414
+ returns the request thread.
415
+ """
416
+ kwargs['_return_http_data_only'] = True
417
+ if kwargs.get('async_req'):
418
+ return self.models_store_create_model_version_with_http_info(body, project_id, model_id, **kwargs) # noqa: E501
419
+ else:
420
+ (data) = self.models_store_create_model_version_with_http_info(body, project_id, model_id, **kwargs) # noqa: E501
421
+ return data
422
+
423
+ def models_store_create_model_version_with_http_info(self, body: 'ModelIdVersionsBody', project_id: 'str', model_id: 'str', **kwargs) -> 'V1ModelVersionArchive': # noqa: E501
424
+ """models_store_create_model_version # noqa: E501
425
+
426
+ This method makes a synchronous HTTP request by default. To make an
427
+ asynchronous HTTP request, please pass async_req=True
428
+ >>> thread = api.models_store_create_model_version_with_http_info(body, project_id, model_id, async_req=True)
429
+ >>> result = thread.get()
430
+
431
+ :param async_req bool
432
+ :param ModelIdVersionsBody body: (required)
433
+ :param str project_id: (required)
434
+ :param str model_id: (required)
435
+ :return: V1ModelVersionArchive
436
+ If the method is called asynchronously,
437
+ returns the request thread.
438
+ """
439
+
440
+ all_params = ['body', 'project_id', 'model_id'] # noqa: E501
441
+ all_params.append('async_req')
442
+ all_params.append('_return_http_data_only')
443
+ all_params.append('_preload_content')
444
+ all_params.append('_request_timeout')
445
+
446
+ params = locals()
447
+ for key, val in six.iteritems(params['kwargs']):
448
+ if key not in all_params:
449
+ raise TypeError(
450
+ "Got an unexpected keyword argument '%s'"
451
+ " to method models_store_create_model_version" % key
452
+ )
453
+ params[key] = val
454
+ del params['kwargs']
455
+ # verify the required parameter 'body' is set
456
+ if ('body' not in params or
457
+ params['body'] is None):
458
+ raise ValueError("Missing the required parameter `body` when calling `models_store_create_model_version`") # noqa: E501
459
+ # verify the required parameter 'project_id' is set
460
+ if ('project_id' not in params or
461
+ params['project_id'] is None):
462
+ raise ValueError("Missing the required parameter `project_id` when calling `models_store_create_model_version`") # noqa: E501
463
+ # verify the required parameter 'model_id' is set
464
+ if ('model_id' not in params or
465
+ params['model_id'] is None):
466
+ raise ValueError("Missing the required parameter `model_id` when calling `models_store_create_model_version`") # noqa: E501
467
+
468
+ collection_formats = {}
469
+
470
+ path_params = {}
471
+ if 'project_id' in params:
472
+ path_params['projectId'] = params['project_id'] # noqa: E501
473
+ if 'model_id' in params:
474
+ path_params['modelId'] = params['model_id'] # noqa: E501
475
+
476
+ query_params = []
477
+
478
+ header_params = {}
479
+
480
+ form_params = []
481
+ local_var_files = {}
482
+
483
+ body_params = None
484
+ if 'body' in params:
485
+ body_params = params['body']
486
+ # HTTP header `Accept`
487
+ header_params['Accept'] = self.api_client.select_header_accept(
488
+ ['application/json']) # noqa: E501
489
+
490
+ # HTTP header `Content-Type`
491
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
492
+ ['application/json']) # noqa: E501
493
+
494
+ # Authentication setting
495
+ auth_settings = [] # noqa: E501
496
+
497
+ return self.api_client.call_api(
498
+ '/v1/projects/{projectId}/models/{modelId}/versions', 'POST',
499
+ path_params,
500
+ query_params,
501
+ header_params,
502
+ body=body_params,
503
+ post_params=form_params,
504
+ files=local_var_files,
505
+ response_type='V1ModelVersionArchive', # noqa: E501
506
+ auth_settings=auth_settings,
507
+ async_req=params.get('async_req'),
508
+ _return_http_data_only=params.get('_return_http_data_only'),
509
+ _preload_content=params.get('_preload_content', True),
510
+ _request_timeout=params.get('_request_timeout'),
511
+ collection_formats=collection_formats)
512
+
401
513
  def models_store_create_multi_part_upload(self, body: 'VersionUploadsBody', project_id: 'str', model_id: 'str', version: 'str', **kwargs) -> 'V1CreateMultiPartUploadResponse': # noqa: E501
402
514
  """CreateMultiPartUpload initiates the multi-part upload of a file. Multiple requests can be sent to upload different files. # noqa: E501
403
515
 
@@ -1280,6 +1392,7 @@ class ModelsStoreApi(object):
1280
1392
 
1281
1393
  :param async_req bool
1282
1394
  :param str project_id: (required)
1395
+ :param str name:
1283
1396
  :return: V1ListModelsResponse
1284
1397
  If the method is called asynchronously,
1285
1398
  returns the request thread.
@@ -1301,12 +1414,13 @@ class ModelsStoreApi(object):
1301
1414
 
1302
1415
  :param async_req bool
1303
1416
  :param str project_id: (required)
1417
+ :param str name:
1304
1418
  :return: V1ListModelsResponse
1305
1419
  If the method is called asynchronously,
1306
1420
  returns the request thread.
1307
1421
  """
1308
1422
 
1309
- all_params = ['project_id'] # noqa: E501
1423
+ all_params = ['project_id', 'name'] # noqa: E501
1310
1424
  all_params.append('async_req')
1311
1425
  all_params.append('_return_http_data_only')
1312
1426
  all_params.append('_preload_content')
@@ -1333,6 +1447,8 @@ class ModelsStoreApi(object):
1333
1447
  path_params['projectId'] = params['project_id'] # noqa: E501
1334
1448
 
1335
1449
  query_params = []
1450
+ if 'name' in params:
1451
+ query_params.append(('name', params['name'])) # noqa: E501
1336
1452
 
1337
1453
  header_params = {}
1338
1454
 
@@ -69,6 +69,7 @@ from lightning_sdk.lightning_cloud.openapi.models.id_codeconfig_body import IdCo
69
69
  from lightning_sdk.lightning_cloud.openapi.models.id_collaborate_body import IdCollaborateBody
70
70
  from lightning_sdk.lightning_cloud.openapi.models.id_complete_body import IdCompleteBody
71
71
  from lightning_sdk.lightning_cloud.openapi.models.id_engage_body import IdEngageBody
72
+ from lightning_sdk.lightning_cloud.openapi.models.id_engage_body1 import IdEngageBody1
72
73
  from lightning_sdk.lightning_cloud.openapi.models.id_execute_body import IdExecuteBody
73
74
  from lightning_sdk.lightning_cloud.openapi.models.id_execute_body1 import IdExecuteBody1
74
75
  from lightning_sdk.lightning_cloud.openapi.models.id_fork_body import IdForkBody
@@ -98,6 +99,7 @@ from lightning_sdk.lightning_cloud.openapi.models.metrics_stream_id_loggerartifa
98
99
  from lightning_sdk.lightning_cloud.openapi.models.metricsstream_create_body import MetricsstreamCreateBody
99
100
  from lightning_sdk.lightning_cloud.openapi.models.metricsstream_delete_body import MetricsstreamDeleteBody
100
101
  from lightning_sdk.lightning_cloud.openapi.models.metricsstream_id_body import MetricsstreamIdBody
102
+ from lightning_sdk.lightning_cloud.openapi.models.model_id_versions_body import ModelIdVersionsBody
101
103
  from lightning_sdk.lightning_cloud.openapi.models.models_model_id_body import ModelsModelIdBody
102
104
  from lightning_sdk.lightning_cloud.openapi.models.multipartuploads_upload_id_body import MultipartuploadsUploadIdBody
103
105
  from lightning_sdk.lightning_cloud.openapi.models.org_id_memberships_body import OrgIdMembershipsBody
@@ -324,6 +326,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_deployment_state import V1D
324
326
  from lightning_sdk.lightning_cloud.openapi.models.v1_deployment_status import V1DeploymentStatus
325
327
  from lightning_sdk.lightning_cloud.openapi.models.v1_deployment_strategy import V1DeploymentStrategy
326
328
  from lightning_sdk.lightning_cloud.openapi.models.v1_deployment_template import V1DeploymentTemplate
329
+ from lightning_sdk.lightning_cloud.openapi.models.v1_deployment_template_engagement_response import V1DeploymentTemplateEngagementResponse
327
330
  from lightning_sdk.lightning_cloud.openapi.models.v1_deployment_template_gallery_response import V1DeploymentTemplateGalleryResponse
328
331
  from lightning_sdk.lightning_cloud.openapi.models.v1_deployment_template_parameter import V1DeploymentTemplateParameter
329
332
  from lightning_sdk.lightning_cloud.openapi.models.v1_deployment_template_parameter_placement import V1DeploymentTemplateParameterPlacement
@@ -556,6 +559,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_org_role import V1OrgRole
556
559
  from lightning_sdk.lightning_cloud.openapi.models.v1_organization import V1Organization
557
560
  from lightning_sdk.lightning_cloud.openapi.models.v1_owner_type import V1OwnerType
558
561
  from lightning_sdk.lightning_cloud.openapi.models.v1_package_manager import V1PackageManager
562
+ from lightning_sdk.lightning_cloud.openapi.models.v1_parameterization_spec import V1ParameterizationSpec
559
563
  from lightning_sdk.lightning_cloud.openapi.models.v1_path_telemetry import V1PathTelemetry
560
564
  from lightning_sdk.lightning_cloud.openapi.models.v1_phase_type import V1PhaseType
561
565
  from lightning_sdk.lightning_cloud.openapi.models.v1_plugin import V1Plugin
@@ -41,7 +41,7 @@ class ClusterIdCapacityblockBody(object):
41
41
  and the value is json key in definition.
42
42
  """
43
43
  swagger_types = {
44
- 'capacity_block_duration_hours': 'int',
44
+ 'capacity_block_duration_days': 'int',
45
45
  'instance_count': 'int',
46
46
  'instance_type': 'str',
47
47
  'org_id': 'str',
@@ -50,7 +50,7 @@ class ClusterIdCapacityblockBody(object):
50
50
  }
51
51
 
52
52
  attribute_map = {
53
- 'capacity_block_duration_hours': 'capacityBlockDurationHours',
53
+ 'capacity_block_duration_days': 'capacityBlockDurationDays',
54
54
  'instance_count': 'instanceCount',
55
55
  'instance_type': 'instanceType',
56
56
  'org_id': 'orgId',
@@ -58,17 +58,17 @@ class ClusterIdCapacityblockBody(object):
58
58
  'timezone': 'timezone'
59
59
  }
60
60
 
61
- def __init__(self, capacity_block_duration_hours: 'int' =None, instance_count: 'int' =None, instance_type: 'str' =None, org_id: 'str' =None, start_date: 'datetime' =None, timezone: 'str' =None): # noqa: E501
61
+ def __init__(self, capacity_block_duration_days: 'int' =None, instance_count: 'int' =None, instance_type: 'str' =None, org_id: 'str' =None, start_date: 'datetime' =None, timezone: 'str' =None): # noqa: E501
62
62
  """ClusterIdCapacityblockBody - a model defined in Swagger""" # noqa: E501
63
- self._capacity_block_duration_hours = None
63
+ self._capacity_block_duration_days = None
64
64
  self._instance_count = None
65
65
  self._instance_type = None
66
66
  self._org_id = None
67
67
  self._start_date = None
68
68
  self._timezone = None
69
69
  self.discriminator = None
70
- if capacity_block_duration_hours is not None:
71
- self.capacity_block_duration_hours = capacity_block_duration_hours
70
+ if capacity_block_duration_days is not None:
71
+ self.capacity_block_duration_days = capacity_block_duration_days
72
72
  if instance_count is not None:
73
73
  self.instance_count = instance_count
74
74
  if instance_type is not None:
@@ -81,25 +81,25 @@ class ClusterIdCapacityblockBody(object):
81
81
  self.timezone = timezone
82
82
 
83
83
  @property
84
- def capacity_block_duration_hours(self) -> 'int':
85
- """Gets the capacity_block_duration_hours of this ClusterIdCapacityblockBody. # noqa: E501
84
+ def capacity_block_duration_days(self) -> 'int':
85
+ """Gets the capacity_block_duration_days of this ClusterIdCapacityblockBody. # noqa: E501
86
86
 
87
87
 
88
- :return: The capacity_block_duration_hours of this ClusterIdCapacityblockBody. # noqa: E501
88
+ :return: The capacity_block_duration_days of this ClusterIdCapacityblockBody. # noqa: E501
89
89
  :rtype: int
90
90
  """
91
- return self._capacity_block_duration_hours
91
+ return self._capacity_block_duration_days
92
92
 
93
- @capacity_block_duration_hours.setter
94
- def capacity_block_duration_hours(self, capacity_block_duration_hours: 'int'):
95
- """Sets the capacity_block_duration_hours of this ClusterIdCapacityblockBody.
93
+ @capacity_block_duration_days.setter
94
+ def capacity_block_duration_days(self, capacity_block_duration_days: 'int'):
95
+ """Sets the capacity_block_duration_days of this ClusterIdCapacityblockBody.
96
96
 
97
97
 
98
- :param capacity_block_duration_hours: The capacity_block_duration_hours of this ClusterIdCapacityblockBody. # noqa: E501
98
+ :param capacity_block_duration_days: The capacity_block_duration_days of this ClusterIdCapacityblockBody. # noqa: E501
99
99
  :type: int
100
100
  """
101
101
 
102
- self._capacity_block_duration_hours = capacity_block_duration_hours
102
+ self._capacity_block_duration_days = capacity_block_duration_days
103
103
 
104
104
  @property
105
105
  def instance_count(self) -> 'int':