lightning-sdk 0.1.37__py3-none-any.whl → 0.1.39__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 (72) hide show
  1. lightning_sdk/__init__.py +1 -1
  2. lightning_sdk/ai_hub.py +21 -23
  3. lightning_sdk/api/ai_hub_api.py +29 -4
  4. lightning_sdk/api/deployment_api.py +0 -2
  5. lightning_sdk/api/job_api.py +10 -2
  6. lightning_sdk/api/teamspace_api.py +22 -16
  7. lightning_sdk/api/utils.py +25 -3
  8. lightning_sdk/cli/ai_hub.py +1 -1
  9. lightning_sdk/cli/download.py +3 -5
  10. lightning_sdk/cli/run.py +24 -0
  11. lightning_sdk/cli/upload.py +3 -10
  12. lightning_sdk/job/base.py +35 -0
  13. lightning_sdk/job/job.py +18 -1
  14. lightning_sdk/job/v1.py +10 -1
  15. lightning_sdk/job/v2.py +16 -0
  16. lightning_sdk/lightning_cloud/openapi/__init__.py +13 -2
  17. lightning_sdk/lightning_cloud/openapi/api/cluster_service_api.py +5 -1
  18. lightning_sdk/lightning_cloud/openapi/api/data_connection_service_api.py +6 -1
  19. lightning_sdk/lightning_cloud/openapi/api/jobs_service_api.py +680 -62
  20. lightning_sdk/lightning_cloud/openapi/api/models_store_api.py +118 -1
  21. lightning_sdk/lightning_cloud/openapi/models/__init__.py +13 -2
  22. lightning_sdk/lightning_cloud/openapi/models/create.py +6 -32
  23. lightning_sdk/lightning_cloud/openapi/models/deploymenttemplates_id_body.py +32 -6
  24. lightning_sdk/lightning_cloud/openapi/models/externalv1_cloud_space_instance_status.py +27 -1
  25. lightning_sdk/lightning_cloud/openapi/models/id_start_body.py +29 -3
  26. lightning_sdk/lightning_cloud/openapi/models/multimachinejobs_id_body.py +123 -0
  27. lightning_sdk/lightning_cloud/openapi/models/project_id_agents_body.py +53 -1
  28. lightning_sdk/lightning_cloud/openapi/models/project_id_cloudspaces_body.py +53 -1
  29. lightning_sdk/lightning_cloud/openapi/models/project_id_multimachinejobs_body.py +201 -0
  30. lightning_sdk/lightning_cloud/openapi/models/update.py +6 -32
  31. lightning_sdk/lightning_cloud/openapi/models/v1_api_pricing_spec.py +149 -0
  32. lightning_sdk/lightning_cloud/openapi/models/v1_cluster_spec.py +27 -1
  33. lightning_sdk/lightning_cloud/openapi/models/v1_create_deployment_template_request.py +32 -6
  34. lightning_sdk/lightning_cloud/openapi/models/v1_data_connection.py +6 -32
  35. lightning_sdk/lightning_cloud/openapi/models/v1_data_path.py +29 -3
  36. lightning_sdk/lightning_cloud/openapi/models/v1_delete_multi_machine_job_response.py +97 -0
  37. lightning_sdk/lightning_cloud/openapi/models/v1_deployment_metrics.py +43 -17
  38. lightning_sdk/lightning_cloud/openapi/models/v1_deployment_performance.py +305 -0
  39. lightning_sdk/lightning_cloud/openapi/models/v1_deployment_template.py +32 -6
  40. lightning_sdk/lightning_cloud/openapi/models/v1_deployment_template_parameter.py +27 -1
  41. lightning_sdk/lightning_cloud/openapi/models/v1_deployment_template_parameter_type.py +1 -0
  42. lightning_sdk/lightning_cloud/openapi/models/v1_deployment_template_summary.py +27 -1
  43. lightning_sdk/lightning_cloud/openapi/models/{v1_efs_data_connection.py → v1_efs_config.py} +22 -22
  44. lightning_sdk/lightning_cloud/openapi/models/v1_get_model_files_response.py +27 -1
  45. lightning_sdk/lightning_cloud/openapi/models/v1_google_cloud_direct_v1.py +53 -1
  46. lightning_sdk/lightning_cloud/openapi/models/v1_job_spec.py +53 -53
  47. lightning_sdk/lightning_cloud/openapi/models/v1_lambda_labs_direct_v1.py +125 -0
  48. lightning_sdk/lightning_cloud/openapi/models/v1_list_multi_machine_jobs_response.py +123 -0
  49. lightning_sdk/lightning_cloud/openapi/models/v1_machines_selector.py +149 -0
  50. lightning_sdk/lightning_cloud/openapi/models/v1_message.py +6 -6
  51. lightning_sdk/lightning_cloud/openapi/models/v1_message_content.py +6 -6
  52. lightning_sdk/lightning_cloud/openapi/models/v1_message_content_type.py +103 -0
  53. lightning_sdk/lightning_cloud/openapi/models/v1_metrics_stream.py +53 -1
  54. lightning_sdk/lightning_cloud/openapi/models/v1_multi_machine_job.py +409 -0
  55. lightning_sdk/lightning_cloud/openapi/models/v1_multi_machine_job_state.py +106 -0
  56. lightning_sdk/lightning_cloud/openapi/models/v1_multi_machine_job_status.py +279 -0
  57. lightning_sdk/lightning_cloud/openapi/models/v1_rule_resource.py +2 -0
  58. lightning_sdk/lightning_cloud/openapi/models/v1_system_info.py +27 -1
  59. lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +53 -1
  60. lightning_sdk/lightning_cloud/openapi/models/v1_user_requested_compute_config.py +27 -1
  61. lightning_sdk/lightning_cloud/openapi/models/v1_validate_data_connection_response.py +6 -32
  62. lightning_sdk/lightning_cloud/openapi/models/validate.py +6 -32
  63. lightning_sdk/models.py +132 -0
  64. lightning_sdk/teamspace.py +8 -2
  65. {lightning_sdk-0.1.37.dist-info → lightning_sdk-0.1.39.dist-info}/METADATA +1 -1
  66. {lightning_sdk-0.1.37.dist-info → lightning_sdk-0.1.39.dist-info}/RECORD +70 -59
  67. lightning_sdk/cli/models.py +0 -68
  68. lightning_sdk/lightning_cloud/openapi/models/v1_efs_folder_data_connection.py +0 -201
  69. {lightning_sdk-0.1.37.dist-info → lightning_sdk-0.1.39.dist-info}/LICENSE +0 -0
  70. {lightning_sdk-0.1.37.dist-info → lightning_sdk-0.1.39.dist-info}/WHEEL +0 -0
  71. {lightning_sdk-0.1.37.dist-info → lightning_sdk-0.1.39.dist-info}/entry_points.txt +0 -0
  72. {lightning_sdk-0.1.37.dist-info → lightning_sdk-0.1.39.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,409 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ external/v1/auth_service.proto
5
+
6
+ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
7
+
8
+ OpenAPI spec version: version not set
9
+
10
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
11
+
12
+ NOTE
13
+ ----
14
+ standard swagger-codegen-cli for this python client has been modified
15
+ by custom templates. The purpose of these templates is to include
16
+ typing information in the API and Model code. Please refer to the
17
+ main grid repository for more info
18
+ """
19
+
20
+ import pprint
21
+ import re # noqa: F401
22
+
23
+ from typing import TYPE_CHECKING
24
+
25
+ import six
26
+
27
+ if TYPE_CHECKING:
28
+ from datetime import datetime
29
+ from lightning_sdk.lightning_cloud.openapi.models import *
30
+
31
+ class V1MultiMachineJob(object):
32
+ """NOTE: This class is auto generated by the swagger code generator program.
33
+
34
+ Do not edit the class manually.
35
+ """
36
+ """
37
+ Attributes:
38
+ swagger_types (dict): The key is attribute name
39
+ and the value is attribute type.
40
+ attribute_map (dict): The key is attribute name
41
+ and the value is json key in definition.
42
+ """
43
+ swagger_types = {
44
+ 'cloudspace_id': 'str',
45
+ 'created_at': 'datetime',
46
+ 'desired_state': 'V1MultiMachineJobState',
47
+ 'id': 'str',
48
+ 'machines': 'int',
49
+ 'message': 'str',
50
+ 'name': 'str',
51
+ 'project_id': 'str',
52
+ 'spec': 'V1JobSpec',
53
+ 'status': 'V1MultiMachineJobStatus',
54
+ 'updated_at': 'datetime',
55
+ 'user_id': 'str'
56
+ }
57
+
58
+ attribute_map = {
59
+ 'cloudspace_id': 'cloudspaceId',
60
+ 'created_at': 'createdAt',
61
+ 'desired_state': 'desiredState',
62
+ 'id': 'id',
63
+ 'machines': 'machines',
64
+ 'message': 'message',
65
+ 'name': 'name',
66
+ 'project_id': 'projectId',
67
+ 'spec': 'spec',
68
+ 'status': 'status',
69
+ 'updated_at': 'updatedAt',
70
+ 'user_id': 'userId'
71
+ }
72
+
73
+ def __init__(self, cloudspace_id: 'str' =None, created_at: 'datetime' =None, desired_state: 'V1MultiMachineJobState' =None, id: 'str' =None, machines: 'int' =None, message: 'str' =None, name: 'str' =None, project_id: 'str' =None, spec: 'V1JobSpec' =None, status: 'V1MultiMachineJobStatus' =None, updated_at: 'datetime' =None, user_id: 'str' =None): # noqa: E501
74
+ """V1MultiMachineJob - a model defined in Swagger""" # noqa: E501
75
+ self._cloudspace_id = None
76
+ self._created_at = None
77
+ self._desired_state = None
78
+ self._id = None
79
+ self._machines = None
80
+ self._message = None
81
+ self._name = None
82
+ self._project_id = None
83
+ self._spec = None
84
+ self._status = None
85
+ self._updated_at = None
86
+ self._user_id = None
87
+ self.discriminator = None
88
+ if cloudspace_id is not None:
89
+ self.cloudspace_id = cloudspace_id
90
+ if created_at is not None:
91
+ self.created_at = created_at
92
+ if desired_state is not None:
93
+ self.desired_state = desired_state
94
+ if id is not None:
95
+ self.id = id
96
+ if machines is not None:
97
+ self.machines = machines
98
+ if message is not None:
99
+ self.message = message
100
+ if name is not None:
101
+ self.name = name
102
+ if project_id is not None:
103
+ self.project_id = project_id
104
+ if spec is not None:
105
+ self.spec = spec
106
+ if status is not None:
107
+ self.status = status
108
+ if updated_at is not None:
109
+ self.updated_at = updated_at
110
+ if user_id is not None:
111
+ self.user_id = user_id
112
+
113
+ @property
114
+ def cloudspace_id(self) -> 'str':
115
+ """Gets the cloudspace_id of this V1MultiMachineJob. # noqa: E501
116
+
117
+
118
+ :return: The cloudspace_id of this V1MultiMachineJob. # noqa: E501
119
+ :rtype: str
120
+ """
121
+ return self._cloudspace_id
122
+
123
+ @cloudspace_id.setter
124
+ def cloudspace_id(self, cloudspace_id: 'str'):
125
+ """Sets the cloudspace_id of this V1MultiMachineJob.
126
+
127
+
128
+ :param cloudspace_id: The cloudspace_id of this V1MultiMachineJob. # noqa: E501
129
+ :type: str
130
+ """
131
+
132
+ self._cloudspace_id = cloudspace_id
133
+
134
+ @property
135
+ def created_at(self) -> 'datetime':
136
+ """Gets the created_at of this V1MultiMachineJob. # noqa: E501
137
+
138
+
139
+ :return: The created_at of this V1MultiMachineJob. # noqa: E501
140
+ :rtype: datetime
141
+ """
142
+ return self._created_at
143
+
144
+ @created_at.setter
145
+ def created_at(self, created_at: 'datetime'):
146
+ """Sets the created_at of this V1MultiMachineJob.
147
+
148
+
149
+ :param created_at: The created_at of this V1MultiMachineJob. # noqa: E501
150
+ :type: datetime
151
+ """
152
+
153
+ self._created_at = created_at
154
+
155
+ @property
156
+ def desired_state(self) -> 'V1MultiMachineJobState':
157
+ """Gets the desired_state of this V1MultiMachineJob. # noqa: E501
158
+
159
+
160
+ :return: The desired_state of this V1MultiMachineJob. # noqa: E501
161
+ :rtype: V1MultiMachineJobState
162
+ """
163
+ return self._desired_state
164
+
165
+ @desired_state.setter
166
+ def desired_state(self, desired_state: 'V1MultiMachineJobState'):
167
+ """Sets the desired_state of this V1MultiMachineJob.
168
+
169
+
170
+ :param desired_state: The desired_state of this V1MultiMachineJob. # noqa: E501
171
+ :type: V1MultiMachineJobState
172
+ """
173
+
174
+ self._desired_state = desired_state
175
+
176
+ @property
177
+ def id(self) -> 'str':
178
+ """Gets the id of this V1MultiMachineJob. # noqa: E501
179
+
180
+
181
+ :return: The id of this V1MultiMachineJob. # noqa: E501
182
+ :rtype: str
183
+ """
184
+ return self._id
185
+
186
+ @id.setter
187
+ def id(self, id: 'str'):
188
+ """Sets the id of this V1MultiMachineJob.
189
+
190
+
191
+ :param id: The id of this V1MultiMachineJob. # noqa: E501
192
+ :type: str
193
+ """
194
+
195
+ self._id = id
196
+
197
+ @property
198
+ def machines(self) -> 'int':
199
+ """Gets the machines of this V1MultiMachineJob. # noqa: E501
200
+
201
+
202
+ :return: The machines of this V1MultiMachineJob. # noqa: E501
203
+ :rtype: int
204
+ """
205
+ return self._machines
206
+
207
+ @machines.setter
208
+ def machines(self, machines: 'int'):
209
+ """Sets the machines of this V1MultiMachineJob.
210
+
211
+
212
+ :param machines: The machines of this V1MultiMachineJob. # noqa: E501
213
+ :type: int
214
+ """
215
+
216
+ self._machines = machines
217
+
218
+ @property
219
+ def message(self) -> 'str':
220
+ """Gets the message of this V1MultiMachineJob. # noqa: E501
221
+
222
+
223
+ :return: The message of this V1MultiMachineJob. # noqa: E501
224
+ :rtype: str
225
+ """
226
+ return self._message
227
+
228
+ @message.setter
229
+ def message(self, message: 'str'):
230
+ """Sets the message of this V1MultiMachineJob.
231
+
232
+
233
+ :param message: The message of this V1MultiMachineJob. # noqa: E501
234
+ :type: str
235
+ """
236
+
237
+ self._message = message
238
+
239
+ @property
240
+ def name(self) -> 'str':
241
+ """Gets the name of this V1MultiMachineJob. # noqa: E501
242
+
243
+
244
+ :return: The name of this V1MultiMachineJob. # noqa: E501
245
+ :rtype: str
246
+ """
247
+ return self._name
248
+
249
+ @name.setter
250
+ def name(self, name: 'str'):
251
+ """Sets the name of this V1MultiMachineJob.
252
+
253
+
254
+ :param name: The name of this V1MultiMachineJob. # noqa: E501
255
+ :type: str
256
+ """
257
+
258
+ self._name = name
259
+
260
+ @property
261
+ def project_id(self) -> 'str':
262
+ """Gets the project_id of this V1MultiMachineJob. # noqa: E501
263
+
264
+
265
+ :return: The project_id of this V1MultiMachineJob. # noqa: E501
266
+ :rtype: str
267
+ """
268
+ return self._project_id
269
+
270
+ @project_id.setter
271
+ def project_id(self, project_id: 'str'):
272
+ """Sets the project_id of this V1MultiMachineJob.
273
+
274
+
275
+ :param project_id: The project_id of this V1MultiMachineJob. # noqa: E501
276
+ :type: str
277
+ """
278
+
279
+ self._project_id = project_id
280
+
281
+ @property
282
+ def spec(self) -> 'V1JobSpec':
283
+ """Gets the spec of this V1MultiMachineJob. # noqa: E501
284
+
285
+
286
+ :return: The spec of this V1MultiMachineJob. # noqa: E501
287
+ :rtype: V1JobSpec
288
+ """
289
+ return self._spec
290
+
291
+ @spec.setter
292
+ def spec(self, spec: 'V1JobSpec'):
293
+ """Sets the spec of this V1MultiMachineJob.
294
+
295
+
296
+ :param spec: The spec of this V1MultiMachineJob. # noqa: E501
297
+ :type: V1JobSpec
298
+ """
299
+
300
+ self._spec = spec
301
+
302
+ @property
303
+ def status(self) -> 'V1MultiMachineJobStatus':
304
+ """Gets the status of this V1MultiMachineJob. # noqa: E501
305
+
306
+
307
+ :return: The status of this V1MultiMachineJob. # noqa: E501
308
+ :rtype: V1MultiMachineJobStatus
309
+ """
310
+ return self._status
311
+
312
+ @status.setter
313
+ def status(self, status: 'V1MultiMachineJobStatus'):
314
+ """Sets the status of this V1MultiMachineJob.
315
+
316
+
317
+ :param status: The status of this V1MultiMachineJob. # noqa: E501
318
+ :type: V1MultiMachineJobStatus
319
+ """
320
+
321
+ self._status = status
322
+
323
+ @property
324
+ def updated_at(self) -> 'datetime':
325
+ """Gets the updated_at of this V1MultiMachineJob. # noqa: E501
326
+
327
+
328
+ :return: The updated_at of this V1MultiMachineJob. # noqa: E501
329
+ :rtype: datetime
330
+ """
331
+ return self._updated_at
332
+
333
+ @updated_at.setter
334
+ def updated_at(self, updated_at: 'datetime'):
335
+ """Sets the updated_at of this V1MultiMachineJob.
336
+
337
+
338
+ :param updated_at: The updated_at of this V1MultiMachineJob. # noqa: E501
339
+ :type: datetime
340
+ """
341
+
342
+ self._updated_at = updated_at
343
+
344
+ @property
345
+ def user_id(self) -> 'str':
346
+ """Gets the user_id of this V1MultiMachineJob. # noqa: E501
347
+
348
+
349
+ :return: The user_id of this V1MultiMachineJob. # noqa: E501
350
+ :rtype: str
351
+ """
352
+ return self._user_id
353
+
354
+ @user_id.setter
355
+ def user_id(self, user_id: 'str'):
356
+ """Sets the user_id of this V1MultiMachineJob.
357
+
358
+
359
+ :param user_id: The user_id of this V1MultiMachineJob. # noqa: E501
360
+ :type: str
361
+ """
362
+
363
+ self._user_id = user_id
364
+
365
+ def to_dict(self) -> dict:
366
+ """Returns the model properties as a dict"""
367
+ result = {}
368
+
369
+ for attr, _ in six.iteritems(self.swagger_types):
370
+ value = getattr(self, attr)
371
+ if isinstance(value, list):
372
+ result[attr] = list(map(
373
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
374
+ value
375
+ ))
376
+ elif hasattr(value, "to_dict"):
377
+ result[attr] = value.to_dict()
378
+ elif isinstance(value, dict):
379
+ result[attr] = dict(map(
380
+ lambda item: (item[0], item[1].to_dict())
381
+ if hasattr(item[1], "to_dict") else item,
382
+ value.items()
383
+ ))
384
+ else:
385
+ result[attr] = value
386
+ if issubclass(V1MultiMachineJob, dict):
387
+ for key, value in self.items():
388
+ result[key] = value
389
+
390
+ return result
391
+
392
+ def to_str(self) -> str:
393
+ """Returns the string representation of the model"""
394
+ return pprint.pformat(self.to_dict())
395
+
396
+ def __repr__(self) -> str:
397
+ """For `print` and `pprint`"""
398
+ return self.to_str()
399
+
400
+ def __eq__(self, other: 'V1MultiMachineJob') -> bool:
401
+ """Returns true if both objects are equal"""
402
+ if not isinstance(other, V1MultiMachineJob):
403
+ return False
404
+
405
+ return self.__dict__ == other.__dict__
406
+
407
+ def __ne__(self, other: 'V1MultiMachineJob') -> bool:
408
+ """Returns true if both objects are not equal"""
409
+ return not self == other
@@ -0,0 +1,106 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ external/v1/auth_service.proto
5
+
6
+ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
7
+
8
+ OpenAPI spec version: version not set
9
+
10
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
11
+
12
+ NOTE
13
+ ----
14
+ standard swagger-codegen-cli for this python client has been modified
15
+ by custom templates. The purpose of these templates is to include
16
+ typing information in the API and Model code. Please refer to the
17
+ main grid repository for more info
18
+ """
19
+
20
+ import pprint
21
+ import re # noqa: F401
22
+
23
+ from typing import TYPE_CHECKING
24
+
25
+ import six
26
+
27
+ if TYPE_CHECKING:
28
+ from datetime import datetime
29
+ from lightning_sdk.lightning_cloud.openapi.models import *
30
+
31
+ class V1MultiMachineJobState(object):
32
+ """NOTE: This class is auto generated by the swagger code generator program.
33
+
34
+ Do not edit the class manually.
35
+ """
36
+
37
+ """
38
+ allowed enum values
39
+ """
40
+ UNSPECIFIED = "MultiMachineJob_STATE_UNSPECIFIED"
41
+ RUNNING = "MultiMachineJob_STATE_RUNNING"
42
+ STOPPED = "MultiMachineJob_STATE_STOPPED"
43
+ DELETED = "MultiMachineJob_STATE_DELETED"
44
+ FAILED = "MultiMachineJob_STATE_FAILED"
45
+ """
46
+ Attributes:
47
+ swagger_types (dict): The key is attribute name
48
+ and the value is attribute type.
49
+ attribute_map (dict): The key is attribute name
50
+ and the value is json key in definition.
51
+ """
52
+ swagger_types = {
53
+ }
54
+
55
+ attribute_map = {
56
+ }
57
+
58
+ def __init__(self): # noqa: E501
59
+ """V1MultiMachineJobState - a model defined in Swagger""" # noqa: E501
60
+ self.discriminator = None
61
+
62
+ def to_dict(self) -> dict:
63
+ """Returns the model properties as a dict"""
64
+ result = {}
65
+
66
+ for attr, _ in six.iteritems(self.swagger_types):
67
+ value = getattr(self, attr)
68
+ if isinstance(value, list):
69
+ result[attr] = list(map(
70
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
71
+ value
72
+ ))
73
+ elif hasattr(value, "to_dict"):
74
+ result[attr] = value.to_dict()
75
+ elif isinstance(value, dict):
76
+ result[attr] = dict(map(
77
+ lambda item: (item[0], item[1].to_dict())
78
+ if hasattr(item[1], "to_dict") else item,
79
+ value.items()
80
+ ))
81
+ else:
82
+ result[attr] = value
83
+ if issubclass(V1MultiMachineJobState, dict):
84
+ for key, value in self.items():
85
+ result[key] = value
86
+
87
+ return result
88
+
89
+ def to_str(self) -> str:
90
+ """Returns the string representation of the model"""
91
+ return pprint.pformat(self.to_dict())
92
+
93
+ def __repr__(self) -> str:
94
+ """For `print` and `pprint`"""
95
+ return self.to_str()
96
+
97
+ def __eq__(self, other: 'V1MultiMachineJobState') -> bool:
98
+ """Returns true if both objects are equal"""
99
+ if not isinstance(other, V1MultiMachineJobState):
100
+ return False
101
+
102
+ return self.__dict__ == other.__dict__
103
+
104
+ def __ne__(self, other: 'V1MultiMachineJobState') -> bool:
105
+ """Returns true if both objects are not equal"""
106
+ return not self == other