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
@@ -46,6 +46,7 @@ class V1MultiMachineJobStatus(object):
46
46
  'message': 'str',
47
47
  'pending_machines': 'str',
48
48
  'ready_machines': 'str',
49
+ 'retries': 'str',
49
50
  'started_at': 'datetime',
50
51
  'stopped_at': 'datetime'
51
52
  }
@@ -56,17 +57,19 @@ class V1MultiMachineJobStatus(object):
56
57
  'message': 'message',
57
58
  'pending_machines': 'pendingMachines',
58
59
  'ready_machines': 'readyMachines',
60
+ 'retries': 'retries',
59
61
  'started_at': 'startedAt',
60
62
  'stopped_at': 'stoppedAt'
61
63
  }
62
64
 
63
- def __init__(self, deleting_machines: 'str' =None, failing_machines: 'str' =None, message: 'str' =None, pending_machines: 'str' =None, ready_machines: 'str' =None, started_at: 'datetime' =None, stopped_at: 'datetime' =None): # noqa: E501
65
+ def __init__(self, deleting_machines: 'str' =None, failing_machines: 'str' =None, message: 'str' =None, pending_machines: 'str' =None, ready_machines: 'str' =None, retries: 'str' =None, started_at: 'datetime' =None, stopped_at: 'datetime' =None): # noqa: E501
64
66
  """V1MultiMachineJobStatus - a model defined in Swagger""" # noqa: E501
65
67
  self._deleting_machines = None
66
68
  self._failing_machines = None
67
69
  self._message = None
68
70
  self._pending_machines = None
69
71
  self._ready_machines = None
72
+ self._retries = None
70
73
  self._started_at = None
71
74
  self._stopped_at = None
72
75
  self.discriminator = None
@@ -80,6 +83,8 @@ class V1MultiMachineJobStatus(object):
80
83
  self.pending_machines = pending_machines
81
84
  if ready_machines is not None:
82
85
  self.ready_machines = ready_machines
86
+ if retries is not None:
87
+ self.retries = retries
83
88
  if started_at is not None:
84
89
  self.started_at = started_at
85
90
  if stopped_at is not None:
@@ -190,6 +195,27 @@ class V1MultiMachineJobStatus(object):
190
195
 
191
196
  self._ready_machines = ready_machines
192
197
 
198
+ @property
199
+ def retries(self) -> 'str':
200
+ """Gets the retries of this V1MultiMachineJobStatus. # noqa: E501
201
+
202
+
203
+ :return: The retries of this V1MultiMachineJobStatus. # noqa: E501
204
+ :rtype: str
205
+ """
206
+ return self._retries
207
+
208
+ @retries.setter
209
+ def retries(self, retries: 'str'):
210
+ """Sets the retries of this V1MultiMachineJobStatus.
211
+
212
+
213
+ :param retries: The retries of this V1MultiMachineJobStatus. # noqa: E501
214
+ :type: str
215
+ """
216
+
217
+ self._retries = retries
218
+
193
219
  @property
194
220
  def started_at(self) -> 'datetime':
195
221
  """Gets the started_at of this V1MultiMachineJobStatus. # noqa: E501
@@ -73,6 +73,7 @@ class V1RuleResource(object):
73
73
  MODEL = "model"
74
74
  SLURMJOB = "slurmJob"
75
75
  MULTIMACHINEJOB = "multiMachineJob"
76
+ LITLOGGER = "litLogger"
76
77
  """
77
78
  Attributes:
78
79
  swagger_types (dict): The key is attribute name
@@ -43,52 +43,42 @@ class V1SnowflakeDataConnection(object):
43
43
  swagger_types = {
44
44
  'bucket_name': 'str',
45
45
  'compress': 'bool',
46
+ 'credential_id': 'str',
46
47
  'format': 'str',
47
48
  'include_header': 'bool',
48
- 'query': 'str',
49
- 'secret_account': 'str',
50
- 'secret_password': 'str',
51
- 'secret_username': 'str'
49
+ 'query': 'str'
52
50
  }
