anyscale 0.26.43__py3-none-any.whl → 0.26.44__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 (37) hide show
  1. anyscale/_private/anyscale_client/common.py +1 -1
  2. anyscale/_private/docgen/__main__.py +2 -0
  3. anyscale/_private/docgen/models.md +2 -2
  4. anyscale/_private/workload/workload_sdk.py +6 -0
  5. anyscale/client/README.md +6 -0
  6. anyscale/client/openapi_client/__init__.py +5 -0
  7. anyscale/client/openapi_client/api/default_api.py +132 -0
  8. anyscale/client/openapi_client/models/__init__.py +5 -0
  9. anyscale/client/openapi_client/models/baseimagesenum.py +68 -1
  10. anyscale/client/openapi_client/models/describe_machine_pool_machines_filters.py +31 -3
  11. anyscale/client/openapi_client/models/describe_machine_pool_workloads_filters.py +150 -0
  12. anyscale/client/openapi_client/models/describe_machine_pool_workloads_request.py +151 -0
  13. anyscale/client/openapi_client/models/file_storage.py +33 -5
  14. anyscale/client/openapi_client/models/supportedbaseimagesenum.py +68 -1
  15. anyscale/client/openapi_client/models/workload_machine_info.py +210 -0
  16. anyscale/client/openapi_client/models/workload_state_info.py +295 -0
  17. anyscale/client/openapi_client/models/workloadstateinfo_list_response.py +147 -0
  18. anyscale/commands/cloud_commands.py +1 -0
  19. anyscale/commands/compute_config_commands.py +10 -3
  20. anyscale/compute_config/__init__.py +16 -0
  21. anyscale/compute_config/_private/compute_config_sdk.py +172 -60
  22. anyscale/compute_config/commands.py +66 -1
  23. anyscale/compute_config/models.py +160 -3
  24. anyscale/conf.py +1 -1
  25. anyscale/controllers/cloud_controller.py +141 -3
  26. anyscale/job/_private/job_sdk.py +22 -0
  27. anyscale/sdk/anyscale_client/models/baseimagesenum.py +68 -1
  28. anyscale/sdk/anyscale_client/models/supportedbaseimagesenum.py +68 -1
  29. anyscale/shared_anyscale_utils/latest_ray_version.py +1 -1
  30. anyscale/version.py +1 -1
  31. {anyscale-0.26.43.dist-info → anyscale-0.26.44.dist-info}/METADATA +4 -3
  32. {anyscale-0.26.43.dist-info → anyscale-0.26.44.dist-info}/RECORD +37 -32
  33. {anyscale-0.26.43.dist-info → anyscale-0.26.44.dist-info}/LICENSE +0 -0
  34. {anyscale-0.26.43.dist-info → anyscale-0.26.44.dist-info}/NOTICE +0 -0
  35. {anyscale-0.26.43.dist-info → anyscale-0.26.44.dist-info}/WHEEL +0 -0
  36. {anyscale-0.26.43.dist-info → anyscale-0.26.44.dist-info}/entry_points.txt +0 -0
  37. {anyscale-0.26.43.dist-info → anyscale-0.26.44.dist-info}/top_level.txt +0 -0
@@ -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
- config = ComputeConfig.from_yaml(config_file)
109
- anyscale.compute_config.create(config, name=name)
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."
@@ -10,16 +10,20 @@ from anyscale.compute_config.commands import (
10
10
  _ARCHIVE_EXAMPLE,
11
11
  _CREATE_ARG_DOCSTRINGS,
12
12
  _CREATE_EXAMPLE,
13
+ _CREATE_MULTI_DEPLOYMENT_ARG_DOCSTRINGS,
14
+ _CREATE_MULTI_DEPLOYMENT_EXAMPLE,
13
15
  _GET_ARG_DOCSTRINGS,
14
16
  _GET_EXAMPLE,
15
17
  archive,
16
18
  create,
19
+ create_multi_deployment,
17
20
  get,
18
21
  )
19
22
  from anyscale.compute_config.models import (
20
23
  ComputeConfig,
21
24
  ComputeConfigVersion,
22
25
  HeadNodeConfig,
26
+ MultiDeploymentComputeConfig,
23
27
  WorkerNodeGroupConfig,
24
28
  )
25
29
 
@@ -49,6 +53,18 @@ class ComputeConfigSDK:
49
53
  full_name, _ = self._private_sdk.create_compute_config(config, name=name)
50
54
  return full_name
51
55
 
56
+ @sdk_docs(
57
+ doc_py_example=_CREATE_MULTI_DEPLOYMENT_EXAMPLE,
58
+ arg_docstrings=_CREATE_MULTI_DEPLOYMENT_ARG_DOCSTRINGS,
59
+ )
60
+ def create_multi_deployment( # noqa: F811
61
+ self, config: MultiDeploymentComputeConfig, *, name: Optional[str],
62
+ ) -> str:
63
+ full_name, _ = self._private_sdk.create_multi_deployment_compute_config(
64
+ config, name=name
65
+ )
66
+ return full_name
67
+
52
68
  @sdk_docs(
53
69
  doc_py_example=_GET_EXAMPLE, arg_docstrings=_GET_ARG_DOCSTRINGS,
54
70
  )