lightning-sdk 2025.8.7__py3-none-any.whl → 2025.8.8__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/lightning_cloud/openapi/__init__.py +3 -0
- lightning_sdk/lightning_cloud/openapi/api/assistants_service_api.py +110 -1
- lightning_sdk/lightning_cloud/openapi/api/schedules_service_api.py +347 -0
- lightning_sdk/lightning_cloud/openapi/models/__init__.py +3 -0
- lightning_sdk/lightning_cloud/openapi/models/cluster_id_metrics_body.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_cluster_metrics.py +877 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_list_schedule_runs_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_schedule_run.py +357 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +27 -1
- lightning_sdk/llm/public_assistants.py +40 -7
- {lightning_sdk-2025.8.7.dist-info → lightning_sdk-2025.8.8.dist-info}/METADATA +1 -1
- {lightning_sdk-2025.8.7.dist-info → lightning_sdk-2025.8.8.dist-info}/RECORD +17 -14
- {lightning_sdk-2025.8.7.dist-info → lightning_sdk-2025.8.8.dist-info}/LICENSE +0 -0
- {lightning_sdk-2025.8.7.dist-info → lightning_sdk-2025.8.8.dist-info}/WHEEL +0 -0
- {lightning_sdk-2025.8.7.dist-info → lightning_sdk-2025.8.8.dist-info}/entry_points.txt +0 -0
- {lightning_sdk-2025.8.7.dist-info → lightning_sdk-2025.8.8.dist-info}/top_level.txt +0 -0
lightning_sdk/__init__.py
CHANGED
|
@@ -326,6 +326,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_availability import
|
|
|
326
326
|
from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_capacity_reservation import V1ClusterCapacityReservation
|
|
327
327
|
from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_deletion_options import V1ClusterDeletionOptions
|
|
328
328
|
from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_encryption_key import V1ClusterEncryptionKey
|
|
329
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_metrics import V1ClusterMetrics
|
|
329
330
|
from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_names import V1ClusterNames
|
|
330
331
|
from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_proxy import V1ClusterProxy
|
|
331
332
|
from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_resource_tag import V1ClusterResourceTag
|
|
@@ -730,6 +731,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_list_published_managed_endp
|
|
|
730
731
|
from lightning_sdk.lightning_cloud.openapi.models.v1_list_quests_response import V1ListQuestsResponse
|
|
731
732
|
from lightning_sdk.lightning_cloud.openapi.models.v1_list_slurm_cluster_users_response import V1ListSLURMClusterUsersResponse
|
|
732
733
|
from lightning_sdk.lightning_cloud.openapi.models.v1_list_ssh_public_keys_response import V1ListSSHPublicKeysResponse
|
|
734
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_list_schedule_runs_response import V1ListScheduleRunsResponse
|
|
733
735
|
from lightning_sdk.lightning_cloud.openapi.models.v1_list_schedules_response import V1ListSchedulesResponse
|
|
734
736
|
from lightning_sdk.lightning_cloud.openapi.models.v1_list_secrets_response import V1ListSecretsResponse
|
|
735
737
|
from lightning_sdk.lightning_cloud.openapi.models.v1_list_studio_jobs_response import V1ListStudioJobsResponse
|
|
@@ -884,6 +886,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_ssh_public_key import V1SSH
|
|
|
884
886
|
from lightning_sdk.lightning_cloud.openapi.models.v1_schedule import V1Schedule
|
|
885
887
|
from lightning_sdk.lightning_cloud.openapi.models.v1_schedule_action_type import V1ScheduleActionType
|
|
886
888
|
from lightning_sdk.lightning_cloud.openapi.models.v1_schedule_resource_type import V1ScheduleResourceType
|
|
889
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_schedule_run import V1ScheduleRun
|
|
887
890
|
from lightning_sdk.lightning_cloud.openapi.models.v1_search_job_logs_response import V1SearchJobLogsResponse
|
|
888
891
|
from lightning_sdk.lightning_cloud.openapi.models.v1_search_user import V1SearchUser
|
|
889
892
|
from lightning_sdk.lightning_cloud.openapi.models.v1_search_users_response import V1SearchUsersResponse
|
|
@@ -965,6 +965,7 @@ class AssistantsServiceApi(object):
|
|
|
965
965
|
:param str user_name:
|
|
966
966
|
:param str org_name:
|
|
967
967
|
:param str model_provider:
|
|
968
|
+
:param str model_display_name:
|
|
968
969
|
:return: V1Assistant
|
|
969
970
|
If the method is called asynchronously,
|
|
970
971
|
returns the request thread.
|
|
@@ -989,12 +990,13 @@ class AssistantsServiceApi(object):
|
|
|
989
990
|
:param str user_name:
|
|
990
991
|
:param str org_name:
|
|
991
992
|
:param str model_provider:
|
|
993
|
+
:param str model_display_name:
|
|
992
994
|
:return: V1Assistant
|
|
993
995
|
If the method is called asynchronously,
|
|
994
996
|
returns the request thread.
|
|
995
997
|
"""
|
|
996
998
|
|
|
997
|
-
all_params = ['model_name', 'user_name', 'org_name', 'model_provider'] # noqa: E501
|
|
999
|
+
all_params = ['model_name', 'user_name', 'org_name', 'model_provider', 'model_display_name'] # noqa: E501
|
|
998
1000
|
all_params.append('async_req')
|
|
999
1001
|
all_params.append('_return_http_data_only')
|
|
1000
1002
|
all_params.append('_preload_content')
|
|
@@ -1027,6 +1029,8 @@ class AssistantsServiceApi(object):
|
|
|
1027
1029
|
query_params.append(('orgName', params['org_name'])) # noqa: E501
|
|
1028
1030
|
if 'model_provider' in params:
|
|
1029
1031
|
query_params.append(('modelProvider', params['model_provider'])) # noqa: E501
|
|
1032
|
+
if 'model_display_name' in params:
|
|
1033
|
+
query_params.append(('modelDisplayName', params['model_display_name'])) # noqa: E501
|
|
1030
1034
|
|
|
1031
1035
|
header_params = {}
|
|
1032
1036
|
|
|
@@ -1057,6 +1061,111 @@ class AssistantsServiceApi(object):
|
|
|
1057
1061
|
_request_timeout=params.get('_request_timeout'),
|
|
1058
1062
|
collection_formats=collection_formats)
|
|
1059
1063
|
|
|
1064
|
+
def assistants_service_get_managed_model_assistant2(self, **kwargs) -> 'V1Assistant': # noqa: E501
|
|
1065
|
+
"""Each managed model has a dedicated assistant for direct interaction. By using user_name, org_name, or model_provider as query parameters, this endpoint retrieves that specific assistant only—excluding any other assistants that may use the same model. # noqa: E501
|
|
1066
|
+
|
|
1067
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
1068
|
+
asynchronous HTTP request, please pass async_req=True
|
|
1069
|
+
>>> thread = api.assistants_service_get_managed_model_assistant2(async_req=True)
|
|
1070
|
+
>>> result = thread.get()
|
|
1071
|
+
|
|
1072
|
+
:param async_req bool
|
|
1073
|
+
:param str user_name:
|
|
1074
|
+
:param str org_name:
|
|
1075
|
+
:param str model_provider:
|
|
1076
|
+
:param str model_name:
|
|
1077
|
+
:param str model_display_name:
|
|
1078
|
+
:return: V1Assistant
|
|
1079
|
+
If the method is called asynchronously,
|
|
1080
|
+
returns the request thread.
|
|
1081
|
+
"""
|
|
1082
|
+
kwargs['_return_http_data_only'] = True
|
|
1083
|
+
if kwargs.get('async_req'):
|
|
1084
|
+
return self.assistants_service_get_managed_model_assistant2_with_http_info(**kwargs) # noqa: E501
|
|
1085
|
+
else:
|
|
1086
|
+
(data) = self.assistants_service_get_managed_model_assistant2_with_http_info(**kwargs) # noqa: E501
|
|
1087
|
+
return data
|
|
1088
|
+
|
|
1089
|
+
def assistants_service_get_managed_model_assistant2_with_http_info(self, **kwargs) -> 'V1Assistant': # noqa: E501
|
|
1090
|
+
"""Each managed model has a dedicated assistant for direct interaction. By using user_name, org_name, or model_provider as query parameters, this endpoint retrieves that specific assistant only—excluding any other assistants that may use the same model. # noqa: E501
|
|
1091
|
+
|
|
1092
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
1093
|
+
asynchronous HTTP request, please pass async_req=True
|
|
1094
|
+
>>> thread = api.assistants_service_get_managed_model_assistant2_with_http_info(async_req=True)
|
|
1095
|
+
>>> result = thread.get()
|
|
1096
|
+
|
|
1097
|
+
:param async_req bool
|
|
1098
|
+
:param str user_name:
|
|
1099
|
+
:param str org_name:
|
|
1100
|
+
:param str model_provider:
|
|
1101
|
+
:param str model_name:
|
|
1102
|
+
:param str model_display_name:
|
|
1103
|
+
:return: V1Assistant
|
|
1104
|
+
If the method is called asynchronously,
|
|
1105
|
+
returns the request thread.
|
|
1106
|
+
"""
|
|
1107
|
+
|
|
1108
|
+
all_params = ['user_name', 'org_name', 'model_provider', 'model_name', 'model_display_name'] # noqa: E501
|
|
1109
|
+
all_params.append('async_req')
|
|
1110
|
+
all_params.append('_return_http_data_only')
|
|
1111
|
+
all_params.append('_preload_content')
|
|
1112
|
+
all_params.append('_request_timeout')
|
|
1113
|
+
|
|
1114
|
+
params = locals()
|
|
1115
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
1116
|
+
if key not in all_params:
|
|
1117
|
+
raise TypeError(
|
|
1118
|
+
"Got an unexpected keyword argument '%s'"
|
|
1119
|
+
" to method assistants_service_get_managed_model_assistant2" % key
|
|
1120
|
+
)
|
|
1121
|
+
params[key] = val
|
|
1122
|
+
del params['kwargs']
|
|
1123
|
+
|
|
1124
|
+
collection_formats = {}
|
|
1125
|
+
|
|
1126
|
+
path_params = {}
|
|
1127
|
+
|
|
1128
|
+
query_params = []
|
|
1129
|
+
if 'user_name' in params:
|
|
1130
|
+
query_params.append(('userName', params['user_name'])) # noqa: E501
|
|
1131
|
+
if 'org_name' in params:
|
|
1132
|
+
query_params.append(('orgName', params['org_name'])) # noqa: E501
|
|
1133
|
+
if 'model_provider' in params:
|
|
1134
|
+
query_params.append(('modelProvider', params['model_provider'])) # noqa: E501
|
|
1135
|
+
if 'model_name' in params:
|
|
1136
|
+
query_params.append(('modelName', params['model_name'])) # noqa: E501
|
|
1137
|
+
if 'model_display_name' in params:
|
|
1138
|
+
query_params.append(('modelDisplayName', params['model_display_name'])) # noqa: E501
|
|
1139
|
+
|
|
1140
|
+
header_params = {}
|
|
1141
|
+
|
|
1142
|
+
form_params = []
|
|
1143
|
+
local_var_files = {}
|
|
1144
|
+
|
|
1145
|
+
body_params = None
|
|
1146
|
+
# HTTP header `Accept`
|
|
1147
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
1148
|
+
['application/json']) # noqa: E501
|
|
1149
|
+
|
|
1150
|
+
# Authentication setting
|
|
1151
|
+
auth_settings = [] # noqa: E501
|
|
1152
|
+
|
|
1153
|
+
return self.api_client.call_api(
|
|
1154
|
+
'/v1/agents/managed-model', 'GET',
|
|
1155
|
+
path_params,
|
|
1156
|
+
query_params,
|
|
1157
|
+
header_params,
|
|
1158
|
+
body=body_params,
|
|
1159
|
+
post_params=form_params,
|
|
1160
|
+
files=local_var_files,
|
|
1161
|
+
response_type='V1Assistant', # noqa: E501
|
|
1162
|
+
auth_settings=auth_settings,
|
|
1163
|
+
async_req=params.get('async_req'),
|
|
1164
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
1165
|
+
_preload_content=params.get('_preload_content', True),
|
|
1166
|
+
_request_timeout=params.get('_request_timeout'),
|
|
1167
|
+
collection_formats=collection_formats)
|
|
1168
|
+
|
|
1060
1169
|
def assistants_service_get_managed_model_by_name(self, project_id: 'str', managed_endpoint_id: 'str', name: 'str', **kwargs) -> 'V1ManagedModel': # noqa: E501
|
|
1061
1170
|
"""assistants_service_get_managed_model_by_name # noqa: E501
|
|
1062
1171
|
|
|
@@ -148,6 +148,127 @@ class SchedulesServiceApi(object):
|
|
|
148
148
|
_request_timeout=params.get('_request_timeout'),
|
|
149
149
|
collection_formats=collection_formats)
|
|
150
150
|
|
|
151
|
+
def schedules_service_create_schedule_run(self, body: 'object', project_id: 'str', cloudspace_id: 'str', schedule_id: 'str', **kwargs) -> 'V1ScheduleRun': # noqa: E501
|
|
152
|
+
"""schedules_service_create_schedule_run # 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.schedules_service_create_schedule_run(body, project_id, cloudspace_id, schedule_id, async_req=True)
|
|
157
|
+
>>> result = thread.get()
|
|
158
|
+
|
|
159
|
+
:param async_req bool
|
|
160
|
+
:param object body: (required)
|
|
161
|
+
:param str project_id: (required)
|
|
162
|
+
:param str cloudspace_id: (required)
|
|
163
|
+
:param str schedule_id: (required)
|
|
164
|
+
:return: V1ScheduleRun
|
|
165
|
+
If the method is called asynchronously,
|
|
166
|
+
returns the request thread.
|
|
167
|
+
"""
|
|
168
|
+
kwargs['_return_http_data_only'] = True
|
|
169
|
+
if kwargs.get('async_req'):
|
|
170
|
+
return self.schedules_service_create_schedule_run_with_http_info(body, project_id, cloudspace_id, schedule_id, **kwargs) # noqa: E501
|
|
171
|
+
else:
|
|
172
|
+
(data) = self.schedules_service_create_schedule_run_with_http_info(body, project_id, cloudspace_id, schedule_id, **kwargs) # noqa: E501
|
|
173
|
+
return data
|
|
174
|
+
|
|
175
|
+
def schedules_service_create_schedule_run_with_http_info(self, body: 'object', project_id: 'str', cloudspace_id: 'str', schedule_id: 'str', **kwargs) -> 'V1ScheduleRun': # noqa: E501
|
|
176
|
+
"""schedules_service_create_schedule_run # noqa: E501
|
|
177
|
+
|
|
178
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
179
|
+
asynchronous HTTP request, please pass async_req=True
|
|
180
|
+
>>> thread = api.schedules_service_create_schedule_run_with_http_info(body, project_id, cloudspace_id, schedule_id, async_req=True)
|
|
181
|
+
>>> result = thread.get()
|
|
182
|
+
|
|
183
|
+
:param async_req bool
|
|
184
|
+
:param object body: (required)
|
|
185
|
+
:param str project_id: (required)
|
|
186
|
+
:param str cloudspace_id: (required)
|
|
187
|
+
:param str schedule_id: (required)
|
|
188
|
+
:return: V1ScheduleRun
|
|
189
|
+
If the method is called asynchronously,
|
|
190
|
+
returns the request thread.
|
|
191
|
+
"""
|
|
192
|
+
|
|
193
|
+
all_params = ['body', 'project_id', 'cloudspace_id', 'schedule_id'] # noqa: E501
|
|
194
|
+
all_params.append('async_req')
|
|
195
|
+
all_params.append('_return_http_data_only')
|
|
196
|
+
all_params.append('_preload_content')
|
|
197
|
+
all_params.append('_request_timeout')
|
|
198
|
+
|
|
199
|
+
params = locals()
|
|
200
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
201
|
+
if key not in all_params:
|
|
202
|
+
raise TypeError(
|
|
203
|
+
"Got an unexpected keyword argument '%s'"
|
|
204
|
+
" to method schedules_service_create_schedule_run" % key
|
|
205
|
+
)
|
|
206
|
+
params[key] = val
|
|
207
|
+
del params['kwargs']
|
|
208
|
+
# verify the required parameter 'body' is set
|
|
209
|
+
if ('body' not in params or
|
|
210
|
+
params['body'] is None):
|
|
211
|
+
raise ValueError("Missing the required parameter `body` when calling `schedules_service_create_schedule_run`") # noqa: E501
|
|
212
|
+
# verify the required parameter 'project_id' is set
|
|
213
|
+
if ('project_id' not in params or
|
|
214
|
+
params['project_id'] is None):
|
|
215
|
+
raise ValueError("Missing the required parameter `project_id` when calling `schedules_service_create_schedule_run`") # noqa: E501
|
|
216
|
+
# verify the required parameter 'cloudspace_id' is set
|
|
217
|
+
if ('cloudspace_id' not in params or
|
|
218
|
+
params['cloudspace_id'] is None):
|
|
219
|
+
raise ValueError("Missing the required parameter `cloudspace_id` when calling `schedules_service_create_schedule_run`") # noqa: E501
|
|
220
|
+
# verify the required parameter 'schedule_id' is set
|
|
221
|
+
if ('schedule_id' not in params or
|
|
222
|
+
params['schedule_id'] is None):
|
|
223
|
+
raise ValueError("Missing the required parameter `schedule_id` when calling `schedules_service_create_schedule_run`") # noqa: E501
|
|
224
|
+
|
|
225
|
+
collection_formats = {}
|
|
226
|
+
|
|
227
|
+
path_params = {}
|
|
228
|
+
if 'project_id' in params:
|
|
229
|
+
path_params['projectId'] = params['project_id'] # noqa: E501
|
|
230
|
+
if 'cloudspace_id' in params:
|
|
231
|
+
path_params['cloudspaceId'] = params['cloudspace_id'] # noqa: E501
|
|
232
|
+
if 'schedule_id' in params:
|
|
233
|
+
path_params['scheduleId'] = params['schedule_id'] # noqa: E501
|
|
234
|
+
|
|
235
|
+
query_params = []
|
|
236
|
+
|
|
237
|
+
header_params = {}
|
|
238
|
+
|
|
239
|
+
form_params = []
|
|
240
|
+
local_var_files = {}
|
|
241
|
+
|
|
242
|
+
body_params = None
|
|
243
|
+
if 'body' in params:
|
|
244
|
+
body_params = params['body']
|
|
245
|
+
# HTTP header `Accept`
|
|
246
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
247
|
+
['application/json']) # noqa: E501
|
|
248
|
+
|
|
249
|
+
# HTTP header `Content-Type`
|
|
250
|
+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
251
|
+
['application/json']) # noqa: E501
|
|
252
|
+
|
|
253
|
+
# Authentication setting
|
|
254
|
+
auth_settings = [] # noqa: E501
|
|
255
|
+
|
|
256
|
+
return self.api_client.call_api(
|
|
257
|
+
'/v1/projects/{projectId}/cloudspaces/{cloudspaceId}/schedules/{scheduleId}/runs', 'POST',
|
|
258
|
+
path_params,
|
|
259
|
+
query_params,
|
|
260
|
+
header_params,
|
|
261
|
+
body=body_params,
|
|
262
|
+
post_params=form_params,
|
|
263
|
+
files=local_var_files,
|
|
264
|
+
response_type='V1ScheduleRun', # noqa: E501
|
|
265
|
+
auth_settings=auth_settings,
|
|
266
|
+
async_req=params.get('async_req'),
|
|
267
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
268
|
+
_preload_content=params.get('_preload_content', True),
|
|
269
|
+
_request_timeout=params.get('_request_timeout'),
|
|
270
|
+
collection_formats=collection_formats)
|
|
271
|
+
|
|
151
272
|
def schedules_service_delete_schedule(self, project_id: 'str', id: 'str', **kwargs) -> 'V1DeleteScheduleResponse': # noqa: E501
|
|
152
273
|
"""schedules_service_delete_schedule # noqa: E501
|
|
153
274
|
|
|
@@ -350,6 +471,232 @@ class SchedulesServiceApi(object):
|
|
|
350
471
|
_request_timeout=params.get('_request_timeout'),
|
|
351
472
|
collection_formats=collection_formats)
|
|
352
473
|
|
|
474
|
+
def schedules_service_get_schedule_run(self, project_id: 'str', cloudspace_id: 'str', schedule_id: 'str', run_id: 'str', **kwargs) -> 'V1ScheduleRun': # noqa: E501
|
|
475
|
+
"""schedules_service_get_schedule_run # noqa: E501
|
|
476
|
+
|
|
477
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
478
|
+
asynchronous HTTP request, please pass async_req=True
|
|
479
|
+
>>> thread = api.schedules_service_get_schedule_run(project_id, cloudspace_id, schedule_id, run_id, async_req=True)
|
|
480
|
+
>>> result = thread.get()
|
|
481
|
+
|
|
482
|
+
:param async_req bool
|
|
483
|
+
:param str project_id: (required)
|
|
484
|
+
:param str cloudspace_id: (required)
|
|
485
|
+
:param str schedule_id: (required)
|
|
486
|
+
:param str run_id: (required)
|
|
487
|
+
:return: V1ScheduleRun
|
|
488
|
+
If the method is called asynchronously,
|
|
489
|
+
returns the request thread.
|
|
490
|
+
"""
|
|
491
|
+
kwargs['_return_http_data_only'] = True
|
|
492
|
+
if kwargs.get('async_req'):
|
|
493
|
+
return self.schedules_service_get_schedule_run_with_http_info(project_id, cloudspace_id, schedule_id, run_id, **kwargs) # noqa: E501
|
|
494
|
+
else:
|
|
495
|
+
(data) = self.schedules_service_get_schedule_run_with_http_info(project_id, cloudspace_id, schedule_id, run_id, **kwargs) # noqa: E501
|
|
496
|
+
return data
|
|
497
|
+
|
|
498
|
+
def schedules_service_get_schedule_run_with_http_info(self, project_id: 'str', cloudspace_id: 'str', schedule_id: 'str', run_id: 'str', **kwargs) -> 'V1ScheduleRun': # noqa: E501
|
|
499
|
+
"""schedules_service_get_schedule_run # noqa: E501
|
|
500
|
+
|
|
501
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
502
|
+
asynchronous HTTP request, please pass async_req=True
|
|
503
|
+
>>> thread = api.schedules_service_get_schedule_run_with_http_info(project_id, cloudspace_id, schedule_id, run_id, async_req=True)
|
|
504
|
+
>>> result = thread.get()
|
|
505
|
+
|
|
506
|
+
:param async_req bool
|
|
507
|
+
:param str project_id: (required)
|
|
508
|
+
:param str cloudspace_id: (required)
|
|
509
|
+
:param str schedule_id: (required)
|
|
510
|
+
:param str run_id: (required)
|
|
511
|
+
:return: V1ScheduleRun
|
|
512
|
+
If the method is called asynchronously,
|
|
513
|
+
returns the request thread.
|
|
514
|
+
"""
|
|
515
|
+
|
|
516
|
+
all_params = ['project_id', 'cloudspace_id', 'schedule_id', 'run_id'] # noqa: E501
|
|
517
|
+
all_params.append('async_req')
|
|
518
|
+
all_params.append('_return_http_data_only')
|
|
519
|
+
all_params.append('_preload_content')
|
|
520
|
+
all_params.append('_request_timeout')
|
|
521
|
+
|
|
522
|
+
params = locals()
|
|
523
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
524
|
+
if key not in all_params:
|
|
525
|
+
raise TypeError(
|
|
526
|
+
"Got an unexpected keyword argument '%s'"
|
|
527
|
+
" to method schedules_service_get_schedule_run" % key
|
|
528
|
+
)
|
|
529
|
+
params[key] = val
|
|
530
|
+
del params['kwargs']
|
|
531
|
+
# verify the required parameter 'project_id' is set
|
|
532
|
+
if ('project_id' not in params or
|
|
533
|
+
params['project_id'] is None):
|
|
534
|
+
raise ValueError("Missing the required parameter `project_id` when calling `schedules_service_get_schedule_run`") # noqa: E501
|
|
535
|
+
# verify the required parameter 'cloudspace_id' is set
|
|
536
|
+
if ('cloudspace_id' not in params or
|
|
537
|
+
params['cloudspace_id'] is None):
|
|
538
|
+
raise ValueError("Missing the required parameter `cloudspace_id` when calling `schedules_service_get_schedule_run`") # noqa: E501
|
|
539
|
+
# verify the required parameter 'schedule_id' is set
|
|
540
|
+
if ('schedule_id' not in params or
|
|
541
|
+
params['schedule_id'] is None):
|
|
542
|
+
raise ValueError("Missing the required parameter `schedule_id` when calling `schedules_service_get_schedule_run`") # noqa: E501
|
|
543
|
+
# verify the required parameter 'run_id' is set
|
|
544
|
+
if ('run_id' not in params or
|
|
545
|
+
params['run_id'] is None):
|
|
546
|
+
raise ValueError("Missing the required parameter `run_id` when calling `schedules_service_get_schedule_run`") # noqa: E501
|
|
547
|
+
|
|
548
|
+
collection_formats = {}
|
|
549
|
+
|
|
550
|
+
path_params = {}
|
|
551
|
+
if 'project_id' in params:
|
|
552
|
+
path_params['projectId'] = params['project_id'] # noqa: E501
|
|
553
|
+
if 'cloudspace_id' in params:
|
|
554
|
+
path_params['cloudspaceId'] = params['cloudspace_id'] # noqa: E501
|
|
555
|
+
if 'schedule_id' in params:
|
|
556
|
+
path_params['scheduleId'] = params['schedule_id'] # noqa: E501
|
|
557
|
+
if 'run_id' in params:
|
|
558
|
+
path_params['runId'] = params['run_id'] # noqa: E501
|
|
559
|
+
|
|
560
|
+
query_params = []
|
|
561
|
+
|
|
562
|
+
header_params = {}
|
|
563
|
+
|
|
564
|
+
form_params = []
|
|
565
|
+
local_var_files = {}
|
|
566
|
+
|
|
567
|
+
body_params = None
|
|
568
|
+
# HTTP header `Accept`
|
|
569
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
570
|
+
['application/json']) # noqa: E501
|
|
571
|
+
|
|
572
|
+
# Authentication setting
|
|
573
|
+
auth_settings = [] # noqa: E501
|
|
574
|
+
|
|
575
|
+
return self.api_client.call_api(
|
|
576
|
+
'/v1/projects/{projectId}/cloudspaces/{cloudspaceId}/schedules/{scheduleId}/runs/{runId}', 'GET',
|
|
577
|
+
path_params,
|
|
578
|
+
query_params,
|
|
579
|
+
header_params,
|
|
580
|
+
body=body_params,
|
|
581
|
+
post_params=form_params,
|
|
582
|
+
files=local_var_files,
|
|
583
|
+
response_type='V1ScheduleRun', # noqa: E501
|
|
584
|
+
auth_settings=auth_settings,
|
|
585
|
+
async_req=params.get('async_req'),
|
|
586
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
587
|
+
_preload_content=params.get('_preload_content', True),
|
|
588
|
+
_request_timeout=params.get('_request_timeout'),
|
|
589
|
+
collection_formats=collection_formats)
|
|
590
|
+
|
|
591
|
+
def schedules_service_list_schedule_runs(self, project_id: 'str', cloudspace_id: 'str', schedule_id: 'str', **kwargs) -> 'V1ListScheduleRunsResponse': # noqa: E501
|
|
592
|
+
"""schedules_service_list_schedule_runs # noqa: E501
|
|
593
|
+
|
|
594
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
595
|
+
asynchronous HTTP request, please pass async_req=True
|
|
596
|
+
>>> thread = api.schedules_service_list_schedule_runs(project_id, cloudspace_id, schedule_id, async_req=True)
|
|
597
|
+
>>> result = thread.get()
|
|
598
|
+
|
|
599
|
+
:param async_req bool
|
|
600
|
+
:param str project_id: (required)
|
|
601
|
+
:param str cloudspace_id: (required)
|
|
602
|
+
:param str schedule_id: (required)
|
|
603
|
+
:return: V1ListScheduleRunsResponse
|
|
604
|
+
If the method is called asynchronously,
|
|
605
|
+
returns the request thread.
|
|
606
|
+
"""
|
|
607
|
+
kwargs['_return_http_data_only'] = True
|
|
608
|
+
if kwargs.get('async_req'):
|
|
609
|
+
return self.schedules_service_list_schedule_runs_with_http_info(project_id, cloudspace_id, schedule_id, **kwargs) # noqa: E501
|
|
610
|
+
else:
|
|
611
|
+
(data) = self.schedules_service_list_schedule_runs_with_http_info(project_id, cloudspace_id, schedule_id, **kwargs) # noqa: E501
|
|
612
|
+
return data
|
|
613
|
+
|
|
614
|
+
def schedules_service_list_schedule_runs_with_http_info(self, project_id: 'str', cloudspace_id: 'str', schedule_id: 'str', **kwargs) -> 'V1ListScheduleRunsResponse': # noqa: E501
|
|
615
|
+
"""schedules_service_list_schedule_runs # noqa: E501
|
|
616
|
+
|
|
617
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
618
|
+
asynchronous HTTP request, please pass async_req=True
|
|
619
|
+
>>> thread = api.schedules_service_list_schedule_runs_with_http_info(project_id, cloudspace_id, schedule_id, async_req=True)
|
|
620
|
+
>>> result = thread.get()
|
|
621
|
+
|
|
622
|
+
:param async_req bool
|
|
623
|
+
:param str project_id: (required)
|
|
624
|
+
:param str cloudspace_id: (required)
|
|
625
|
+
:param str schedule_id: (required)
|
|
626
|
+
:return: V1ListScheduleRunsResponse
|
|
627
|
+
If the method is called asynchronously,
|
|
628
|
+
returns the request thread.
|
|
629
|
+
"""
|
|
630
|
+
|
|
631
|
+
all_params = ['project_id', 'cloudspace_id', 'schedule_id'] # noqa: E501
|
|
632
|
+
all_params.append('async_req')
|
|
633
|
+
all_params.append('_return_http_data_only')
|
|
634
|
+
all_params.append('_preload_content')
|
|
635
|
+
all_params.append('_request_timeout')
|
|
636
|
+
|
|
637
|
+
params = locals()
|
|
638
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
639
|
+
if key not in all_params:
|
|
640
|
+
raise TypeError(
|
|
641
|
+
"Got an unexpected keyword argument '%s'"
|
|
642
|
+
" to method schedules_service_list_schedule_runs" % key
|
|
643
|
+
)
|
|
644
|
+
params[key] = val
|
|
645
|
+
del params['kwargs']
|
|
646
|
+
# verify the required parameter 'project_id' is set
|
|
647
|
+
if ('project_id' not in params or
|
|
648
|
+
params['project_id'] is None):
|
|
649
|
+
raise ValueError("Missing the required parameter `project_id` when calling `schedules_service_list_schedule_runs`") # noqa: E501
|
|
650
|
+
# verify the required parameter 'cloudspace_id' is set
|
|
651
|
+
if ('cloudspace_id' not in params or
|
|
652
|
+
params['cloudspace_id'] is None):
|
|
653
|
+
raise ValueError("Missing the required parameter `cloudspace_id` when calling `schedules_service_list_schedule_runs`") # noqa: E501
|
|
654
|
+
# verify the required parameter 'schedule_id' is set
|
|
655
|
+
if ('schedule_id' not in params or
|
|
656
|
+
params['schedule_id'] is None):
|
|
657
|
+
raise ValueError("Missing the required parameter `schedule_id` when calling `schedules_service_list_schedule_runs`") # noqa: E501
|
|
658
|
+
|
|
659
|
+
collection_formats = {}
|
|
660
|
+
|
|
661
|
+
path_params = {}
|
|
662
|
+
if 'project_id' in params:
|
|
663
|
+
path_params['projectId'] = params['project_id'] # noqa: E501
|
|
664
|
+
if 'cloudspace_id' in params:
|
|
665
|
+
path_params['cloudspaceId'] = params['cloudspace_id'] # noqa: E501
|
|
666
|
+
if 'schedule_id' in params:
|
|
667
|
+
path_params['scheduleId'] = params['schedule_id'] # noqa: E501
|
|
668
|
+
|
|
669
|
+
query_params = []
|
|
670
|
+
|
|
671
|
+
header_params = {}
|
|
672
|
+
|
|
673
|
+
form_params = []
|
|
674
|
+
local_var_files = {}
|
|
675
|
+
|
|
676
|
+
body_params = None
|
|
677
|
+
# HTTP header `Accept`
|
|
678
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
679
|
+
['application/json']) # noqa: E501
|
|
680
|
+
|
|
681
|
+
# Authentication setting
|
|
682
|
+
auth_settings = [] # noqa: E501
|
|
683
|
+
|
|
684
|
+
return self.api_client.call_api(
|
|
685
|
+
'/v1/projects/{projectId}/cloudspaces/{cloudspaceId}/schedules/{scheduleId}/runs', 'GET',
|
|
686
|
+
path_params,
|
|
687
|
+
query_params,
|
|
688
|
+
header_params,
|
|
689
|
+
body=body_params,
|
|
690
|
+
post_params=form_params,
|
|
691
|
+
files=local_var_files,
|
|
692
|
+
response_type='V1ListScheduleRunsResponse', # noqa: E501
|
|
693
|
+
auth_settings=auth_settings,
|
|
694
|
+
async_req=params.get('async_req'),
|
|
695
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
696
|
+
_preload_content=params.get('_preload_content', True),
|
|
697
|
+
_request_timeout=params.get('_request_timeout'),
|
|
698
|
+
collection_formats=collection_formats)
|
|
699
|
+
|
|
353
700
|
def schedules_service_list_schedules(self, project_id: 'str', **kwargs) -> 'V1ListSchedulesResponse': # noqa: E501
|
|
354
701
|
"""schedules_service_list_schedules # noqa: E501
|
|
355
702
|
|
|
@@ -278,6 +278,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_availability import
|
|
|
278
278
|
from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_capacity_reservation import V1ClusterCapacityReservation
|
|
279
279
|
from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_deletion_options import V1ClusterDeletionOptions
|
|
280
280
|
from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_encryption_key import V1ClusterEncryptionKey
|
|
281
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_metrics import V1ClusterMetrics
|
|
281
282
|
from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_names import V1ClusterNames
|
|
282
283
|
from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_proxy import V1ClusterProxy
|
|
283
284
|
from lightning_sdk.lightning_cloud.openapi.models.v1_cluster_resource_tag import V1ClusterResourceTag
|
|
@@ -682,6 +683,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_list_published_managed_endp
|
|
|
682
683
|
from lightning_sdk.lightning_cloud.openapi.models.v1_list_quests_response import V1ListQuestsResponse
|
|
683
684
|
from lightning_sdk.lightning_cloud.openapi.models.v1_list_slurm_cluster_users_response import V1ListSLURMClusterUsersResponse
|
|
684
685
|
from lightning_sdk.lightning_cloud.openapi.models.v1_list_ssh_public_keys_response import V1ListSSHPublicKeysResponse
|
|
686
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_list_schedule_runs_response import V1ListScheduleRunsResponse
|
|
685
687
|
from lightning_sdk.lightning_cloud.openapi.models.v1_list_schedules_response import V1ListSchedulesResponse
|
|
686
688
|
from lightning_sdk.lightning_cloud.openapi.models.v1_list_secrets_response import V1ListSecretsResponse
|
|
687
689
|
from lightning_sdk.lightning_cloud.openapi.models.v1_list_studio_jobs_response import V1ListStudioJobsResponse
|
|
@@ -836,6 +838,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_ssh_public_key import V1SSH
|
|
|
836
838
|
from lightning_sdk.lightning_cloud.openapi.models.v1_schedule import V1Schedule
|
|
837
839
|
from lightning_sdk.lightning_cloud.openapi.models.v1_schedule_action_type import V1ScheduleActionType
|
|
838
840
|
from lightning_sdk.lightning_cloud.openapi.models.v1_schedule_resource_type import V1ScheduleResourceType
|
|
841
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_schedule_run import V1ScheduleRun
|
|
839
842
|
from lightning_sdk.lightning_cloud.openapi.models.v1_search_job_logs_response import V1SearchJobLogsResponse
|
|
840
843
|
from lightning_sdk.lightning_cloud.openapi.models.v1_search_user import V1SearchUser
|
|
841
844
|
from lightning_sdk.lightning_cloud.openapi.models.v1_search_users_response import V1SearchUsersResponse
|
|
@@ -41,23 +41,28 @@ class ClusterIdMetricsBody(object):
|
|
|
41
41
|
and the value is json key in definition.
|
|
42
42
|
"""
|
|
43
43
|
swagger_types = {
|
|
44
|
+
'cluster_metrics': 'V1ClusterMetrics',
|
|
44
45
|
'container_metrics': 'list[V1ContainerMetrics]',
|
|
45
46
|
'node_metrics': 'list[V1NodeMetrics]',
|
|
46
47
|
'pod_metrics': 'list[V1PodMetrics]'
|
|
47
48
|
}
|
|
48
49
|
|
|
49
50
|
attribute_map = {
|
|
51
|
+
'cluster_metrics': 'clusterMetrics',
|
|
50
52
|
'container_metrics': 'containerMetrics',
|
|
51
53
|
'node_metrics': 'nodeMetrics',
|
|
52
54
|
'pod_metrics': 'podMetrics'
|
|
53
55
|
}
|
|
54
56
|
|
|
55
|
-
def __init__(self, container_metrics: 'list[V1ContainerMetrics]' =None, node_metrics: 'list[V1NodeMetrics]' =None, pod_metrics: 'list[V1PodMetrics]' =None): # noqa: E501
|
|
57
|
+
def __init__(self, cluster_metrics: 'V1ClusterMetrics' =None, container_metrics: 'list[V1ContainerMetrics]' =None, node_metrics: 'list[V1NodeMetrics]' =None, pod_metrics: 'list[V1PodMetrics]' =None): # noqa: E501
|
|
56
58
|
"""ClusterIdMetricsBody - a model defined in Swagger""" # noqa: E501
|
|
59
|
+
self._cluster_metrics = None
|
|
57
60
|
self._container_metrics = None
|
|
58
61
|
self._node_metrics = None
|
|
59
62
|
self._pod_metrics = None
|
|
60
63
|
self.discriminator = None
|
|
64
|
+
if cluster_metrics is not None:
|
|
65
|
+
self.cluster_metrics = cluster_metrics
|
|
61
66
|
if container_metrics is not None:
|
|
62
67
|
self.container_metrics = container_metrics
|
|
63
68
|
if node_metrics is not None:
|
|
@@ -65,6 +70,27 @@ class ClusterIdMetricsBody(object):
|
|
|
65
70
|
if pod_metrics is not None:
|
|
66
71
|
self.pod_metrics = pod_metrics
|
|
67
72
|
|
|
73
|
+
@property
|
|
74
|
+
def cluster_metrics(self) -> 'V1ClusterMetrics':
|
|
75
|
+
"""Gets the cluster_metrics of this ClusterIdMetricsBody. # noqa: E501
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
:return: The cluster_metrics of this ClusterIdMetricsBody. # noqa: E501
|
|
79
|
+
:rtype: V1ClusterMetrics
|
|
80
|
+
"""
|
|
81
|
+
return self._cluster_metrics
|
|
82
|
+
|
|
83
|
+
@cluster_metrics.setter
|
|
84
|
+
def cluster_metrics(self, cluster_metrics: 'V1ClusterMetrics'):
|
|
85
|
+
"""Sets the cluster_metrics of this ClusterIdMetricsBody.
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
:param cluster_metrics: The cluster_metrics of this ClusterIdMetricsBody. # noqa: E501
|
|
89
|
+
:type: V1ClusterMetrics
|
|
90
|
+
"""
|
|
91
|
+
|
|
92
|
+
self._cluster_metrics = cluster_metrics
|
|
93
|
+
|
|
68
94
|
@property
|
|
69
95
|
def container_metrics(self) -> 'list[V1ContainerMetrics]':
|
|
70
96
|
"""Gets the container_metrics of this ClusterIdMetricsBody. # noqa: E501
|