53
51
 
54
52
  attribute_map = {
55
53
  'bucket_name': 'bucketName',
56
54
  'compress': 'compress',
55
+ 'credential_id': 'credentialId',
57
56
  'format': 'format',
58
57
  'include_header': 'includeHeader',
59
- 'query': 'query',
60
- 'secret_account': 'secretAccount',
61
- 'secret_password': 'secretPassword',
62
- 'secret_username': 'secretUsername'
58
+ 'query': 'query'
63
59
  }
64
60
 
65
- def __init__(self, bucket_name: 'str' =None, compress: 'bool' =None, format: 'str' =None, include_header: 'bool' =None, query: 'str' =None, secret_account: 'str' =None, secret_password: 'str' =None, secret_username: 'str' =None): # noqa: E501
61
+ def __init__(self, bucket_name: 'str' =None, compress: 'bool' =None, credential_id: 'str' =None, format: 'str' =None, include_header: 'bool' =None, query: 'str' =None): # noqa: E501
66
62
  """V1SnowflakeDataConnection - a model defined in Swagger""" # noqa: E501
67
63
  self._bucket_name = None
68
64
  self._compress = None
65
+ self._credential_id = None
69
66
  self._format = None
70
67
  self._include_header = None
71
68
  self._query = None
72
- self._secret_account = None
73
- self._secret_password = None
74
- self._secret_username = None
75
69
  self.discriminator = None
76
70
  if bucket_name is not None:
77
71
  self.bucket_name = bucket_name
78
72
  if compress is not None:
79
73
  self.compress = compress
74
+ if credential_id is not None:
75
+ self.credential_id = credential_id
80
76
  if format is not None:
81
77
  self.format = format
82
78
  if include_header is not None:
83
79
  self.include_header = include_header
84
80
  if query is not None:
85
81
  self.query = query
86
- if secret_account is not None:
87
- self.secret_account = secret_account
88
- if secret_password is not None:
89
- self.secret_password = secret_password
90
- if secret_username is not None:
91
- self.secret_username = secret_username
92
82
 
93
83
  @property
94
84
  def bucket_name(self) -> 'str':
@@ -132,6 +122,27 @@ class V1SnowflakeDataConnection(object):
132
122
 
133
123
  self._compress = compress
134
124
 
125
+ @property
126
+ def credential_id(self) -> 'str':
127
+ """Gets the credential_id of this V1SnowflakeDataConnection. # noqa: E501
128
+
129
+
130
+ :return: The credential_id of this V1SnowflakeDataConnection. # noqa: E501
131
+ :rtype: str
132
+ """
133
+ return self._credential_id
134
+
135
+ @credential_id.setter
136
+ def credential_id(self, credential_id: 'str'):
137
+ """Sets the credential_id of this V1SnowflakeDataConnection.
138
+
139
+
140
+ :param credential_id: The credential_id of this V1SnowflakeDataConnection. # noqa: E501
141
+ :type: str
142
+ """
143
+
144
+ self._credential_id = credential_id
145
+
135
146
  @property
136
147
  def format(self) -> 'str':
