anyscale 0.26.1__py3-none-any.whl → 0.26.3__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.
- anyscale/_private/anyscale_client/anyscale_client.py +13 -1
- anyscale/_private/anyscale_client/common.py +1 -1
- anyscale/_private/docgen/models.md +2 -2
- anyscale/client/README.md +11 -33
- anyscale/client/openapi_client/__init__.py +9 -20
- anyscale/client/openapi_client/api/default_api.py +226 -1544
- anyscale/client/openapi_client/models/__init__.py +9 -20
- anyscale/client/openapi_client/models/{aica_endpoint_scope.py → actor_status.py} +7 -9
- anyscale/client/openapi_client/models/baseimagesenum.py +59 -1
- anyscale/client/openapi_client/models/{named_entity.py → job_details.py} +60 -35
- anyscale/client/openapi_client/models/resource_alert_event_type.py +2 -1
- anyscale/client/openapi_client/models/{aica_endpoint_event_level.py → run_attempt_status.py} +10 -10
- anyscale/client/openapi_client/models/{aicamodel_response.py → run_status.py} +19 -34
- anyscale/client/openapi_client/models/supportedbaseimagesenum.py +59 -1
- anyscale/client/openapi_client/models/{aicaendpoint_response.py → train_resources.py} +22 -22
- anyscale/client/openapi_client/models/train_run.py +387 -0
- anyscale/client/openapi_client/models/train_run_attempt.py +308 -0
- anyscale/client/openapi_client/models/train_worker.py +363 -0
- anyscale/client/openapi_client/models/{aicamodel_list_response.py → trainrun_list_response.py} +15 -15
- anyscale/sdk/anyscale_client/models/baseimagesenum.py +59 -1
- anyscale/sdk/anyscale_client/models/supportedbaseimagesenum.py +59 -1
- anyscale/shared_anyscale_utils/latest_ray_version.py +1 -1
- anyscale/version.py +1 -1
- {anyscale-0.26.1.dist-info → anyscale-0.26.3.dist-info}/METADATA +1 -1
- {anyscale-0.26.1.dist-info → anyscale-0.26.3.dist-info}/RECORD +30 -41
- anyscale/client/openapi_client/models/aica_endpoint.py +0 -527
- anyscale/client/openapi_client/models/aica_endpoint_event.py +0 -433
- anyscale/client/openapi_client/models/aica_endpoint_event_type.py +0 -120
- anyscale/client/openapi_client/models/aica_model.py +0 -398
- anyscale/client/openapi_client/models/aica_model_accelerator_map.py +0 -123
- anyscale/client/openapi_client/models/aica_model_configuration.py +0 -209
- anyscale/client/openapi_client/models/aica_observability_urls.py +0 -178
- anyscale/client/openapi_client/models/aicaendpoint_list_response.py +0 -147
- anyscale/client/openapi_client/models/aicaendpointevent_list_response.py +0 -147
- anyscale/client/openapi_client/models/aws_credentials.py +0 -181
- anyscale/client/openapi_client/models/create_aica_endpoint.py +0 -210
- anyscale/client/openapi_client/models/import_aica_model.py +0 -241
- anyscale/client/openapi_client/models/update_endpoint.py +0 -152
- anyscale/client/openapi_client/models/update_model_deployment.py +0 -152
- {anyscale-0.26.1.dist-info → anyscale-0.26.3.dist-info}/LICENSE +0 -0
- {anyscale-0.26.1.dist-info → anyscale-0.26.3.dist-info}/NOTICE +0 -0
- {anyscale-0.26.1.dist-info → anyscale-0.26.3.dist-info}/WHEEL +0 -0
- {anyscale-0.26.1.dist-info → anyscale-0.26.3.dist-info}/entry_points.txt +0 -0
- {anyscale-0.26.1.dist-info → anyscale-0.26.3.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,308 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Managed Ray API
|
5
|
+
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
9
|
+
Generated by: https://openapi-generator.tech
|
10
|
+
"""
|
11
|
+
|
12
|
+
|
13
|
+
import pprint
|
14
|
+
import re # noqa: F401
|
15
|
+
|
16
|
+
import six
|
17
|
+
|
18
|
+
from openapi_client.configuration import Configuration
|
19
|
+
|
20
|
+
|
21
|
+
class TrainRunAttempt(object):
|
22
|
+
"""NOTE: This class is auto generated by OpenAPI Generator.
|
23
|
+
Ref: https://openapi-generator.tech
|
24
|
+
|
25
|
+
Do not edit the class manually.
|
26
|
+
"""
|
27
|
+
|
28
|
+
"""
|
29
|
+
Attributes:
|
30
|
+
openapi_types (dict): The key is attribute name
|
31
|
+
and the value is attribute type.
|
32
|
+
attribute_map (dict): The key is attribute name
|
33
|
+
and the value is json key in definition.
|
34
|
+
"""
|
35
|
+
openapi_types = {
|
36
|
+
'run_id': 'str',
|
37
|
+
'attempt_id': 'str',
|
38
|
+
'status': 'RunAttemptStatus',
|
39
|
+
'status_detail': 'str',
|
40
|
+
'start_time_ms': 'int',
|
41
|
+
'end_time_ms': 'int',
|
42
|
+
'resources': 'list[TrainResources]',
|
43
|
+
'workers': 'list[TrainWorker]'
|
44
|
+
}
|
45
|
+
|
46
|
+
attribute_map = {
|
47
|
+
'run_id': 'run_id',
|
48
|
+
'attempt_id': 'attempt_id',
|
49
|
+
'status': 'status',
|
50
|
+
'status_detail': 'status_detail',
|
51
|
+
'start_time_ms': 'start_time_ms',
|
52
|
+
'end_time_ms': 'end_time_ms',
|
53
|
+
'resources': 'resources',
|
54
|
+
'workers': 'workers'
|
55
|
+
}
|
56
|
+
|
57
|
+
def __init__(self, run_id=None, attempt_id=None, status=None, status_detail=None, start_time_ms=None, end_time_ms=None, resources=None, workers=None, local_vars_configuration=None): # noqa: E501
|
58
|
+
"""TrainRunAttempt - a model defined in OpenAPI""" # noqa: E501
|
59
|
+
if local_vars_configuration is None:
|
60
|
+
local_vars_configuration = Configuration()
|
61
|
+
self.local_vars_configuration = local_vars_configuration
|
62
|
+
|
63
|
+
self._run_id = None
|
64
|
+
self._attempt_id = None
|
65
|
+
self._status = None
|
66
|
+
self._status_detail = None
|
67
|
+
self._start_time_ms = None
|
68
|
+
self._end_time_ms = None
|
69
|
+
self._resources = None
|
70
|
+
self._workers = None
|
71
|
+
self.discriminator = None
|
72
|
+
|
73
|
+
self.run_id = run_id
|
74
|
+
self.attempt_id = attempt_id
|
75
|
+
self.status = status
|
76
|
+
if status_detail is not None:
|
77
|
+
self.status_detail = status_detail
|
78
|
+
self.start_time_ms = start_time_ms
|
79
|
+
if end_time_ms is not None:
|
80
|
+
self.end_time_ms = end_time_ms
|
81
|
+
self.resources = resources
|
82
|
+
self.workers = workers
|
83
|
+
|
84
|
+
@property
|
85
|
+
def run_id(self):
|
86
|
+
"""Gets the run_id of this TrainRunAttempt. # noqa: E501
|
87
|
+
|
88
|
+
|
89
|
+
:return: The run_id of this TrainRunAttempt. # noqa: E501
|
90
|
+
:rtype: str
|
91
|
+
"""
|
92
|
+
return self._run_id
|
93
|
+
|
94
|
+
@run_id.setter
|
95
|
+
def run_id(self, run_id):
|
96
|
+
"""Sets the run_id of this TrainRunAttempt.
|
97
|
+
|
98
|
+
|
99
|
+
:param run_id: The run_id of this TrainRunAttempt. # noqa: E501
|
100
|
+
:type: str
|
101
|
+
"""
|
102
|
+
if self.local_vars_configuration.client_side_validation and run_id is None: # noqa: E501
|
103
|
+
raise ValueError("Invalid value for `run_id`, must not be `None`") # noqa: E501
|
104
|
+
|
105
|
+
self._run_id = run_id
|
106
|
+
|
107
|
+
@property
|
108
|
+
def attempt_id(self):
|
109
|
+
"""Gets the attempt_id of this TrainRunAttempt. # noqa: E501
|
110
|
+
|
111
|
+
|
112
|
+
:return: The attempt_id of this TrainRunAttempt. # noqa: E501
|
113
|
+
:rtype: str
|
114
|
+
"""
|
115
|
+
return self._attempt_id
|
116
|
+
|
117
|
+
@attempt_id.setter
|
118
|
+
def attempt_id(self, attempt_id):
|
119
|
+
"""Sets the attempt_id of this TrainRunAttempt.
|
120
|
+
|
121
|
+
|
122
|
+
:param attempt_id: The attempt_id of this TrainRunAttempt. # noqa: E501
|
123
|
+
:type: str
|
124
|
+
"""
|
125
|
+
if self.local_vars_configuration.client_side_validation and attempt_id is None: # noqa: E501
|
126
|
+
raise ValueError("Invalid value for `attempt_id`, must not be `None`") # noqa: E501
|
127
|
+
|
128
|
+
self._attempt_id = attempt_id
|
129
|
+
|
130
|
+
@property
|
131
|
+
def status(self):
|
132
|
+
"""Gets the status of this TrainRunAttempt. # noqa: E501
|
133
|
+
|
134
|
+
|
135
|
+
:return: The status of this TrainRunAttempt. # noqa: E501
|
136
|
+
:rtype: RunAttemptStatus
|
137
|
+
"""
|
138
|
+
return self._status
|
139
|
+
|
140
|
+
@status.setter
|
141
|
+
def status(self, status):
|
142
|
+
"""Sets the status of this TrainRunAttempt.
|
143
|
+
|
144
|
+
|
145
|
+
:param status: The status of this TrainRunAttempt. # noqa: E501
|
146
|
+
:type: RunAttemptStatus
|
147
|
+
"""
|
148
|
+
if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501
|
149
|
+
raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501
|
150
|
+
|
151
|
+
self._status = status
|
152
|
+
|
153
|
+
@property
|
154
|
+
def status_detail(self):
|
155
|
+
"""Gets the status_detail of this TrainRunAttempt. # noqa: E501
|
156
|
+
|
157
|
+
|
158
|
+
:return: The status_detail of this TrainRunAttempt. # noqa: E501
|
159
|
+
:rtype: str
|
160
|
+
"""
|
161
|
+
return self._status_detail
|
162
|
+
|
163
|
+
@status_detail.setter
|
164
|
+
def status_detail(self, status_detail):
|
165
|
+
"""Sets the status_detail of this TrainRunAttempt.
|
166
|
+
|
167
|
+
|
168
|
+
:param status_detail: The status_detail of this TrainRunAttempt. # noqa: E501
|
169
|
+
:type: str
|
170
|
+
"""
|
171
|
+
|
172
|
+
self._status_detail = status_detail
|
173
|
+
|
174
|
+
@property
|
175
|
+
def start_time_ms(self):
|
176
|
+
"""Gets the start_time_ms of this TrainRunAttempt. # noqa: E501
|
177
|
+
|
178
|
+
|
179
|
+
:return: The start_time_ms of this TrainRunAttempt. # noqa: E501
|
180
|
+
:rtype: int
|
181
|
+
"""
|
182
|
+
return self._start_time_ms
|
183
|
+
|
184
|
+
@start_time_ms.setter
|
185
|
+
def start_time_ms(self, start_time_ms):
|
186
|
+
"""Sets the start_time_ms of this TrainRunAttempt.
|
187
|
+
|
188
|
+
|
189
|
+
:param start_time_ms: The start_time_ms of this TrainRunAttempt. # noqa: E501
|
190
|
+
:type: int
|
191
|
+
"""
|
192
|
+
if self.local_vars_configuration.client_side_validation and start_time_ms is None: # noqa: E501
|
193
|
+
raise ValueError("Invalid value for `start_time_ms`, must not be `None`") # noqa: E501
|
194
|
+
|
195
|
+
self._start_time_ms = start_time_ms
|
196
|
+
|
197
|
+
@property
|
198
|
+
def end_time_ms(self):
|
199
|
+
"""Gets the end_time_ms of this TrainRunAttempt. # noqa: E501
|
200
|
+
|
201
|
+
|
202
|
+
:return: The end_time_ms of this TrainRunAttempt. # noqa: E501
|
203
|
+
:rtype: int
|
204
|
+
"""
|
205
|
+
return self._end_time_ms
|
206
|
+
|
207
|
+
@end_time_ms.setter
|
208
|
+
def end_time_ms(self, end_time_ms):
|
209
|
+
"""Sets the end_time_ms of this TrainRunAttempt.
|
210
|
+
|
211
|
+
|
212
|
+
:param end_time_ms: The end_time_ms of this TrainRunAttempt. # noqa: E501
|
213
|
+
:type: int
|
214
|
+
"""
|
215
|
+
|
216
|
+
self._end_time_ms = end_time_ms
|
217
|
+
|
218
|
+
@property
|
219
|
+
def resources(self):
|
220
|
+
"""Gets the resources of this TrainRunAttempt. # noqa: E501
|
221
|
+
|
222
|
+
|
223
|
+
:return: The resources of this TrainRunAttempt. # noqa: E501
|
224
|
+
:rtype: list[TrainResources]
|
225
|
+
"""
|
226
|
+
return self._resources
|
227
|
+
|
228
|
+
@resources.setter
|
229
|
+
def resources(self, resources):
|
230
|
+
"""Sets the resources of this TrainRunAttempt.
|
231
|
+
|
232
|
+
|
233
|
+
:param resources: The resources of this TrainRunAttempt. # noqa: E501
|
234
|
+
:type: list[TrainResources]
|
235
|
+
"""
|
236
|
+
if self.local_vars_configuration.client_side_validation and resources is None: # noqa: E501
|
237
|
+
raise ValueError("Invalid value for `resources`, must not be `None`") # noqa: E501
|
238
|
+
|
239
|
+
self._resources = resources
|
240
|
+
|
241
|
+
@property
|
242
|
+
def workers(self):
|
243
|
+
"""Gets the workers of this TrainRunAttempt. # noqa: E501
|
244
|
+
|
245
|
+
|
246
|
+
:return: The workers of this TrainRunAttempt. # noqa: E501
|
247
|
+
:rtype: list[TrainWorker]
|
248
|
+
"""
|
249
|
+
return self._workers
|
250
|
+
|
251
|
+
@workers.setter
|
252
|
+
def workers(self, workers):
|
253
|
+
"""Sets the workers of this TrainRunAttempt.
|
254
|
+
|
255
|
+
|
256
|
+
:param workers: The workers of this TrainRunAttempt. # noqa: E501
|
257
|
+
:type: list[TrainWorker]
|
258
|
+
"""
|
259
|
+
if self.local_vars_configuration.client_side_validation and workers is None: # noqa: E501
|
260
|
+
raise ValueError("Invalid value for `workers`, must not be `None`") # noqa: E501
|
261
|
+
|
262
|
+
self._workers = workers
|
263
|
+
|
264
|
+
def to_dict(self):
|
265
|
+
"""Returns the model properties as a dict"""
|
266
|
+
result = {}
|
267
|
+
|
268
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
269
|
+
value = getattr(self, attr)
|
270
|
+
if isinstance(value, list):
|
271
|
+
result[attr] = list(map(
|
272
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
273
|
+
value
|
274
|
+
))
|
275
|
+
elif hasattr(value, "to_dict"):
|
276
|
+
result[attr] = value.to_dict()
|
277
|
+
elif isinstance(value, dict):
|
278
|
+
result[attr] = dict(map(
|
279
|
+
lambda item: (item[0], item[1].to_dict())
|
280
|
+
if hasattr(item[1], "to_dict") else item,
|
281
|
+
value.items()
|
282
|
+
))
|
283
|
+
else:
|
284
|
+
result[attr] = value
|
285
|
+
|
286
|
+
return result
|
287
|
+
|
288
|
+
def to_str(self):
|
289
|
+
"""Returns the string representation of the model"""
|
290
|
+
return pprint.pformat(self.to_dict())
|
291
|
+
|
292
|
+
def __repr__(self):
|
293
|
+
"""For `print` and `pprint`"""
|
294
|
+
return self.to_str()
|
295
|
+
|
296
|
+
def __eq__(self, other):
|
297
|
+
"""Returns true if both objects are equal"""
|
298
|
+
if not isinstance(other, TrainRunAttempt):
|
299
|
+
return False
|
300
|
+
|
301
|
+
return self.to_dict() == other.to_dict()
|
302
|
+
|
303
|
+
def __ne__(self, other):
|
304
|
+
"""Returns true if both objects are not equal"""
|
305
|
+
if not isinstance(other, TrainRunAttempt):
|
306
|
+
return True
|
307
|
+
|
308
|
+
return self.to_dict() != other.to_dict()
|
@@ -0,0 +1,363 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
Managed Ray API
|
5
|
+
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
|
7
|
+
|
8
|
+
The version of the OpenAPI document: 0.1.0
|
9
|
+
Generated by: https://openapi-generator.tech
|
10
|
+
"""
|
11
|
+
|
12
|
+
|
13
|
+
import pprint
|
14
|
+
import re # noqa: F401
|
15
|
+
|
16
|
+
import six
|
17
|
+
|
18
|
+
from openapi_client.configuration import Configuration
|
19
|
+
|
20
|
+
|
21
|
+
class TrainWorker(object):
|
22
|
+
"""NOTE: This class is auto generated by OpenAPI Generator.
|
23
|
+
Ref: https://openapi-generator.tech
|
24
|
+
|
25
|
+
Do not edit the class manually.
|
26
|
+
"""
|
27
|
+
|
28
|
+
"""
|
29
|
+
Attributes:
|
30
|
+
openapi_types (dict): The key is attribute name
|
31
|
+
and the value is attribute type.
|
32
|
+
attribute_map (dict): The key is attribute name
|
33
|
+
and the value is json key in definition.
|
34
|
+
"""
|
35
|
+
openapi_types = {
|
36
|
+
'actor_id': 'str',
|
37
|
+
'world_rank': 'int',
|
38
|
+
'local_rank': 'int',
|
39
|
+
'node_rank': 'int',
|
40
|
+
'node_id': 'str',
|
41
|
+
'node_ip': 'str',
|
42
|
+
'pid': 'int',
|
43
|
+
'gpu_ids': 'list[int]',
|
44
|
+
'status': 'ActorStatus',
|
45
|
+
'resources': 'TrainResources'
|
46
|
+
}
|
47
|
+
|
48
|
+
attribute_map = {
|
49
|
+
'actor_id': 'actor_id',
|
50
|
+
'world_rank': 'world_rank',
|
51
|
+
'local_rank': 'local_rank',
|
52
|
+
'node_rank': 'node_rank',
|
53
|
+
'node_id': 'node_id',
|
54
|
+
'node_ip': 'node_ip',
|
55
|
+
'pid': 'pid',
|
56
|
+
'gpu_ids': 'gpu_ids',
|
57
|
+
'status': 'status',
|
58
|
+
'resources': 'resources'
|
59
|
+
}
|
60
|
+
|
61
|
+
def __init__(self, actor_id=None, world_rank=None, local_rank=None, node_rank=None, node_id=None, node_ip=None, pid=None, gpu_ids=None, status=None, resources=None, local_vars_configuration=None): # noqa: E501
|
62
|
+
"""TrainWorker - a model defined in OpenAPI""" # noqa: E501
|
63
|
+
if local_vars_configuration is None:
|
64
|
+
local_vars_configuration = Configuration()
|
65
|
+
self.local_vars_configuration = local_vars_configuration
|
66
|
+
|
67
|
+
self._actor_id = None
|
68
|
+
self._world_rank = None
|
69
|
+
self._local_rank = None
|
70
|
+
self._node_rank = None
|
71
|
+
self._node_id = None
|
72
|
+
self._node_ip = None
|
73
|
+
self._pid = None
|
74
|
+
self._gpu_ids = None
|
75
|
+
self._status = None
|
76
|
+
self._resources = None
|
77
|
+
self.discriminator = None
|
78
|
+
|
79
|
+
self.actor_id = actor_id
|
80
|
+
self.world_rank = world_rank
|
81
|
+
self.local_rank = local_rank
|
82
|
+
self.node_rank = node_rank
|
83
|
+
self.node_id = node_id
|
84
|
+
self.node_ip = node_ip
|
85
|
+
self.pid = pid
|
86
|
+
self.gpu_ids = gpu_ids
|
87
|
+
self.status = status
|
88
|
+
if resources is not None:
|
89
|
+
self.resources = resources
|
90
|
+
|
91
|
+
@property
|
92
|
+
def actor_id(self):
|
93
|
+
"""Gets the actor_id of this TrainWorker. # noqa: E501
|
94
|
+
|
95
|
+
|
96
|
+
:return: The actor_id of this TrainWorker. # noqa: E501
|
97
|
+
:rtype: str
|
98
|
+
"""
|
99
|
+
return self._actor_id
|
100
|
+
|
101
|
+
@actor_id.setter
|
102
|
+
def actor_id(self, actor_id):
|
103
|
+
"""Sets the actor_id of this TrainWorker.
|
104
|
+
|
105
|
+
|
106
|
+
:param actor_id: The actor_id of this TrainWorker. # noqa: E501
|
107
|
+
:type: str
|
108
|
+
"""
|
109
|
+
if self.local_vars_configuration.client_side_validation and actor_id is None: # noqa: E501
|
110
|
+
raise ValueError("Invalid value for `actor_id`, must not be `None`") # noqa: E501
|
111
|
+
|
112
|
+
self._actor_id = actor_id
|
113
|
+
|
114
|
+
@property
|
115
|
+
def world_rank(self):
|
116
|
+
"""Gets the world_rank of this TrainWorker. # noqa: E501
|
117
|
+
|
118
|
+
|
119
|
+
:return: The world_rank of this TrainWorker. # noqa: E501
|
120
|
+
:rtype: int
|
121
|
+
"""
|
122
|
+
return self._world_rank
|
123
|
+
|
124
|
+
@world_rank.setter
|
125
|
+
def world_rank(self, world_rank):
|
126
|
+
"""Sets the world_rank of this TrainWorker.
|
127
|
+
|
128
|
+
|
129
|
+
:param world_rank: The world_rank of this TrainWorker. # noqa: E501
|
130
|
+
:type: int
|
131
|
+
"""
|
132
|
+
if self.local_vars_configuration.client_side_validation and world_rank is None: # noqa: E501
|
133
|
+
raise ValueError("Invalid value for `world_rank`, must not be `None`") # noqa: E501
|
134
|
+
|
135
|
+
self._world_rank = world_rank
|
136
|
+
|
137
|
+
@property
|
138
|
+
def local_rank(self):
|
139
|
+
"""Gets the local_rank of this TrainWorker. # noqa: E501
|
140
|
+
|
141
|
+
|
142
|
+
:return: The local_rank of this TrainWorker. # noqa: E501
|
143
|
+
:rtype: int
|
144
|
+
"""
|
145
|
+
return self._local_rank
|
146
|
+
|
147
|
+
@local_rank.setter
|
148
|
+
def local_rank(self, local_rank):
|
149
|
+
"""Sets the local_rank of this TrainWorker.
|
150
|
+
|
151
|
+
|
152
|
+
:param local_rank: The local_rank of this TrainWorker. # noqa: E501
|
153
|
+
:type: int
|
154
|
+
"""
|
155
|
+
if self.local_vars_configuration.client_side_validation and local_rank is None: # noqa: E501
|
156
|
+
raise ValueError("Invalid value for `local_rank`, must not be `None`") # noqa: E501
|
157
|
+
|
158
|
+
self._local_rank = local_rank
|
159
|
+
|
160
|
+
@property
|
161
|
+
def node_rank(self):
|
162
|
+
"""Gets the node_rank of this TrainWorker. # noqa: E501
|
163
|
+
|
164
|
+
|
165
|
+
:return: The node_rank of this TrainWorker. # noqa: E501
|
166
|
+
:rtype: int
|
167
|
+
"""
|
168
|
+
return self._node_rank
|
169
|
+
|
170
|
+
@node_rank.setter
|
171
|
+
def node_rank(self, node_rank):
|
172
|
+
"""Sets the node_rank of this TrainWorker.
|
173
|
+
|
174
|
+
|
175
|
+
:param node_rank: The node_rank of this TrainWorker. # noqa: E501
|
176
|
+
:type: int
|
177
|
+
"""
|
178
|
+
if self.local_vars_configuration.client_side_validation and node_rank is None: # noqa: E501
|
179
|
+
raise ValueError("Invalid value for `node_rank`, must not be `None`") # noqa: E501
|
180
|
+
|
181
|
+
self._node_rank = node_rank
|
182
|
+
|
183
|
+
@property
|
184
|
+
def node_id(self):
|
185
|
+
"""Gets the node_id of this TrainWorker. # noqa: E501
|
186
|
+
|
187
|
+
|
188
|
+
:return: The node_id of this TrainWorker. # noqa: E501
|
189
|
+
:rtype: str
|
190
|
+
"""
|
191
|
+
return self._node_id
|
192
|
+
|
193
|
+
@node_id.setter
|
194
|
+
def node_id(self, node_id):
|
195
|
+
"""Sets the node_id of this TrainWorker.
|
196
|
+
|
197
|
+
|
198
|
+
:param node_id: The node_id of this TrainWorker. # noqa: E501
|
199
|
+
:type: str
|
200
|
+
"""
|
201
|
+
if self.local_vars_configuration.client_side_validation and node_id is None: # noqa: E501
|
202
|
+
raise ValueError("Invalid value for `node_id`, must not be `None`") # noqa: E501
|
203
|
+
|
204
|
+
self._node_id = node_id
|
205
|
+
|
206
|
+
@property
|
207
|
+
def node_ip(self):
|
208
|
+
"""Gets the node_ip of this TrainWorker. # noqa: E501
|
209
|
+
|
210
|
+
|
211
|
+
:return: The node_ip of this TrainWorker. # noqa: E501
|
212
|
+
:rtype: str
|
213
|
+
"""
|
214
|
+
return self._node_ip
|
215
|
+
|
216
|
+
@node_ip.setter
|
217
|
+
def node_ip(self, node_ip):
|
218
|
+
"""Sets the node_ip of this TrainWorker.
|
219
|
+
|
220
|
+
|
221
|
+
:param node_ip: The node_ip of this TrainWorker. # noqa: E501
|
222
|
+
:type: str
|
223
|
+
"""
|
224
|
+
if self.local_vars_configuration.client_side_validation and node_ip is None: # noqa: E501
|
225
|
+
raise ValueError("Invalid value for `node_ip`, must not be `None`") # noqa: E501
|
226
|
+
|
227
|
+
self._node_ip = node_ip
|
228
|
+
|
229
|
+
@property
|
230
|
+
def pid(self):
|
231
|
+
"""Gets the pid of this TrainWorker. # noqa: E501
|
232
|
+
|
233
|
+
|
234
|
+
:return: The pid of this TrainWorker. # noqa: E501
|
235
|
+
:rtype: int
|
236
|
+
"""
|
237
|
+
return self._pid
|
238
|
+
|
239
|
+
@pid.setter
|
240
|
+
def pid(self, pid):
|
241
|
+
"""Sets the pid of this TrainWorker.
|
242
|
+
|
243
|
+
|
244
|
+
:param pid: The pid of this TrainWorker. # noqa: E501
|
245
|
+
:type: int
|
246
|
+
"""
|
247
|
+
if self.local_vars_configuration.client_side_validation and pid is None: # noqa: E501
|
248
|
+
raise ValueError("Invalid value for `pid`, must not be `None`") # noqa: E501
|
249
|
+
|
250
|
+
self._pid = pid
|
251
|
+
|
252
|
+
@property
|
253
|
+
def gpu_ids(self):
|
254
|
+
"""Gets the gpu_ids of this TrainWorker. # noqa: E501
|
255
|
+
|
256
|
+
|
257
|
+
:return: The gpu_ids of this TrainWorker. # noqa: E501
|
258
|
+
:rtype: list[int]
|
259
|
+
"""
|
260
|
+
return self._gpu_ids
|
261
|
+
|
262
|
+
@gpu_ids.setter
|
263
|
+
def gpu_ids(self, gpu_ids):
|
264
|
+
"""Sets the gpu_ids of this TrainWorker.
|
265
|
+
|
266
|
+
|
267
|
+
:param gpu_ids: The gpu_ids of this TrainWorker. # noqa: E501
|
268
|
+
:type: list[int]
|
269
|
+
"""
|
270
|
+
if self.local_vars_configuration.client_side_validation and gpu_ids is None: # noqa: E501
|
271
|
+
raise ValueError("Invalid value for `gpu_ids`, must not be `None`") # noqa: E501
|
272
|
+
|
273
|
+
self._gpu_ids = gpu_ids
|
274
|
+
|
275
|
+
@property
|
276
|
+
def status(self):
|
277
|
+
"""Gets the status of this TrainWorker. # noqa: E501
|
278
|
+
|
279
|
+
|
280
|
+
:return: The status of this TrainWorker. # noqa: E501
|
281
|
+
:rtype: ActorStatus
|
282
|
+
"""
|
283
|
+
return self._status
|
284
|
+
|
285
|
+
@status.setter
|
286
|
+
def status(self, status):
|
287
|
+
"""Sets the status of this TrainWorker.
|
288
|
+
|
289
|
+
|
290
|
+
:param status: The status of this TrainWorker. # noqa: E501
|
291
|
+
:type: ActorStatus
|
292
|
+
"""
|
293
|
+
if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501
|
294
|
+
raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501
|
295
|
+
|
296
|
+
self._status = status
|
297
|
+
|
298
|
+
@property
|
299
|
+
def resources(self):
|
300
|
+
"""Gets the resources of this TrainWorker. # noqa: E501
|
301
|
+
|
302
|
+
|
303
|
+
:return: The resources of this TrainWorker. # noqa: E501
|
304
|
+
:rtype: TrainResources
|
305
|
+
"""
|
306
|
+
return self._resources
|
307
|
+
|
308
|
+
@resources.setter
|
309
|
+
def resources(self, resources):
|
310
|
+
"""Sets the resources of this TrainWorker.
|
311
|
+
|
312
|
+
|
313
|
+
:param resources: The resources of this TrainWorker. # noqa: E501
|
314
|
+
:type: TrainResources
|
315
|
+
"""
|
316
|
+
|
317
|
+
self._resources = resources
|
318
|
+
|
319
|
+
def to_dict(self):
|
320
|
+
"""Returns the model properties as a dict"""
|
321
|
+
result = {}
|
322
|
+
|
323
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
324
|
+
value = getattr(self, attr)
|
325
|
+
if isinstance(value, list):
|
326
|
+
result[attr] = list(map(
|
327
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
328
|
+
value
|
329
|
+
))
|
330
|
+
elif hasattr(value, "to_dict"):
|
331
|
+
result[attr] = value.to_dict()
|
332
|
+
elif isinstance(value, dict):
|
333
|
+
result[attr] = dict(map(
|
334
|
+
lambda item: (item[0], item[1].to_dict())
|
335
|
+
if hasattr(item[1], "to_dict") else item,
|
336
|
+
value.items()
|
337
|
+
))
|
338
|
+
else:
|
339
|
+
result[attr] = value
|
340
|
+
|
341
|
+
return result
|
342
|
+
|
343
|
+
def to_str(self):
|
344
|
+
"""Returns the string representation of the model"""
|
345
|
+
return pprint.pformat(self.to_dict())
|
346
|
+
|
347
|
+
def __repr__(self):
|
348
|
+
"""For `print` and `pprint`"""
|
349
|
+
return self.to_str()
|
350
|
+
|
351
|
+
def __eq__(self, other):
|
352
|
+
"""Returns true if both objects are equal"""
|
353
|
+
if not isinstance(other, TrainWorker):
|
354
|
+
return False
|
355
|
+
|
356
|
+
return self.to_dict() == other.to_dict()
|
357
|
+
|
358
|
+
def __ne__(self, other):
|
359
|
+
"""Returns true if both objects are not equal"""
|
360
|
+
if not isinstance(other, TrainWorker):
|
361
|
+
return True
|
362
|
+
|
363
|
+
return self.to_dict() != other.to_dict()
|