lightning-sdk 0.1.41__py3-none-any.whl → 0.1.43__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 (77) hide show
  1. lightning_sdk/__init__.py +1 -1
  2. lightning_sdk/ai_hub.py +8 -3
  3. lightning_sdk/api/ai_hub_api.py +3 -3
  4. lightning_sdk/api/deployment_api.py +6 -6
  5. lightning_sdk/api/job_api.py +32 -6
  6. lightning_sdk/api/mmt_api.py +59 -19
  7. lightning_sdk/api/studio_api.py +37 -19
  8. lightning_sdk/api/teamspace_api.py +34 -29
  9. lightning_sdk/api/utils.py +46 -34
  10. lightning_sdk/cli/ai_hub.py +3 -3
  11. lightning_sdk/cli/entrypoint.py +3 -1
  12. lightning_sdk/cli/run.py +122 -12
  13. lightning_sdk/cli/serve.py +218 -0
  14. lightning_sdk/deployment/deployment.py +18 -12
  15. lightning_sdk/job/base.py +118 -24
  16. lightning_sdk/job/job.py +98 -9
  17. lightning_sdk/job/v1.py +75 -18
  18. lightning_sdk/job/v2.py +51 -15
  19. lightning_sdk/job/work.py +36 -7
  20. lightning_sdk/lightning_cloud/openapi/__init__.py +12 -0
  21. lightning_sdk/lightning_cloud/openapi/api/jobs_service_api.py +215 -5
  22. lightning_sdk/lightning_cloud/openapi/api/lit_logger_service_api.py +218 -0
  23. lightning_sdk/lightning_cloud/openapi/api/models_store_api.py +226 -0
  24. lightning_sdk/lightning_cloud/openapi/api/snowflake_service_api.py +21 -1
  25. lightning_sdk/lightning_cloud/openapi/models/__init__.py +12 -0
  26. lightning_sdk/lightning_cloud/openapi/models/deploymenttemplates_id_body.py +27 -1
  27. lightning_sdk/lightning_cloud/openapi/models/id_visibility_body.py +123 -0
  28. lightning_sdk/lightning_cloud/openapi/models/model_id_versions_body.py +29 -3
  29. lightning_sdk/lightning_cloud/openapi/models/project_id_multimachinejobs_body.py +27 -1
  30. lightning_sdk/lightning_cloud/openapi/models/project_id_snowflake_body.py +15 -67
  31. lightning_sdk/lightning_cloud/openapi/models/query_query_id_body.py +17 -69
  32. lightning_sdk/lightning_cloud/openapi/models/snowflake_export_body.py +29 -81
  33. lightning_sdk/lightning_cloud/openapi/models/snowflake_query_body.py +17 -69
  34. lightning_sdk/lightning_cloud/openapi/models/v1_get_model_file_url_response.py +27 -1
  35. lightning_sdk/lightning_cloud/openapi/models/v1_get_model_files_response.py +17 -17
  36. lightning_sdk/lightning_cloud/openapi/models/v1_get_model_files_url_response.py +149 -0
  37. lightning_sdk/lightning_cloud/openapi/models/v1_get_project_balance_response.py +27 -1
  38. lightning_sdk/lightning_cloud/openapi/models/v1_list_multi_machine_job_events_response.py +123 -0
  39. lightning_sdk/lightning_cloud/openapi/models/v1_metrics_stream.py +27 -1
  40. lightning_sdk/lightning_cloud/openapi/models/v1_model_file.py +175 -0
  41. lightning_sdk/lightning_cloud/openapi/models/v1_multi_machine_job.py +27 -1
  42. lightning_sdk/lightning_cloud/openapi/models/v1_multi_machine_job_event.py +331 -0
  43. lightning_sdk/lightning_cloud/openapi/models/v1_multi_machine_job_event_type.py +104 -0
  44. lightning_sdk/lightning_cloud/openapi/models/v1_multi_machine_job_fault_tolerance.py +149 -0
  45. lightning_sdk/lightning_cloud/openapi/models/v1_multi_machine_job_fault_tolerance_strategy.py +105 -0
  46. lightning_sdk/lightning_cloud/openapi/models/v1_multi_machine_job_status.py +27 -1
  47. lightning_sdk/lightning_cloud/openapi/models/v1_rule_resource.py +1 -0
  48. lightning_sdk/lightning_cloud/openapi/models/v1_snowflake_data_connection.py +29 -81
  49. lightning_sdk/lightning_cloud/openapi/models/v1_system_metrics.py +29 -3
  50. lightning_sdk/lightning_cloud/openapi/models/v1_trainium_system_metrics.py +175 -0
  51. lightning_sdk/lightning_cloud/openapi/models/v1_update_metrics_stream_visibility_response.py +97 -0
  52. lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +27 -53
  53. lightning_sdk/lightning_cloud/openapi/models/v1_validate_deployment_image_request.py +149 -0
  54. lightning_sdk/lightning_cloud/openapi/models/v1_validate_deployment_image_response.py +97 -0
  55. lightning_sdk/lightning_cloud/rest_client.py +2 -0
  56. lightning_sdk/mmt/__init__.py +4 -0
  57. lightning_sdk/mmt/base.py +278 -0
  58. lightning_sdk/mmt/mmt.py +267 -0
  59. lightning_sdk/mmt/v1.py +181 -0
  60. lightning_sdk/mmt/v2.py +188 -0
  61. lightning_sdk/plugin.py +43 -16
  62. lightning_sdk/services/file_endpoint.py +11 -5
  63. lightning_sdk/studio.py +16 -9
  64. lightning_sdk/teamspace.py +21 -8
  65. lightning_sdk/utils/resolve.py +18 -0
  66. {lightning_sdk-0.1.41.dist-info → lightning_sdk-0.1.43.dist-info}/METADATA +4 -1
  67. {lightning_sdk-0.1.41.dist-info → lightning_sdk-0.1.43.dist-info}/RECORD +71 -59
  68. {lightning_sdk-0.1.41.dist-info → lightning_sdk-0.1.43.dist-info}/entry_points.txt +0 -1
  69. lightning_sdk/_mmt/__init__.py +0 -3
  70. lightning_sdk/_mmt/base.py +0 -180
  71. lightning_sdk/_mmt/mmt.py +0 -161
  72. lightning_sdk/_mmt/v1.py +0 -69
  73. lightning_sdk/_mmt/v2.py +0 -141
  74. lightning_sdk/cli/mmt.py +0 -137
  75. {lightning_sdk-0.1.41.dist-info → lightning_sdk-0.1.43.dist-info}/LICENSE +0 -0
  76. {lightning_sdk-0.1.41.dist-info → lightning_sdk-0.1.43.dist-info}/WHEEL +0 -0
  77. {lightning_sdk-0.1.41.dist-info → lightning_sdk-0.1.43.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,331 @@
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 V1MultiMachineJobEvent(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
+ 'action': 'str',
45
+ 'id': 'str',
46
+ 'job_id': 'str',
47
+ 'message': 'str',
48
+ 'multi_machine_job_id': 'str',
49
+ 'project_id': 'str',
50
+ 'reason': 'str',
51
+ 'timestamp': 'datetime',
52
+ 'type': 'V1MultiMachineJobEventType'
53
+ }
54
+
55
+ attribute_map = {
56
+ 'action': 'action',
57
+ 'id': 'id',
58
+ 'job_id': 'jobId',
59
+ 'message': 'message',
60
+ 'multi_machine_job_id': 'multiMachineJobId',
61
+ 'project_id': 'projectId',
62
+ 'reason': 'reason',
63
+ 'timestamp': 'timestamp',
64
+ 'type': 'type'
65
+ }
66
+
67
+ def __init__(self, action: 'str' =None, id: 'str' =None, job_id: 'str' =None, message: 'str' =None, multi_machine_job_id: 'str' =None, project_id: 'str' =None, reason: 'str' =None, timestamp: 'datetime' =None, type: 'V1MultiMachineJobEventType' =None): # noqa: E501
68
+ """V1MultiMachineJobEvent - a model defined in Swagger""" # noqa: E501
69
+ self._action = None
70
+ self._id = None
71
+ self._job_id = None
72
+ self._message = None
73
+ self._multi_machine_job_id = None
74
+ self._project_id = None
75
+ self._reason = None
76
+ self._timestamp = None
77
+ self._type = None
78
+ self.discriminator = None
79
+ if action is not None:
80
+ self.action = action
81
+ if id is not None:
82
+ self.id = id
83
+ if job_id is not None:
84
+ self.job_id = job_id
85
+ if message is not None:
86
+ self.message = message
87
+ if multi_machine_job_id is not None:
88
+ self.multi_machine_job_id = multi_machine_job_id
89
+ if project_id is not None:
90
+ self.project_id = project_id
91
+ if reason is not None:
92
+ self.reason = reason
93
+ if timestamp is not None:
94
+ self.timestamp = timestamp
95
+ if type is not None:
96
+ self.type = type
97
+
98
+ @property
99
+ def action(self) -> 'str':
100
+ """Gets the action of this V1MultiMachineJobEvent. # noqa: E501
101
+
102
+
103
+ :return: The action of this V1MultiMachineJobEvent. # noqa: E501
104
+ :rtype: str
105
+ """
106
+ return self._action
107
+
108
+ @action.setter
109
+ def action(self, action: 'str'):
110
+ """Sets the action of this V1MultiMachineJobEvent.
111
+
112
+
113
+ :param action: The action of this V1MultiMachineJobEvent. # noqa: E501
114
+ :type: str
115
+ """
116
+
117
+ self._action = action
118
+
119
+ @property
120
+ def id(self) -> 'str':
121
+ """Gets the id of this V1MultiMachineJobEvent. # noqa: E501
122
+
123
+
124
+ :return: The id of this V1MultiMachineJobEvent. # noqa: E501
125
+ :rtype: str
126
+ """
127
+ return self._id
128
+
129
+ @id.setter
130
+ def id(self, id: 'str'):
131
+ """Sets the id of this V1MultiMachineJobEvent.
132
+
133
+
134
+ :param id: The id of this V1MultiMachineJobEvent. # noqa: E501
135
+ :type: str
136
+ """
137
+
138
+ self._id = id
139
+
140
+ @property
141
+ def job_id(self) -> 'str':
142
+ """Gets the job_id of this V1MultiMachineJobEvent. # noqa: E501
143
+
144
+
145
+ :return: The job_id of this V1MultiMachineJobEvent. # noqa: E501
146
+ :rtype: str
147
+ """
148
+ return self._job_id
149
+
150
+ @job_id.setter
151
+ def job_id(self, job_id: 'str'):
152
+ """Sets the job_id of this V1MultiMachineJobEvent.
153
+
154
+
155
+ :param job_id: The job_id of this V1MultiMachineJobEvent. # noqa: E501
156
+ :type: str
157
+ """
158
+
159
+ self._job_id = job_id
160
+
161
+ @property
162
+ def message(self) -> 'str':
163
+ """Gets the message of this V1MultiMachineJobEvent. # noqa: E501
164
+
165
+
166
+ :return: The message of this V1MultiMachineJobEvent. # noqa: E501
167
+ :rtype: str
168
+ """
169
+ return self._message
170
+
171
+ @message.setter
172
+ def message(self, message: 'str'):
173
+ """Sets the message of this V1MultiMachineJobEvent.
174
+
175
+
176
+ :param message: The message of this V1MultiMachineJobEvent. # noqa: E501
177
+ :type: str
178
+ """
179
+
180
+ self._message = message
181
+
182
+ @property
183
+ def multi_machine_job_id(self) -> 'str':
184
+ """Gets the multi_machine_job_id of this V1MultiMachineJobEvent. # noqa: E501
185
+
186
+
187
+ :return: The multi_machine_job_id of this V1MultiMachineJobEvent. # noqa: E501
188
+ :rtype: str
189
+ """
190
+ return self._multi_machine_job_id
191
+
192
+ @multi_machine_job_id.setter
193
+ def multi_machine_job_id(self, multi_machine_job_id: 'str'):
194
+ """Sets the multi_machine_job_id of this V1MultiMachineJobEvent.
195
+
196
+
197
+ :param multi_machine_job_id: The multi_machine_job_id of this V1MultiMachineJobEvent. # noqa: E501
198
+ :type: str
199
+ """
200
+
201
+ self._multi_machine_job_id = multi_machine_job_id
202
+
203
+ @property
204
+ def project_id(self) -> 'str':
205
+ """Gets the project_id of this V1MultiMachineJobEvent. # noqa: E501
206
+
207
+
208
+ :return: The project_id of this V1MultiMachineJobEvent. # noqa: E501
209
+ :rtype: str
210
+ """
211
+ return self._project_id
212
+
213
+ @project_id.setter
214
+ def project_id(self, project_id: 'str'):
215
+ """Sets the project_id of this V1MultiMachineJobEvent.
216
+
217
+
218
+ :param project_id: The project_id of this V1MultiMachineJobEvent. # noqa: E501
219
+ :type: str
220
+ """
221
+
222
+ self._project_id = project_id
223
+
224
+ @property
225
+ def reason(self) -> 'str':
226
+ """Gets the reason of this V1MultiMachineJobEvent. # noqa: E501
227
+
228
+
229
+ :return: The reason of this V1MultiMachineJobEvent. # noqa: E501
230
+ :rtype: str
231
+ """
232
+ return self._reason
233
+
234
+ @reason.setter
235
+ def reason(self, reason: 'str'):
236
+ """Sets the reason of this V1MultiMachineJobEvent.
237
+
238
+
239
+ :param reason: The reason of this V1MultiMachineJobEvent. # noqa: E501
240
+ :type: str
241
+ """
242
+
243
+ self._reason = reason
244
+
245
+ @property
246
+ def timestamp(self) -> 'datetime':
247
+ """Gets the timestamp of this V1MultiMachineJobEvent. # noqa: E501
248
+
249
+
250
+ :return: The timestamp of this V1MultiMachineJobEvent. # noqa: E501
251
+ :rtype: datetime
252
+ """
253
+ return self._timestamp
254
+
255
+ @timestamp.setter
256
+ def timestamp(self, timestamp: 'datetime'):
257
+ """Sets the timestamp of this V1MultiMachineJobEvent.
258
+
259
+
260
+ :param timestamp: The timestamp of this V1MultiMachineJobEvent. # noqa: E501
261
+ :type: datetime
262
+ """
263
+
264
+ self._timestamp = timestamp
265
+
266
+ @property
267
+ def type(self) -> 'V1MultiMachineJobEventType':
268
+ """Gets the type of this V1MultiMachineJobEvent. # noqa: E501
269
+
270
+
271
+ :return: The type of this V1MultiMachineJobEvent. # noqa: E501
272
+ :rtype: V1MultiMachineJobEventType
273
+ """
274
+ return self._type
275
+
276
+ @type.setter
277
+ def type(self, type: 'V1MultiMachineJobEventType'):
278
+ """Sets the type of this V1MultiMachineJobEvent.
279
+
280
+
281
+ :param type: The type of this V1MultiMachineJobEvent. # noqa: E501
282
+ :type: V1MultiMachineJobEventType
283
+ """
284
+
285
+ self._type = type
286
+
287
+ def to_dict(self) -> dict:
288
+ """Returns the model properties as a dict"""
289
+ result = {}
290
+
291
+ for attr, _ in six.iteritems(self.swagger_types):
292
+ value = getattr(self, attr)
293
+ if isinstance(value, list):
294
+ result[attr] = list(map(
295
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
296
+ value
297
+ ))
298
+ elif hasattr(value, "to_dict"):
299
+ result[attr] = value.to_dict()
300
+ elif isinstance(value, dict):
301
+ result[attr] = dict(map(
302
+ lambda item: (item[0], item[1].to_dict())
303
+ if hasattr(item[1], "to_dict") else item,
304
+ value.items()
305
+ ))
306
+ else:
307
+ result[attr] = value
308
+ if issubclass(V1MultiMachineJobEvent, dict):
309
+ for key, value in self.items():
310
+ result[key] = value
311
+
312
+ return result
313
+
314
+ def to_str(self) -> str:
315
+ """Returns the string representation of the model"""
316
+ return pprint.pformat(self.to_dict())
317
+
318
+ def __repr__(self) -> str:
319
+ """For `print` and `pprint`"""
320
+ return self.to_str()
321
+
322
+ def __eq__(self, other: 'V1MultiMachineJobEvent') -> bool:
323
+ """Returns true if both objects are equal"""
324
+ if not isinstance(other, V1MultiMachineJobEvent):
325
+ return False
326
+
327
+ return self.__dict__ == other.__dict__
328
+
329
+ def __ne__(self, other: 'V1MultiMachineJobEvent') -> bool:
330
+ """Returns true if both objects are not equal"""
331
+ return not self == other
@@ -0,0 +1,104 @@
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 V1MultiMachineJobEventType(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 = "MULTI_MACHINE_JOB_EVENT_TYPE_UNSPECIFIED"
41
+ INFO = "MULTI_MACHINE_JOB_EVENT_TYPE_INFO"
42
+ WARNING = "MULTI_MACHINE_JOB_EVENT_TYPE_WARNING"
43
+ """
44
+ Attributes:
45
+ swagger_types (dict): The key is attribute name
46
+ and the value is attribute type.
47
+ attribute_map (dict): The key is attribute name
48
+ and the value is json key in definition.
49
+ """
50
+ swagger_types = {
51
+ }
52
+
53
+ attribute_map = {
54
+ }
55
+
56
+ def __init__(self): # noqa: E501
57
+ """V1MultiMachineJobEventType - a model defined in Swagger""" # noqa: E501
58
+ self.discriminator = None
59
+
60
+ def to_dict(self) -> dict:
61
+ """Returns the model properties as a dict"""
62
+ result = {}
63
+
64
+ for attr, _ in six.iteritems(self.swagger_types):
65
+ value = getattr(self, attr)
66
+ if isinstance(value, list):
67
+ result[attr] = list(map(
68
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
69
+ value
70
+ ))
71
+ elif hasattr(value, "to_dict"):
72
+ result[attr] = value.to_dict()
73
+ elif isinstance(value, dict):
74
+ result[attr] = dict(map(
75
+ lambda item: (item[0], item[1].to_dict())
76
+ if hasattr(item[1], "to_dict") else item,
77
+ value.items()
78
+ ))
79
+ else:
80
+ result[attr] = value
81
+ if issubclass(V1MultiMachineJobEventType, dict):
82
+ for key, value in self.items():
83
+ result[key] = value
84
+
85
+ return result
86
+
87
+ def to_str(self) -> str:
88
+ """Returns the string representation of the model"""
89
+ return pprint.pformat(self.to_dict())
90
+
91
+ def __repr__(self) -> str:
92
+ """For `print` and `pprint`"""
93
+ return self.to_str()
94
+
95
+ def __eq__(self, other: 'V1MultiMachineJobEventType') -> bool:
96
+ """Returns true if both objects are equal"""
97
+ if not isinstance(other, V1MultiMachineJobEventType):
98
+ return False
99
+
100
+ return self.__dict__ == other.__dict__
101
+
102
+ def __ne__(self, other: 'V1MultiMachineJobEventType') -> bool:
103
+ """Returns true if both objects are not equal"""
104
+ return not self == other
@@ -0,0 +1,149 @@
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 V1MultiMachineJobFaultTolerance(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
+ 'max_retries': 'int',
45
+ 'strategy': 'V1MultiMachineJobFaultToleranceStrategy'
46
+ }
47
+
48
+ attribute_map = {
49
+ 'max_retries': 'maxRetries',
50
+ 'strategy': 'strategy'
51
+ }
52
+
53
+ def __init__(self, max_retries: 'int' =None, strategy: 'V1MultiMachineJobFaultToleranceStrategy' =None): # noqa: E501
54
+ """V1MultiMachineJobFaultTolerance - a model defined in Swagger""" # noqa: E501
55
+ self._max_retries = None
56
+ self._strategy = None
57
+ self.discriminator = None
58
+ if max_retries is not None:
59
+ self.max_retries = max_retries
60
+ if strategy is not None:
61
+ self.strategy = strategy
62
+
63
+ @property
64
+ def max_retries(self) -> 'int':
65
+ """Gets the max_retries of this V1MultiMachineJobFaultTolerance. # noqa: E501
66
+
67
+
68
+ :return: The max_retries of this V1MultiMachineJobFaultTolerance. # noqa: E501
69
+ :rtype: int
70
+ """
71
+ return self._max_retries
72
+
73
+ @max_retries.setter
74
+ def max_retries(self, max_retries: 'int'):
75
+ """Sets the max_retries of this V1MultiMachineJobFaultTolerance.
76
+
77
+
78
+ :param max_retries: The max_retries of this V1MultiMachineJobFaultTolerance. # noqa: E501
79
+ :type: int
80
+ """
81
+
82
+ self._max_retries = max_retries
83
+
84
+ @property
85
+ def strategy(self) -> 'V1MultiMachineJobFaultToleranceStrategy':
86
+ """Gets the strategy of this V1MultiMachineJobFaultTolerance. # noqa: E501
87
+
88
+
89
+ :return: The strategy of this V1MultiMachineJobFaultTolerance. # noqa: E501
90
+ :rtype: V1MultiMachineJobFaultToleranceStrategy
91
+ """
92
+ return self._strategy
93
+
94
+ @strategy.setter
95
+ def strategy(self, strategy: 'V1MultiMachineJobFaultToleranceStrategy'):
96
+ """Sets the strategy of this V1MultiMachineJobFaultTolerance.
97
+
98
+
99
+ :param strategy: The strategy of this V1MultiMachineJobFaultTolerance. # noqa: E501
100
+ :type: V1MultiMachineJobFaultToleranceStrategy
101
+ """
102
+
103
+ self._strategy = strategy
104
+
105
+ def to_dict(self) -> dict:
106
+ """Returns the model properties as a dict"""
107
+ result = {}
108
+
109
+ for attr, _ in six.iteritems(self.swagger_types):
110
+ value = getattr(self, attr)
111
+ if isinstance(value, list):
112
+ result[attr] = list(map(
113
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
114
+ value
115
+ ))
116
+ elif hasattr(value, "to_dict"):
117
+ result[attr] = value.to_dict()
118
+ elif isinstance(value, dict):
119
+ result[attr] = dict(map(
120
+ lambda item: (item[0], item[1].to_dict())
121
+ if hasattr(item[1], "to_dict") else item,
122
+ value.items()
123
+ ))
124
+ else:
125
+ result[attr] = value
126
+ if issubclass(V1MultiMachineJobFaultTolerance, dict):
127
+ for key, value in self.items():
128
+ result[key] = value
129
+
130
+ return result
131
+
132
+ def to_str(self) -> str:
133
+ """Returns the string representation of the model"""
134
+ return pprint.pformat(self.to_dict())
135
+
136
+ def __repr__(self) -> str:
137
+ """For `print` and `pprint`"""
138
+ return self.to_str()
139
+
140
+ def __eq__(self, other: 'V1MultiMachineJobFaultTolerance') -> bool:
141
+ """Returns true if both objects are equal"""
142
+ if not isinstance(other, V1MultiMachineJobFaultTolerance):
143
+ return False
144
+
145
+ return self.__dict__ == other.__dict__
146
+
147
+ def __ne__(self, other: 'V1MultiMachineJobFaultTolerance') -> bool:
148
+ """Returns true if both objects are not equal"""
149
+ return not self == other
@@ -0,0 +1,105 @@
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 V1MultiMachineJobFaultToleranceStrategy(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 = "MULTI_MACHINE_JOB_FAULT_TOLERANCE_STRATEGY_UNSPECIFIED"
41
+ RECREATE_NODE = "MULTI_MACHINE_JOB_FAULT_TOLERANCE_STRATEGY_RECREATE_NODE"
42
+ RECREATE_NODE_AND_RESTART_ALL_PROCESSES = "MULTI_MACHINE_JOB_FAULT_TOLERANCE_STRATEGY_RECREATE_NODE_AND_RESTART_ALL_PROCESSES"
43
+ RECREATE_ALL_NODES = "MULTI_MACHINE_JOB_FAULT_TOLERANCE_STRATEGY_RECREATE_ALL_NODES"
44
+ """
45
+ Attributes:
46
+ swagger_types (dict): The key is attribute name
47
+ and the value is attribute type.
48
+ attribute_map (dict): The key is attribute name
49
+ and the value is json key in definition.
50
+ """
51
+ swagger_types = {
52
+ }
53
+
54
+ attribute_map = {
55
+ }
56
+
57
+ def __init__(self): # noqa: E501
58
+ """V1MultiMachineJobFaultToleranceStrategy - a model defined in Swagger""" # noqa: E501
59
+ self.discriminator = None
60
+
61
+ def to_dict(self) -> dict:
62
+ """Returns the model properties as a dict"""
63
+ result = {}
64
+
65
+ for attr, _ in six.iteritems(self.swagger_types):
66
+ value = getattr(self, attr)
67
+ if isinstance(value, list):
68
+ result[attr] = list(map(
69
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
70
+ value
71
+ ))
72
+ elif hasattr(value, "to_dict"):
73
+ result[attr] = value.to_dict()
74
+ elif isinstance(value, dict):
75
+ result[attr] = dict(map(
76
+ lambda item: (item[0], item[1].to_dict())
77
+ if hasattr(item[1], "to_dict") else item,
78
+ value.items()
79
+ ))
80
+ else:
81
+ result[attr] = value
82
+ if issubclass(V1MultiMachineJobFaultToleranceStrategy, dict):
83
+ for key, value in self.items():
84
+ result[key] = value
85
+
86
+ return result
87
+
88
+ def to_str(self) -> str:
89
+ """Returns the string representation of the model"""
90
+ return pprint.pformat(self.to_dict())
91
+
92
+ def __repr__(self) -> str:
93
+ """For `print` and `pprint`"""
94
+ return self.to_str()
95
+
96
+ def __eq__(self, other: 'V1MultiMachineJobFaultToleranceStrategy') -> bool:
97
+ """Returns true if both objects are equal"""
98
+ if not isinstance(other, V1MultiMachineJobFaultToleranceStrategy):
99
+ return False
100
+
101
+ return self.__dict__ == other.__dict__
102
+
103
+ def __ne__(self, other: 'V1MultiMachineJobFaultToleranceStrategy') -> bool:
104
+ """Returns true if both objects are not equal"""
105
+ return not self == other