137
148
  """Gets the format of this V1SnowflakeDataConnection. # noqa: E501
@@ -195,69 +206,6 @@ class V1SnowflakeDataConnection(object):
195
206
 
196
207
  self._query = query
197
208
 
198
- @property
199
- def secret_account(self) -> 'str':
200
- """Gets the secret_account of this V1SnowflakeDataConnection. # noqa: E501
201
-
202
-
203
- :return: The secret_account of this V1SnowflakeDataConnection. # noqa: E501
204
- :rtype: str
205
- """
206
- return self._secret_account
207
-
208
- @secret_account.setter
209
- def secret_account(self, secret_account: 'str'):
210
- """Sets the secret_account of this V1SnowflakeDataConnection.
211
-
212
-
213
- :param secret_account: The secret_account of this V1SnowflakeDataConnection. # noqa: E501
214
- :type: str
215
- """
216
-
217
- self._secret_account = secret_account
218
-
219
- @property
220
- def secret_password(self) -> 'str':
221
- """Gets the secret_password of this V1SnowflakeDataConnection. # noqa: E501
222
-
223
-
224
- :return: The secret_password of this V1SnowflakeDataConnection. # noqa: E501
225
- :rtype: str
226
- """
227
- return self._secret_password
228
-
229
- @secret_password.setter
230
- def secret_password(self, secret_password: 'str'):
231
- """Sets the secret_password of this V1SnowflakeDataConnection.
232
-
233
-
234
- :param secret_password: The secret_password of this V1SnowflakeDataConnection. # noqa: E501
235
- :type: str
236
- """
237
-
238
- self._secret_password = secret_password
239
-
240
- @property
241
- def secret_username(self) -> 'str':
242
- """Gets the secret_username of this V1SnowflakeDataConnection. # noqa: E501
243
-
244
-
245
- :return: The secret_username of this V1SnowflakeDataConnection. # noqa: E501
246
- :rtype: str
247
- """
248
- return self._secret_username
249
-
250
- @secret_username.setter
251
- def secret_username(self, secret_username: 'str'):
252
- """Sets the secret_username of this V1SnowflakeDataConnection.
253
-
254
-
255
- :param secret_username: The secret_username of this V1SnowflakeDataConnection. # noqa: E501
256
- :type: str
257
- """
258
-
259
- self._secret_username = secret_username
260
-
261
209
  def to_dict(self) -> dict:
262
210
  """Returns the model properties as a dict"""
263
211
  result = {}
@@ -44,22 +44,25 @@ class V1SystemMetrics(object):
44
44
  'cpu': 'V1CPUSystemMetrics',
45
45
  'gpu': 'list[V1GPUSystemMetrics]',
46
46
  'storage': 'V1StorageSystemMetrics',
47
- 'timestamp': 'datetime'
47
+ 'timestamp': 'datetime',
48
+ 'trainium': 'list[V1TrainiumSystemMetrics]'
48
49
  }
49
50
 
50
51
  attribute_map = {
51
52
  'cpu': 'cpu',
52
53
  'gpu': 'gpu',
53
54
  'storage': 'storage',
54
- 'timestamp': 'timestamp'
55
+ 'timestamp': 'timestamp',
56
+ 'trainium': 'trainium'
55
57
  }
56
58
 
57
- def __init__(self, cpu: 'V1CPUSystemMetrics' =None, gpu: 'list[V1GPUSystemMetrics]' =None, storage: 'V1StorageSystemMetrics' =None, timestamp: 'datetime' =None): # noqa: E501
59
+ def __init__(self, cpu: 'V1CPUSystemMetrics' =None, gpu: 'list[V1GPUSystemMetrics]' =None, storage: 'V1StorageSystemMetrics' =None, timestamp: 'datetime' =None, trainium: 'list[V1TrainiumSystemMetrics]' =None): # noqa: E501
58
60
  """V1SystemMetrics - a model defined in Swagger""" # noqa: E501
59
61
  self._cpu = None
60
62
  self._gpu = None
61
63
  self._storage = None
62
64
  self._timestamp = None
65
+ self._trainium = None
63
66
  self.discriminator = None
64
67
  if cpu is not None:
65
68
  self.cpu = cpu
@@ -69,6 +72,8 @@ class V1SystemMetrics(object):
69
72
  self.storage = storage
70
73
  if timestamp is not None:
71
74
  self.timestamp = timestamp
75
+ if trainium is not None:
76
+ self.trainium = trainium
72
77
 
73
78
  @property
74
79
  def cpu(self) -> 'V1CPUSystemMetrics':
@@ -154,6 +159,27 @@ class V1SystemMetrics(object):
154
159
 
155
160
  self._timestamp = timestamp
156
161
 
162
+ @property
163
+ def trainium(self) -> 'list[V1TrainiumSystemMetrics]':
164
+ """Gets the trainium of this V1SystemMetrics. # noqa: E501
165
+
166
+
167
+ :return: The trainium of this V1SystemMetrics. # noqa: E501
168
+ :rtype: list[V1TrainiumSystemMetrics]
169
+ """
170
+ return self._trainium
171
+
172
+ @trainium.setter
173
+ def trainium(self, trainium: 'list[V1TrainiumSystemMetrics]'):
174
+ """Sets the trainium of this V1SystemMetrics.
175
+
176
+
177
+ :param trainium: The trainium of this V1SystemMetrics. # noqa: E501
178
+ :type: list[V1TrainiumSystemMetrics]
179
+ """
180
+
181
+ self._trainium = trainium
182
+
157
183
  def to_dict(self) -> dict:
158
184
  """Returns the model properties as a dict"""
159
185
  result = {}
@@ -0,0 +1,175 @@
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 V1TrainiumSystemMetrics(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
+ 'memory_total': 'int',
45
+ 'memory_used': 'int',
46
+ 'utilization': 'int'
47
+ }
48
+
49
+ attribute_map = {
50
+ 'memory_total': 'memoryTotal',
51
+ 'memory_used': 'memoryUsed',
52
+ 'utilization': 'utilization'
53
+ }
54
+
55
+ def __init__(self, memory_total: 'int' =None, memory_used: 'int' =None, utilization: 'int' =None): # noqa: E501
56
+ """V1TrainiumSystemMetrics - a model defined in Swagger""" # noqa: E501
57
+ self._memory_total = None
58
+ self._memory_used = None
59
+ self._utilization = None
60
+ self.discriminator = None
61
+ if memory_total is not None:
62
+ self.memory_total = memory_total
63
+ if memory_used is not None:
64
+ self.memory_used = memory_used
65
+ if utilization is not None:
66
+ self.utilization = utilization
67
+
68
+ @property
69
+ def memory_total(self) -> 'int':
70
+ """Gets the memory_total of this V1TrainiumSystemMetrics. # noqa: E501
71
+
72
+
73
+ :return: The memory_total of this V1TrainiumSystemMetrics. # noqa: E501
74
+ :rtype: int
75
+ """
76
+ return self._memory_total
77
+
78
+ @memory_total.setter
79
+ def memory_total(self, memory_total: 'int'):
80
+ """Sets the memory_total of this V1TrainiumSystemMetrics.
81
+
82
+
83
+ :param memory_total: The memory_total of this V1TrainiumSystemMetrics. # noqa: E501
84
+ :type: int
85
+ """
86
+
87
+ self._memory_total = memory_total
88
+
89
+ @property
90
+ def memory_used(self) -> 'int':
91
+ """Gets the memory_used of this V1TrainiumSystemMetrics. # noqa: E501
92
+
93
+
94
+ :return: The memory_used of this V1TrainiumSystemMetrics. # noqa: E501
95
+ :rtype: int
96
+ """
97
+ return self._memory_used
98
+
99
+ @memory_used.setter
100
+ def memory_used(self, memory_used: 'int'):
101
+ """Sets the memory_used of this V1TrainiumSystemMetrics.
102
+
103
+
104
+ :param memory_used: The memory_used of this V1TrainiumSystemMetrics. # noqa: E501
105
+ :type: int
106
+ """
107
+
108
+ self._memory_used = memory_used
109
+
110
+ @property
111
+ def utilization(self) -> 'int':
112
+ """Gets the utilization of this V1TrainiumSystemMetrics. # noqa: E501
113
+
114
+
115
+ :return: The utilization of this V1TrainiumSystemMetrics. # noqa: E501
116
+ :rtype: int
117
+ """
118
+ return self._utilization
119
+
120
+ @utilization.setter
121
+ def utilization(self, utilization: 'int'):
122
+ """Sets the utilization of this V1TrainiumSystemMetrics.
123
+
124
+
125
+ :param utilization: The utilization of this V1TrainiumSystemMetrics. # noqa: E501
126
+ :type: int
127
+ """
128
+
129
+ self._utilization = utilization
130
+
131
+ def to_dict(self) -> dict:
132
+ """Returns the model properties as a dict"""
133
+ result = {}
134
+
135
+ for attr, _ in six.iteritems(self.swagger_types):
136
+ value = getattr(self, attr)
137
+ if isinstance(value, list):
138
+ result[attr] = list(map(
139
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
140
+ value
141
+ ))
142
+ elif hasattr(value, "to_dict"):
143
+ result[attr] = value.to_dict()
144
+ elif isinstance(value, dict):
145
+ result[attr] = dict(map(
146
+ lambda item: (item[0], item[1].to_dict())
147
+ if hasattr(item[1], "to_dict") else item,
148
+ value.items()
149
+ ))
150
+ else:
151
+ result[attr] = value
152
+ if issubclass(V1TrainiumSystemMetrics, dict):
153
+ for key, value in self.items():
154
+ result[key] = value
155
+
156
+ return result
157
+
158
+ def to_str(self) -> str:
159
+ """Returns the string representation of the model"""
160
+ return pprint.pformat(self.to_dict())
161
+
162
+ def __repr__(self) -> str:
163
+ """For `print` and `pprint`"""
164
+ return self.to_str()
165
+
166
+ def __eq__(self, other: 'V1TrainiumSystemMetrics') -> bool:
167
+ """Returns true if both objects are equal"""
168
+ if not isinstance(other, V1TrainiumSystemMetrics):
169
+ return False
170
+
171
+ return self.__dict__ == other.__dict__
172
+
173
+ def __ne__(self, other: 'V1TrainiumSystemMetrics') -> bool:
174
+ """Returns true if both objects are not equal"""
175
+ return not self == other
@@ -0,0 +1,97 @@
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 V1UpdateMetricsStreamVisibilityResponse(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
+ }
45
+
46
+ attribute_map = {
47
+ }
48
+
49
+ def __init__(self): # noqa: E501
50
+ """V1UpdateMetricsStreamVisibilityResponse - a model defined in Swagger""" # noqa: E501
51
+ self.discriminator = None
52
+
53
+ def to_dict(self) -> dict:
54
+ """Returns the model properties as a dict"""
55
+ result = {}
56
+
57
+ for attr, _ in six.iteritems(self.swagger_types):
58
+ value = getattr(self, attr)
59
+ if isinstance(value, list):
60
+ result[attr] = list(map(
61
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
62
+ value
63
+ ))
64
+ elif hasattr(value, "to_dict"):
65
+ result[attr] = value.to_dict()
66
+ elif isinstance(value, dict):
67
+ result[attr] = dict(map(
68
+ lambda item: (item[0], item[1].to_dict())
69
+ if hasattr(item[1], "to_dict") else item,
70
+ value.items()
71
+ ))
72
+ else:
73
+ result[attr] = value
74
+ if issubclass(V1UpdateMetricsStreamVisibilityResponse, dict):
75
+ for key, value in self.items():
76
+ result[key] = value
77
+
78
+ return result
79
+
80
+ def to_str(self) -> str:
81
+ """Returns the string representation of the model"""
82
+ return pprint.pformat(self.to_dict())
83
+
84
+ def __repr__(self) -> str:
85
+ """For `print` and `pprint`"""
86
+ return self.to_str()
87
+
88
+ def __eq__(self, other: 'V1UpdateMetricsStreamVisibilityResponse') -> bool:
89
+ """Returns true if both objects are equal"""
90
+ if not isinstance(other, V1UpdateMetricsStreamVisibilityResponse):
91
+ return False
92
+
93
+ return self.__dict__ == other.__dict__
94
+
95
+ def __ne__(self, other: 'V1UpdateMetricsStreamVisibilityResponse') -> bool:
96
+ """Returns true if both objects are not equal"""
97
+ return not self == other