anyscale 0.26.43__py3-none-any.whl → 0.26.45__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/common.py +1 -1
- anyscale/_private/docgen/__main__.py +2 -0
- anyscale/_private/docgen/models.md +2 -2
- anyscale/_private/workload/workload_sdk.py +6 -0
- anyscale/client/README.md +9 -0
- anyscale/client/openapi_client/__init__.py +7 -0
- anyscale/client/openapi_client/api/default_api.py +238 -5
- anyscale/client/openapi_client/models/__init__.py +7 -0
- anyscale/client/openapi_client/models/baseimagesenum.py +68 -1
- anyscale/client/openapi_client/models/describe_machine_pool_machines_filters.py +31 -3
- anyscale/client/openapi_client/models/describe_machine_pool_requests_filters.py +150 -0
- anyscale/client/openapi_client/models/describe_machine_pool_requests_request.py +19 -19
- anyscale/client/openapi_client/models/describe_machine_pool_workloads_filters.py +150 -0
- anyscale/client/openapi_client/models/describe_machine_pool_workloads_request.py +151 -0
- anyscale/client/openapi_client/models/file_storage.py +33 -5
- anyscale/client/openapi_client/models/plan_status.py +123 -0
- anyscale/client/openapi_client/models/supportedbaseimagesenum.py +68 -1
- anyscale/client/openapi_client/models/workload_machine_info.py +210 -0
- anyscale/client/openapi_client/models/workload_state_info.py +295 -0
- anyscale/client/openapi_client/models/workloadstateinfo_list_response.py +147 -0
- anyscale/commands/cloud_commands.py +1 -0
- anyscale/commands/compute_config_commands.py +10 -3
- anyscale/compute_config/__init__.py +16 -0
- anyscale/compute_config/_private/compute_config_sdk.py +172 -60
- anyscale/compute_config/commands.py +66 -1
- anyscale/compute_config/models.py +160 -3
- anyscale/conf.py +1 -1
- anyscale/controllers/cloud_controller.py +141 -3
- anyscale/job/_private/job_sdk.py +22 -0
- anyscale/sdk/anyscale_client/models/baseimagesenum.py +68 -1
- anyscale/sdk/anyscale_client/models/supportedbaseimagesenum.py +68 -1
- anyscale/shared_anyscale_utils/latest_ray_version.py +1 -1
- anyscale/telemetry.py +36 -44
- anyscale/version.py +1 -1
- {anyscale-0.26.43.dist-info → anyscale-0.26.45.dist-info}/METADATA +4 -3
- {anyscale-0.26.43.dist-info → anyscale-0.26.45.dist-info}/RECORD +41 -34
- {anyscale-0.26.43.dist-info → anyscale-0.26.45.dist-info}/LICENSE +0 -0
- {anyscale-0.26.43.dist-info → anyscale-0.26.45.dist-info}/NOTICE +0 -0
- {anyscale-0.26.43.dist-info → anyscale-0.26.45.dist-info}/WHEEL +0 -0
- {anyscale-0.26.43.dist-info → anyscale-0.26.45.dist-info}/entry_points.txt +0 -0
- {anyscale-0.26.43.dist-info → anyscale-0.26.45.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,210 @@
|
|
|
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 WorkloadMachineInfo(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
|
+
'machine_type': 'str',
|
|
37
|
+
'partition': 'str',
|
|
38
|
+
'machine_count': 'int',
|
|
39
|
+
'workload_score': 'int'
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
attribute_map = {
|
|
43
|
+
'machine_type': 'machine_type',
|
|
44
|
+
'partition': 'partition',
|
|
45
|
+
'machine_count': 'machine_count',
|
|
46
|
+
'workload_score': 'workload_score'
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
def __init__(self, machine_type=None, partition=None, machine_count=None, workload_score=None, local_vars_configuration=None): # noqa: E501
|
|
50
|
+
"""WorkloadMachineInfo - a model defined in OpenAPI""" # noqa: E501
|
|
51
|
+
if local_vars_configuration is None:
|
|
52
|
+
local_vars_configuration = Configuration()
|
|
53
|
+
self.local_vars_configuration = local_vars_configuration
|
|
54
|
+
|
|
55
|
+
self._machine_type = None
|
|
56
|
+
self._partition = None
|
|
57
|
+
self._machine_count = None
|
|
58
|
+
self._workload_score = None
|
|
59
|
+
self.discriminator = None
|
|
60
|
+
|
|
61
|
+
self.machine_type = machine_type
|
|
62
|
+
self.partition = partition
|
|
63
|
+
self.machine_count = machine_count
|
|
64
|
+
self.workload_score = workload_score
|
|
65
|
+
|
|
66
|
+
@property
|
|
67
|
+
def machine_type(self):
|
|
68
|
+
"""Gets the machine_type of this WorkloadMachineInfo. # noqa: E501
|
|
69
|
+
|
|
70
|
+
The type of the machine. # noqa: E501
|
|
71
|
+
|
|
72
|
+
:return: The machine_type of this WorkloadMachineInfo. # noqa: E501
|
|
73
|
+
:rtype: str
|
|
74
|
+
"""
|
|
75
|
+
return self._machine_type
|
|
76
|
+
|
|
77
|
+
@machine_type.setter
|
|
78
|
+
def machine_type(self, machine_type):
|
|
79
|
+
"""Sets the machine_type of this WorkloadMachineInfo.
|
|
80
|
+
|
|
81
|
+
The type of the machine. # noqa: E501
|
|
82
|
+
|
|
83
|
+
:param machine_type: The machine_type of this WorkloadMachineInfo. # noqa: E501
|
|
84
|
+
:type: str
|
|
85
|
+
"""
|
|
86
|
+
if self.local_vars_configuration.client_side_validation and machine_type is None: # noqa: E501
|
|
87
|
+
raise ValueError("Invalid value for `machine_type`, must not be `None`") # noqa: E501
|
|
88
|
+
|
|
89
|
+
self._machine_type = machine_type
|
|
90
|
+
|
|
91
|
+
@property
|
|
92
|
+
def partition(self):
|
|
93
|
+
"""Gets the partition of this WorkloadMachineInfo. # noqa: E501
|
|
94
|
+
|
|
95
|
+
The partition of the machine. # noqa: E501
|
|
96
|
+
|
|
97
|
+
:return: The partition of this WorkloadMachineInfo. # noqa: E501
|
|
98
|
+
:rtype: str
|
|
99
|
+
"""
|
|
100
|
+
return self._partition
|
|
101
|
+
|
|
102
|
+
@partition.setter
|
|
103
|
+
def partition(self, partition):
|
|
104
|
+
"""Sets the partition of this WorkloadMachineInfo.
|
|
105
|
+
|
|
106
|
+
The partition of the machine. # noqa: E501
|
|
107
|
+
|
|
108
|
+
:param partition: The partition of this WorkloadMachineInfo. # noqa: E501
|
|
109
|
+
:type: str
|
|
110
|
+
"""
|
|
111
|
+
if self.local_vars_configuration.client_side_validation and partition is None: # noqa: E501
|
|
112
|
+
raise ValueError("Invalid value for `partition`, must not be `None`") # noqa: E501
|
|
113
|
+
|
|
114
|
+
self._partition = partition
|
|
115
|
+
|
|
116
|
+
@property
|
|
117
|
+
def machine_count(self):
|
|
118
|
+
"""Gets the machine_count of this WorkloadMachineInfo. # noqa: E501
|
|
119
|
+
|
|
120
|
+
The number of machines of the given machine type and partition that are allocated to this workload. # noqa: E501
|
|
121
|
+
|
|
122
|
+
:return: The machine_count of this WorkloadMachineInfo. # noqa: E501
|
|
123
|
+
:rtype: int
|
|
124
|
+
"""
|
|
125
|
+
return self._machine_count
|
|
126
|
+
|
|
127
|
+
@machine_count.setter
|
|
128
|
+
def machine_count(self, machine_count):
|
|
129
|
+
"""Sets the machine_count of this WorkloadMachineInfo.
|
|
130
|
+
|
|
131
|
+
The number of machines of the given machine type and partition that are allocated to this workload. # noqa: E501
|
|
132
|
+
|
|
133
|
+
:param machine_count: The machine_count of this WorkloadMachineInfo. # noqa: E501
|
|
134
|
+
:type: int
|
|
135
|
+
"""
|
|
136
|
+
if self.local_vars_configuration.client_side_validation and machine_count is None: # noqa: E501
|
|
137
|
+
raise ValueError("Invalid value for `machine_count`, must not be `None`") # noqa: E501
|
|
138
|
+
|
|
139
|
+
self._machine_count = machine_count
|
|
140
|
+
|
|
141
|
+
@property
|
|
142
|
+
def workload_score(self):
|
|
143
|
+
"""Gets the workload_score of this WorkloadMachineInfo. # noqa: E501
|
|
144
|
+
|
|
145
|
+
The score of the workload. # noqa: E501
|
|
146
|
+
|
|
147
|
+
:return: The workload_score of this WorkloadMachineInfo. # noqa: E501
|
|
148
|
+
:rtype: int
|
|
149
|
+
"""
|
|
150
|
+
return self._workload_score
|
|
151
|
+
|
|
152
|
+
@workload_score.setter
|
|
153
|
+
def workload_score(self, workload_score):
|
|
154
|
+
"""Sets the workload_score of this WorkloadMachineInfo.
|
|
155
|
+
|
|
156
|
+
The score of the workload. # noqa: E501
|
|
157
|
+
|
|
158
|
+
:param workload_score: The workload_score of this WorkloadMachineInfo. # noqa: E501
|
|
159
|
+
:type: int
|
|
160
|
+
"""
|
|
161
|
+
if self.local_vars_configuration.client_side_validation and workload_score is None: # noqa: E501
|
|
162
|
+
raise ValueError("Invalid value for `workload_score`, must not be `None`") # noqa: E501
|
|
163
|
+
|
|
164
|
+
self._workload_score = workload_score
|
|
165
|
+
|
|
166
|
+
def to_dict(self):
|
|
167
|
+
"""Returns the model properties as a dict"""
|
|
168
|
+
result = {}
|
|
169
|
+
|
|
170
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
|
171
|
+
value = getattr(self, attr)
|
|
172
|
+
if isinstance(value, list):
|
|
173
|
+
result[attr] = list(map(
|
|
174
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
175
|
+
value
|
|
176
|
+
))
|
|
177
|
+
elif hasattr(value, "to_dict"):
|
|
178
|
+
result[attr] = value.to_dict()
|
|
179
|
+
elif isinstance(value, dict):
|
|
180
|
+
result[attr] = dict(map(
|
|
181
|
+
lambda item: (item[0], item[1].to_dict())
|
|
182
|
+
if hasattr(item[1], "to_dict") else item,
|
|
183
|
+
value.items()
|
|
184
|
+
))
|
|
185
|
+
else:
|
|
186
|
+
result[attr] = value
|
|
187
|
+
|
|
188
|
+
return result
|
|
189
|
+
|
|
190
|
+
def to_str(self):
|
|
191
|
+
"""Returns the string representation of the model"""
|
|
192
|
+
return pprint.pformat(self.to_dict())
|
|
193
|
+
|
|
194
|
+
def __repr__(self):
|
|
195
|
+
"""For `print` and `pprint`"""
|
|
196
|
+
return self.to_str()
|
|
197
|
+
|
|
198
|
+
def __eq__(self, other):
|
|
199
|
+
"""Returns true if both objects are equal"""
|
|
200
|
+
if not isinstance(other, WorkloadMachineInfo):
|
|
201
|
+
return False
|
|
202
|
+
|
|
203
|
+
return self.to_dict() == other.to_dict()
|
|
204
|
+
|
|
205
|
+
def __ne__(self, other):
|
|
206
|
+
"""Returns true if both objects are not equal"""
|
|
207
|
+
if not isinstance(other, WorkloadMachineInfo):
|
|
208
|
+
return True
|
|
209
|
+
|
|
210
|
+
return self.to_dict() != other.to_dict()
|
|
@@ -0,0 +1,295 @@
|
|
|
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 WorkloadStateInfo(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
|
+
'workload_name': 'str',
|
|
37
|
+
'workload_type': 'str',
|
|
38
|
+
'workload_start_time': 'datetime',
|
|
39
|
+
'workload_cloud': 'str',
|
|
40
|
+
'workload_project': 'str',
|
|
41
|
+
'workload_creator': 'str',
|
|
42
|
+
'workload_machine_info': 'list[WorkloadMachineInfo]'
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
attribute_map = {
|
|
46
|
+
'workload_name': 'workload_name',
|
|
47
|
+
'workload_type': 'workload_type',
|
|
48
|
+
'workload_start_time': 'workload_start_time',
|
|
49
|
+
'workload_cloud': 'workload_cloud',
|
|
50
|
+
'workload_project': 'workload_project',
|
|
51
|
+
'workload_creator': 'workload_creator',
|
|
52
|
+
'workload_machine_info': 'workload_machine_info'
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
def __init__(self, workload_name=None, workload_type=None, workload_start_time=None, workload_cloud=None, workload_project='', workload_creator='', workload_machine_info=None, local_vars_configuration=None): # noqa: E501
|
|
56
|
+
"""WorkloadStateInfo - a model defined in OpenAPI""" # noqa: E501
|
|
57
|
+
if local_vars_configuration is None:
|
|
58
|
+
local_vars_configuration = Configuration()
|
|
59
|
+
self.local_vars_configuration = local_vars_configuration
|
|
60
|
+
|
|
61
|
+
self._workload_name = None
|
|
62
|
+
self._workload_type = None
|
|
63
|
+
self._workload_start_time = None
|
|
64
|
+
self._workload_cloud = None
|
|
65
|
+
self._workload_project = None
|
|
66
|
+
self._workload_creator = None
|
|
67
|
+
self._workload_machine_info = None
|
|
68
|
+
self.discriminator = None
|
|
69
|
+
|
|
70
|
+
self.workload_name = workload_name
|
|
71
|
+
self.workload_type = workload_type
|
|
72
|
+
self.workload_start_time = workload_start_time
|
|
73
|
+
self.workload_cloud = workload_cloud
|
|
74
|
+
if workload_project is not None:
|
|
75
|
+
self.workload_project = workload_project
|
|
76
|
+
if workload_creator is not None:
|
|
77
|
+
self.workload_creator = workload_creator
|
|
78
|
+
self.workload_machine_info = workload_machine_info
|
|
79
|
+
|
|
80
|
+
@property
|
|
81
|
+
def workload_name(self):
|
|
82
|
+
"""Gets the workload_name of this WorkloadStateInfo. # noqa: E501
|
|
83
|
+
|
|
84
|
+
The name of the workload. # noqa: E501
|
|
85
|
+
|
|
86
|
+
:return: The workload_name of this WorkloadStateInfo. # noqa: E501
|
|
87
|
+
:rtype: str
|
|
88
|
+
"""
|
|
89
|
+
return self._workload_name
|
|
90
|
+
|
|
91
|
+
@workload_name.setter
|
|
92
|
+
def workload_name(self, workload_name):
|
|
93
|
+
"""Sets the workload_name of this WorkloadStateInfo.
|
|
94
|
+
|
|
95
|
+
The name of the workload. # noqa: E501
|
|
96
|
+
|
|
97
|
+
:param workload_name: The workload_name of this WorkloadStateInfo. # noqa: E501
|
|
98
|
+
:type: str
|
|
99
|
+
"""
|
|
100
|
+
if self.local_vars_configuration.client_side_validation and workload_name is None: # noqa: E501
|
|
101
|
+
raise ValueError("Invalid value for `workload_name`, must not be `None`") # noqa: E501
|
|
102
|
+
|
|
103
|
+
self._workload_name = workload_name
|
|
104
|
+
|
|
105
|
+
@property
|
|
106
|
+
def workload_type(self):
|
|
107
|
+
"""Gets the workload_type of this WorkloadStateInfo. # noqa: E501
|
|
108
|
+
|
|
109
|
+
The type of the workload. # noqa: E501
|
|
110
|
+
|
|
111
|
+
:return: The workload_type of this WorkloadStateInfo. # noqa: E501
|
|
112
|
+
:rtype: str
|
|
113
|
+
"""
|
|
114
|
+
return self._workload_type
|
|
115
|
+
|
|
116
|
+
@workload_type.setter
|
|
117
|
+
def workload_type(self, workload_type):
|
|
118
|
+
"""Sets the workload_type of this WorkloadStateInfo.
|
|
119
|
+
|
|
120
|
+
The type of the workload. # noqa: E501
|
|
121
|
+
|
|
122
|
+
:param workload_type: The workload_type of this WorkloadStateInfo. # noqa: E501
|
|
123
|
+
:type: str
|
|
124
|
+
"""
|
|
125
|
+
if self.local_vars_configuration.client_side_validation and workload_type is None: # noqa: E501
|
|
126
|
+
raise ValueError("Invalid value for `workload_type`, must not be `None`") # noqa: E501
|
|
127
|
+
|
|
128
|
+
self._workload_type = workload_type
|
|
129
|
+
|
|
130
|
+
@property
|
|
131
|
+
def workload_start_time(self):
|
|
132
|
+
"""Gets the workload_start_time of this WorkloadStateInfo. # noqa: E501
|
|
133
|
+
|
|
134
|
+
The start time of the workload. # noqa: E501
|
|
135
|
+
|
|
136
|
+
:return: The workload_start_time of this WorkloadStateInfo. # noqa: E501
|
|
137
|
+
:rtype: datetime
|
|
138
|
+
"""
|
|
139
|
+
return self._workload_start_time
|
|
140
|
+
|
|
141
|
+
@workload_start_time.setter
|
|
142
|
+
def workload_start_time(self, workload_start_time):
|
|
143
|
+
"""Sets the workload_start_time of this WorkloadStateInfo.
|
|
144
|
+
|
|
145
|
+
The start time of the workload. # noqa: E501
|
|
146
|
+
|
|
147
|
+
:param workload_start_time: The workload_start_time of this WorkloadStateInfo. # noqa: E501
|
|
148
|
+
:type: datetime
|
|
149
|
+
"""
|
|
150
|
+
if self.local_vars_configuration.client_side_validation and workload_start_time is None: # noqa: E501
|
|
151
|
+
raise ValueError("Invalid value for `workload_start_time`, must not be `None`") # noqa: E501
|
|
152
|
+
|
|
153
|
+
self._workload_start_time = workload_start_time
|
|
154
|
+
|
|
155
|
+
@property
|
|
156
|
+
def workload_cloud(self):
|
|
157
|
+
"""Gets the workload_cloud of this WorkloadStateInfo. # noqa: E501
|
|
158
|
+
|
|
159
|
+
The cloud of the workload. # noqa: E501
|
|
160
|
+
|
|
161
|
+
:return: The workload_cloud of this WorkloadStateInfo. # noqa: E501
|
|
162
|
+
:rtype: str
|
|
163
|
+
"""
|
|
164
|
+
return self._workload_cloud
|
|
165
|
+
|
|
166
|
+
@workload_cloud.setter
|
|
167
|
+
def workload_cloud(self, workload_cloud):
|
|
168
|
+
"""Sets the workload_cloud of this WorkloadStateInfo.
|
|
169
|
+
|
|
170
|
+
The cloud of the workload. # noqa: E501
|
|
171
|
+
|
|
172
|
+
:param workload_cloud: The workload_cloud of this WorkloadStateInfo. # noqa: E501
|
|
173
|
+
:type: str
|
|
174
|
+
"""
|
|
175
|
+
if self.local_vars_configuration.client_side_validation and workload_cloud is None: # noqa: E501
|
|
176
|
+
raise ValueError("Invalid value for `workload_cloud`, must not be `None`") # noqa: E501
|
|
177
|
+
|
|
178
|
+
self._workload_cloud = workload_cloud
|
|
179
|
+
|
|
180
|
+
@property
|
|
181
|
+
def workload_project(self):
|
|
182
|
+
"""Gets the workload_project of this WorkloadStateInfo. # noqa: E501
|
|
183
|
+
|
|
184
|
+
The project of the workload. # noqa: E501
|
|
185
|
+
|
|
186
|
+
:return: The workload_project of this WorkloadStateInfo. # noqa: E501
|
|
187
|
+
:rtype: str
|
|
188
|
+
"""
|
|
189
|
+
return self._workload_project
|
|
190
|
+
|
|
191
|
+
@workload_project.setter
|
|
192
|
+
def workload_project(self, workload_project):
|
|
193
|
+
"""Sets the workload_project of this WorkloadStateInfo.
|
|
194
|
+
|
|
195
|
+
The project of the workload. # noqa: E501
|
|
196
|
+
|
|
197
|
+
:param workload_project: The workload_project of this WorkloadStateInfo. # noqa: E501
|
|
198
|
+
:type: str
|
|
199
|
+
"""
|
|
200
|
+
|
|
201
|
+
self._workload_project = workload_project
|
|
202
|
+
|
|
203
|
+
@property
|
|
204
|
+
def workload_creator(self):
|
|
205
|
+
"""Gets the workload_creator of this WorkloadStateInfo. # noqa: E501
|
|
206
|
+
|
|
207
|
+
The creator of the workload. # noqa: E501
|
|
208
|
+
|
|
209
|
+
:return: The workload_creator of this WorkloadStateInfo. # noqa: E501
|
|
210
|
+
:rtype: str
|
|
211
|
+
"""
|
|
212
|
+
return self._workload_creator
|
|
213
|
+
|
|
214
|
+
@workload_creator.setter
|
|
215
|
+
def workload_creator(self, workload_creator):
|
|
216
|
+
"""Sets the workload_creator of this WorkloadStateInfo.
|
|
217
|
+
|
|
218
|
+
The creator of the workload. # noqa: E501
|
|
219
|
+
|
|
220
|
+
:param workload_creator: The workload_creator of this WorkloadStateInfo. # noqa: E501
|
|
221
|
+
:type: str
|
|
222
|
+
"""
|
|
223
|
+
|
|
224
|
+
self._workload_creator = workload_creator
|
|
225
|
+
|
|
226
|
+
@property
|
|
227
|
+
def workload_machine_info(self):
|
|
228
|
+
"""Gets the workload_machine_info of this WorkloadStateInfo. # noqa: E501
|
|
229
|
+
|
|
230
|
+
The machines allocated to this workload. # noqa: E501
|
|
231
|
+
|
|
232
|
+
:return: The workload_machine_info of this WorkloadStateInfo. # noqa: E501
|
|
233
|
+
:rtype: list[WorkloadMachineInfo]
|
|
234
|
+
"""
|
|
235
|
+
return self._workload_machine_info
|
|
236
|
+
|
|
237
|
+
@workload_machine_info.setter
|
|
238
|
+
def workload_machine_info(self, workload_machine_info):
|
|
239
|
+
"""Sets the workload_machine_info of this WorkloadStateInfo.
|
|
240
|
+
|
|
241
|
+
The machines allocated to this workload. # noqa: E501
|
|
242
|
+
|
|
243
|
+
:param workload_machine_info: The workload_machine_info of this WorkloadStateInfo. # noqa: E501
|
|
244
|
+
:type: list[WorkloadMachineInfo]
|
|
245
|
+
"""
|
|
246
|
+
if self.local_vars_configuration.client_side_validation and workload_machine_info is None: # noqa: E501
|
|
247
|
+
raise ValueError("Invalid value for `workload_machine_info`, must not be `None`") # noqa: E501
|
|
248
|
+
|
|
249
|
+
self._workload_machine_info = workload_machine_info
|
|
250
|
+
|
|
251
|
+
def to_dict(self):
|
|
252
|
+
"""Returns the model properties as a dict"""
|
|
253
|
+
result = {}
|
|
254
|
+
|
|
255
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
|
256
|
+
value = getattr(self, attr)
|
|
257
|
+
if isinstance(value, list):
|
|
258
|
+
result[attr] = list(map(
|
|
259
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
260
|
+
value
|
|
261
|
+
))
|
|
262
|
+
elif hasattr(value, "to_dict"):
|
|
263
|
+
result[attr] = value.to_dict()
|
|
264
|
+
elif isinstance(value, dict):
|
|
265
|
+
result[attr] = dict(map(
|
|
266
|
+
lambda item: (item[0], item[1].to_dict())
|
|
267
|
+
if hasattr(item[1], "to_dict") else item,
|
|
268
|
+
value.items()
|
|
269
|
+
))
|
|
270
|
+
else:
|
|
271
|
+
result[attr] = value
|
|
272
|
+
|
|
273
|
+
return result
|
|
274
|
+
|
|
275
|
+
def to_str(self):
|
|
276
|
+
"""Returns the string representation of the model"""
|
|
277
|
+
return pprint.pformat(self.to_dict())
|
|
278
|
+
|
|
279
|
+
def __repr__(self):
|
|
280
|
+
"""For `print` and `pprint`"""
|
|
281
|
+
return self.to_str()
|
|
282
|
+
|
|
283
|
+
def __eq__(self, other):
|
|
284
|
+
"""Returns true if both objects are equal"""
|
|
285
|
+
if not isinstance(other, WorkloadStateInfo):
|
|
286
|
+
return False
|
|
287
|
+
|
|
288
|
+
return self.to_dict() == other.to_dict()
|
|
289
|
+
|
|
290
|
+
def __ne__(self, other):
|
|
291
|
+
"""Returns true if both objects are not equal"""
|
|
292
|
+
if not isinstance(other, WorkloadStateInfo):
|
|
293
|
+
return True
|
|
294
|
+
|
|
295
|
+
return self.to_dict() != other.to_dict()
|
|
@@ -0,0 +1,147 @@
|
|
|
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 WorkloadstateinfoListResponse(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
|
+
'results': 'list[WorkloadStateInfo]',
|
|
37
|
+
'metadata': 'ListResponseMetadata'
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
attribute_map = {
|
|
41
|
+
'results': 'results',
|
|
42
|
+
'metadata': 'metadata'
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
def __init__(self, results=None, metadata=None, local_vars_configuration=None): # noqa: E501
|
|
46
|
+
"""WorkloadstateinfoListResponse - a model defined in OpenAPI""" # noqa: E501
|
|
47
|
+
if local_vars_configuration is None:
|
|
48
|
+
local_vars_configuration = Configuration()
|
|
49
|
+
self.local_vars_configuration = local_vars_configuration
|
|
50
|
+
|
|
51
|
+
self._results = None
|
|
52
|
+
self._metadata = None
|
|
53
|
+
self.discriminator = None
|
|
54
|
+
|
|
55
|
+
self.results = results
|
|
56
|
+
if metadata is not None:
|
|
57
|
+
self.metadata = metadata
|
|
58
|
+
|
|
59
|
+
@property
|
|
60
|
+
def results(self):
|
|
61
|
+
"""Gets the results of this WorkloadstateinfoListResponse. # noqa: E501
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
:return: The results of this WorkloadstateinfoListResponse. # noqa: E501
|
|
65
|
+
:rtype: list[WorkloadStateInfo]
|
|
66
|
+
"""
|
|
67
|
+
return self._results
|
|
68
|
+
|
|
69
|
+
@results.setter
|
|
70
|
+
def results(self, results):
|
|
71
|
+
"""Sets the results of this WorkloadstateinfoListResponse.
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
:param results: The results of this WorkloadstateinfoListResponse. # noqa: E501
|
|
75
|
+
:type: list[WorkloadStateInfo]
|
|
76
|
+
"""
|
|
77
|
+
if self.local_vars_configuration.client_side_validation and results is None: # noqa: E501
|
|
78
|
+
raise ValueError("Invalid value for `results`, must not be `None`") # noqa: E501
|
|
79
|
+
|
|
80
|
+
self._results = results
|
|
81
|
+
|
|
82
|
+
@property
|
|
83
|
+
def metadata(self):
|
|
84
|
+
"""Gets the metadata of this WorkloadstateinfoListResponse. # noqa: E501
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
:return: The metadata of this WorkloadstateinfoListResponse. # noqa: E501
|
|
88
|
+
:rtype: ListResponseMetadata
|
|
89
|
+
"""
|
|
90
|
+
return self._metadata
|
|
91
|
+
|
|
92
|
+
@metadata.setter
|
|
93
|
+
def metadata(self, metadata):
|
|
94
|
+
"""Sets the metadata of this WorkloadstateinfoListResponse.
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
:param metadata: The metadata of this WorkloadstateinfoListResponse. # noqa: E501
|
|
98
|
+
:type: ListResponseMetadata
|
|
99
|
+
"""
|
|
100
|
+
|
|
101
|
+
self._metadata = metadata
|
|
102
|
+
|
|
103
|
+
def to_dict(self):
|
|
104
|
+
"""Returns the model properties as a dict"""
|
|
105
|
+
result = {}
|
|
106
|
+
|
|
107
|
+
for attr, _ in six.iteritems(self.openapi_types):
|
|
108
|
+
value = getattr(self, attr)
|
|
109
|
+
if isinstance(value, list):
|
|
110
|
+
result[attr] = list(map(
|
|
111
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
112
|
+
value
|
|
113
|
+
))
|
|
114
|
+
elif hasattr(value, "to_dict"):
|
|
115
|
+
result[attr] = value.to_dict()
|
|
116
|
+
elif isinstance(value, dict):
|
|
117
|
+
result[attr] = dict(map(
|
|
118
|
+
lambda item: (item[0], item[1].to_dict())
|
|
119
|
+
if hasattr(item[1], "to_dict") else item,
|
|
120
|
+
value.items()
|
|
121
|
+
))
|
|
122
|
+
else:
|
|
123
|
+
result[attr] = value
|
|
124
|
+
|
|
125
|
+
return result
|
|
126
|
+
|
|
127
|
+
def to_str(self):
|
|
128
|
+
"""Returns the string representation of the model"""
|
|
129
|
+
return pprint.pformat(self.to_dict())
|
|
130
|
+
|
|
131
|
+
def __repr__(self):
|
|
132
|
+
"""For `print` and `pprint`"""
|
|
133
|
+
return self.to_str()
|
|
134
|
+
|
|
135
|
+
def __eq__(self, other):
|
|
136
|
+
"""Returns true if both objects are equal"""
|
|
137
|
+
if not isinstance(other, WorkloadstateinfoListResponse):
|
|
138
|
+
return False
|
|
139
|
+
|
|
140
|
+
return self.to_dict() == other.to_dict()
|
|
141
|
+
|
|
142
|
+
def __ne__(self, other):
|
|
143
|
+
"""Returns true if both objects are not equal"""
|
|
144
|
+
if not isinstance(other, WorkloadstateinfoListResponse):
|
|
145
|
+
return True
|
|
146
|
+
|
|
147
|
+
return self.to_dict() != other.to_dict()
|
|
@@ -926,6 +926,7 @@ def register_cloud( # noqa: PLR0913, PLR0912, C901
|
|
|
926
926
|
nfs_mount_targets=list(nfs_mount_target) if nfs_mount_target else [],
|
|
927
927
|
nfs_mount_path=nfs_mount_path,
|
|
928
928
|
kubernetes_zones=kubernetes_zones.split(",") if kubernetes_zones else [],
|
|
929
|
+
anyscale_operator_iam_identity=anyscale_operator_iam_identity,
|
|
929
930
|
)
|
|
930
931
|
|
|
931
932
|
else:
|
|
@@ -8,7 +8,7 @@ import anyscale
|
|
|
8
8
|
from anyscale.cli_logger import BlockLogger
|
|
9
9
|
from anyscale.commands import command_examples
|
|
10
10
|
from anyscale.commands.util import AnyscaleCommand, LegacyAnyscaleCommand
|
|
11
|
-
from anyscale.compute_config import ComputeConfig
|
|
11
|
+
from anyscale.compute_config import ComputeConfig, MultiDeploymentComputeConfig
|
|
12
12
|
from anyscale.controllers.compute_config_controller import ComputeConfigController
|
|
13
13
|
from anyscale.util import validate_non_negative_arg
|
|
14
14
|
|
|
@@ -105,8 +105,15 @@ def create_compute_config(
|
|
|
105
105
|
if compute_config_file is not None:
|
|
106
106
|
ComputeConfigController().create(compute_config_file, name)
|
|
107
107
|
elif config_file is not None:
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
try:
|
|
109
|
+
config = ComputeConfig.from_yaml(config_file)
|
|
110
|
+
except TypeError:
|
|
111
|
+
config = MultiDeploymentComputeConfig.from_yaml(config_file)
|
|
112
|
+
|
|
113
|
+
if isinstance(config, ComputeConfig):
|
|
114
|
+
anyscale.compute_config.create(config, name=name)
|
|
115
|
+
elif isinstance(config, MultiDeploymentComputeConfig):
|
|
116
|
+
anyscale.compute_config.create_multi_deployment(config, name=name)
|
|
110
117
|
else:
|
|
111
118
|
raise click.ClickException(
|
|
112
119
|
"Either the --config-file flag or [COMPUTE_CONFIG_FILE] argument must be provided."
|