anyscale 0.26.3__py3-none-any.whl → 0.26.5__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 (56) hide show
  1. anyscale/_private/anyscale_client/anyscale_client.py +1 -5
  2. anyscale/_private/docgen/__main__.py +0 -3
  3. anyscale/_private/docgen/api.md +0 -40
  4. anyscale/_private/docgen/models.md +2 -50
  5. anyscale/_private/workload/workload_config.py +11 -0
  6. anyscale/_private/workload/workload_sdk.py +4 -0
  7. anyscale/anyscale-cloud-setup-gcp-oa.yaml +2 -1
  8. anyscale/anyscale-cloud-setup-gcp.yaml +4 -2
  9. anyscale/client/README.md +11 -18
  10. anyscale/client/openapi_client/__init__.py +7 -11
  11. anyscale/client/openapi_client/api/default_api.py +537 -951
  12. anyscale/client/openapi_client/models/__init__.py +7 -11
  13. anyscale/client/openapi_client/models/{anyscale_version_response.py → backend_server_api_product_models_dataset_runs_dataset_response.py} +22 -22
  14. anyscale/client/openapi_client/models/{dataset_response.py → backend_server_api_product_routers_datasets_router_dataset_response.py} +8 -8
  15. anyscale/client/openapi_client/models/{logdetails_response.py → dataset_jobs.py} +22 -22
  16. anyscale/client/openapi_client/models/dataset_metrics.py +390 -0
  17. anyscale/{sdk/anyscale_client/models/session_command_types.py → client/openapi_client/models/dataset_state.py} +11 -9
  18. anyscale/client/openapi_client/models/{log_details.py → metric.py} +64 -42
  19. anyscale/client/openapi_client/models/node_type.py +2 -1
  20. anyscale/client/openapi_client/models/operator_metrics.py +256 -0
  21. anyscale/client/openapi_client/models/ray_runtime_env_config.py +29 -1
  22. anyscale/client/openapi_client/models/train_run.py +56 -3
  23. anyscale/client/openapi_client/models/train_worker.py +29 -3
  24. anyscale/cluster.py +5 -2
  25. anyscale/commands/anyscale_api/api_commands.py +0 -2
  26. anyscale/connect_utils/start_interactive_session.py +4 -1
  27. anyscale/controllers/cluster_controller.py +15 -26
  28. anyscale/controllers/project_controller.py +1 -6
  29. anyscale/job/_private/job_sdk.py +10 -1
  30. anyscale/job/models.py +8 -0
  31. anyscale/project_utils.py +9 -20
  32. anyscale/sdk/anyscale_client/__init__.py +0 -5
  33. anyscale/sdk/anyscale_client/api/default_api.py +0 -474
  34. anyscale/sdk/anyscale_client/models/__init__.py +0 -5
  35. anyscale/sdk/anyscale_client/models/node_type.py +2 -1
  36. anyscale/sdk/anyscale_client/models/ray_runtime_env_config.py +29 -1
  37. anyscale/version.py +1 -1
  38. {anyscale-0.26.3.dist-info → anyscale-0.26.5.dist-info}/METADATA +1 -1
  39. {anyscale-0.26.3.dist-info → anyscale-0.26.5.dist-info}/RECORD +44 -54
  40. anyscale/client/openapi_client/models/anyscaleversionresponse_response.py +0 -121
  41. anyscale/client/openapi_client/models/create_cloud_with_cloud_resource.py +0 -546
  42. anyscale/client/openapi_client/models/decoratedjob_list_response.py +0 -147
  43. anyscale/client/openapi_client/models/log_detail.py +0 -187
  44. anyscale/client/openapi_client/models/provider_metadata.py +0 -205
  45. anyscale/client/openapi_client/models/providermetadata_response.py +0 -121
  46. anyscale/client/openapi_client/models/setup_initialize_session_options.py +0 -225
  47. anyscale/commands/anyscale_api/session_commands_commands.py +0 -80
  48. anyscale/sdk/anyscale_client/models/create_session_command.py +0 -152
  49. anyscale/sdk/anyscale_client/models/session_command.py +0 -350
  50. anyscale/sdk/anyscale_client/models/sessioncommand_list_response.py +0 -147
  51. anyscale/sdk/anyscale_client/models/sessioncommand_response.py +0 -121
  52. {anyscale-0.26.3.dist-info → anyscale-0.26.5.dist-info}/LICENSE +0 -0
  53. {anyscale-0.26.3.dist-info → anyscale-0.26.5.dist-info}/NOTICE +0 -0
  54. {anyscale-0.26.3.dist-info → anyscale-0.26.5.dist-info}/WHEEL +0 -0
  55. {anyscale-0.26.3.dist-info → anyscale-0.26.5.dist-info}/entry_points.txt +0 -0
  56. {anyscale-0.26.3.dist-info → anyscale-0.26.5.dist-info}/top_level.txt +0 -0
@@ -1,225 +0,0 @@
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 SetupInitializeSessionOptions(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
- 'project_id': 'str',
37
- 'cluster_config': 'WriteClusterConfig',
38
- 'no_restart': 'bool',
39
- 'restart_only': 'bool',
40
- 'no_update': 'bool'
41
- }
42
-
43
- attribute_map = {
44
- 'project_id': 'project_id',
45
- 'cluster_config': 'cluster_config',
46
- 'no_restart': 'no_restart',
47
- 'restart_only': 'restart_only',
48
- 'no_update': 'no_update'
49
- }
50
-
51
- def __init__(self, project_id=None, cluster_config=None, no_restart=False, restart_only=False, no_update=False, local_vars_configuration=None): # noqa: E501
52
- """SetupInitializeSessionOptions - a model defined in OpenAPI""" # noqa: E501
53
- if local_vars_configuration is None:
54
- local_vars_configuration = Configuration()
55
- self.local_vars_configuration = local_vars_configuration
56
-
57
- self._project_id = None
58
- self._cluster_config = None
59
- self._no_restart = None
60
- self._restart_only = None
61
- self._no_update = None
62
- self.discriminator = None
63
-
64
- self.project_id = project_id
65
- if cluster_config is not None:
66
- self.cluster_config = cluster_config
67
- if no_restart is not None:
68
- self.no_restart = no_restart
69
- if restart_only is not None:
70
- self.restart_only = restart_only
71
- if no_update is not None:
72
- self.no_update = no_update
73
-
74
- @property
75
- def project_id(self):
76
- """Gets the project_id of this SetupInitializeSessionOptions. # noqa: E501
77
-
78
-
79
- :return: The project_id of this SetupInitializeSessionOptions. # noqa: E501
80
- :rtype: str
81
- """
82
- return self._project_id
83
-
84
- @project_id.setter
85
- def project_id(self, project_id):
86
- """Sets the project_id of this SetupInitializeSessionOptions.
87
-
88
-
89
- :param project_id: The project_id of this SetupInitializeSessionOptions. # noqa: E501
90
- :type: str
91
- """
92
- if self.local_vars_configuration.client_side_validation and project_id is None: # noqa: E501
93
- raise ValueError("Invalid value for `project_id`, must not be `None`") # noqa: E501
94
-
95
- self._project_id = project_id
96
-
97
- @property
98
- def cluster_config(self):
99
- """Gets the cluster_config of this SetupInitializeSessionOptions. # noqa: E501
100
-
101
-
102
- :return: The cluster_config of this SetupInitializeSessionOptions. # noqa: E501
103
- :rtype: WriteClusterConfig
104
- """
105
- return self._cluster_config
106
-
107
- @cluster_config.setter
108
- def cluster_config(self, cluster_config):
109
- """Sets the cluster_config of this SetupInitializeSessionOptions.
110
-
111
-
112
- :param cluster_config: The cluster_config of this SetupInitializeSessionOptions. # noqa: E501
113
- :type: WriteClusterConfig
114
- """
115
-
116
- self._cluster_config = cluster_config
117
-
118
- @property
119
- def no_restart(self):
120
- """Gets the no_restart of this SetupInitializeSessionOptions. # noqa: E501
121
-
122
-
123
- :return: The no_restart of this SetupInitializeSessionOptions. # noqa: E501
124
- :rtype: bool
125
- """
126
- return self._no_restart
127
-
128
- @no_restart.setter
129
- def no_restart(self, no_restart):
130
- """Sets the no_restart of this SetupInitializeSessionOptions.
131
-
132
-
133
- :param no_restart: The no_restart of this SetupInitializeSessionOptions. # noqa: E501
134
- :type: bool
135
- """
136
-
137
- self._no_restart = no_restart
138
-
139
- @property
140
- def restart_only(self):
141
- """Gets the restart_only of this SetupInitializeSessionOptions. # noqa: E501
142
-
143
-
144
- :return: The restart_only of this SetupInitializeSessionOptions. # noqa: E501
145
- :rtype: bool
146
- """
147
- return self._restart_only
148
-
149
- @restart_only.setter
150
- def restart_only(self, restart_only):
151
- """Sets the restart_only of this SetupInitializeSessionOptions.
152
-
153
-
154
- :param restart_only: The restart_only of this SetupInitializeSessionOptions. # noqa: E501
155
- :type: bool
156
- """
157
-
158
- self._restart_only = restart_only
159
-
160
- @property
161
- def no_update(self):
162
- """Gets the no_update of this SetupInitializeSessionOptions. # noqa: E501
163
-
164
-
165
- :return: The no_update of this SetupInitializeSessionOptions. # noqa: E501
166
- :rtype: bool
167
- """
168
- return self._no_update
169
-
170
- @no_update.setter
171
- def no_update(self, no_update):
172
- """Sets the no_update of this SetupInitializeSessionOptions.
173
-
174
-
175
- :param no_update: The no_update of this SetupInitializeSessionOptions. # noqa: E501
176
- :type: bool
177
- """
178
-
179
- self._no_update = no_update
180
-
181
- def to_dict(self):
182
- """Returns the model properties as a dict"""
183
- result = {}
184
-
185
- for attr, _ in six.iteritems(self.openapi_types):
186
- value = getattr(self, attr)
187
- if isinstance(value, list):
188
- result[attr] = list(map(
189
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
190
- value
191
- ))
192
- elif hasattr(value, "to_dict"):
193
- result[attr] = value.to_dict()
194
- elif isinstance(value, dict):
195
- result[attr] = dict(map(
196
- lambda item: (item[0], item[1].to_dict())
197
- if hasattr(item[1], "to_dict") else item,
198
- value.items()
199
- ))
200
- else:
201
- result[attr] = value
202
-
203
- return result
204
-
205
- def to_str(self):
206
- """Returns the string representation of the model"""
207
- return pprint.pformat(self.to_dict())
208
-
209
- def __repr__(self):
210
- """For `print` and `pprint`"""
211
- return self.to_str()
212
-
213
- def __eq__(self, other):
214
- """Returns true if both objects are equal"""
215
- if not isinstance(other, SetupInitializeSessionOptions):
216
- return False
217
-
218
- return self.to_dict() == other.to_dict()
219
-
220
- def __ne__(self, other):
221
- """Returns true if both objects are not equal"""
222
- if not isinstance(other, SetupInitializeSessionOptions):
223
- return True
224
-
225
- return self.to_dict() != other.to_dict()
@@ -1,80 +0,0 @@
1
- """
2
- Commands to interact with the Anyscale Session Commands API
3
- """
4
-
5
- from typing import Optional
6
-
7
- import click
8
-
9
- from anyscale.authenticate import get_auth_api_client
10
- from anyscale.formatters import common_formatter
11
- from anyscale.sdk.anyscale_client import CreateSessionCommand
12
-
13
-
14
- @click.group(
15
- "commands", help="Commands to interact with the Session Commands API.",
16
- )
17
- def session_commands() -> None:
18
- pass
19
-
20
-
21
- @session_commands.command(name="list", short_help="Lists Session Commands.")
22
- @click.argument("session-id", required=True)
23
- @click.option(
24
- "--count", type=int, default=10, help="Number of commands to show. Defaults to 10"
25
- )
26
- @click.option(
27
- "--paging-token",
28
- required=False,
29
- help="Paging token used to fetch subsequent pages of commands.",
30
- )
31
- def list_session_commands(
32
- session_id: str, count: int, paging_token: Optional[str],
33
- ) -> None:
34
- """Lists commands that have been executed on Session with SESSION_ID"""
35
-
36
- api_client = get_auth_api_client().anyscale_api_client
37
- response = api_client.list_session_commands(
38
- session_id, count=count, paging_token=paging_token
39
- )
40
-
41
- print(common_formatter.prettify_json(response.to_dict()))
42
-
43
-
44
- @session_commands.command(name="get", short_help="Get details about a Session Command.")
45
- @click.argument("session-command-id", required=True)
46
- def get_session_command(session_command_id: str) -> None:
47
- """Get details about the Session Command with id SESSION_COMMAND_ID"""
48
-
49
- api_client = get_auth_api_client().anyscale_api_client
50
- response = api_client.get_session_command(session_command_id)
51
-
52
- print(common_formatter.prettify_json(response.to_dict()))
53
-
54
-
55
- @session_commands.command(name="kill", short_help="Kills a Session Command.")
56
- @click.argument("session-command-id", required=True)
57
- def kill_session_command(session_command_id: str) -> None:
58
- """Kills the Session Command with id SESSION_COMMAND_ID"""
59
-
60
- api_client = get_auth_api_client().anyscale_api_client
61
- response = api_client.kill_session_command(session_command_id)
62
-
63
- print(common_formatter.prettify_json(response.to_dict()))
64
-
65
-
66
- @session_commands.command(
67
- name="create", short_help="Creates and executes a Session Command."
68
- )
69
- @click.argument("session-id", required=True)
70
- @click.argument("shell-command", required=True)
71
- def create_session_command(session_id: str, shell_command: str) -> None:
72
- """Creates and executes SHELL_COMMAND on the session with id SESSION_ID."""
73
-
74
- api_client = get_auth_api_client().anyscale_api_client
75
- create_data = CreateSessionCommand(
76
- session_id=session_id, shell_command=shell_command
77
- )
78
- response = api_client.create_session_command(create_data)
79
-
80
- print(common_formatter.prettify_json(response.to_dict()))
@@ -1,152 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- Anyscale 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 anyscale_client.configuration import Configuration
19
-
20
-
21
- class CreateSessionCommand(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
- 'session_id': 'str',
37
- 'shell_command': 'str'
38
- }
39
-
40
- attribute_map = {
41
- 'session_id': 'session_id',
42
- 'shell_command': 'shell_command'
43
- }
44
-
45
- def __init__(self, session_id=None, shell_command=None, local_vars_configuration=None): # noqa: E501
46
- """CreateSessionCommand - 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._session_id = None
52
- self._shell_command = None
53
- self.discriminator = None
54
-
55
- self.session_id = session_id
56
- self.shell_command = shell_command
57
-
58
- @property
59
- def session_id(self):
60
- """Gets the session_id of this CreateSessionCommand. # noqa: E501
61
-
62
- ID of the Session to execute this command on. # noqa: E501
63
-
64
- :return: The session_id of this CreateSessionCommand. # noqa: E501
65
- :rtype: str
66
- """
67
- return self._session_id
68
-
69
- @session_id.setter
70
- def session_id(self, session_id):
71
- """Sets the session_id of this CreateSessionCommand.
72
-
73
- ID of the Session to execute this command on. # noqa: E501
74
-
75
- :param session_id: The session_id of this CreateSessionCommand. # noqa: E501
76
- :type: str
77
- """
78
- if self.local_vars_configuration.client_side_validation and session_id is None: # noqa: E501
79
- raise ValueError("Invalid value for `session_id`, must not be `None`") # noqa: E501
80
-
81
- self._session_id = session_id
82
-
83
- @property
84
- def shell_command(self):
85
- """Gets the shell_command of this CreateSessionCommand. # noqa: E501
86
-
87
- Shell command string that will be executed. # noqa: E501
88
-
89
- :return: The shell_command of this CreateSessionCommand. # noqa: E501
90
- :rtype: str
91
- """
92
- return self._shell_command
93
-
94
- @shell_command.setter
95
- def shell_command(self, shell_command):
96
- """Sets the shell_command of this CreateSessionCommand.
97
-
98
- Shell command string that will be executed. # noqa: E501
99
-
100
- :param shell_command: The shell_command of this CreateSessionCommand. # noqa: E501
101
- :type: str
102
- """
103
- if self.local_vars_configuration.client_side_validation and shell_command is None: # noqa: E501
104
- raise ValueError("Invalid value for `shell_command`, must not be `None`") # noqa: E501
105
-
106
- self._shell_command = shell_command
107
-
108
- def to_dict(self):
109
- """Returns the model properties as a dict"""
110
- result = {}
111
-
112
- for attr, _ in six.iteritems(self.openapi_types):
113
- value = getattr(self, attr)
114
- if isinstance(value, list):
115
- result[attr] = list(map(
116
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
117
- value
118
- ))
119
- elif hasattr(value, "to_dict"):
120
- result[attr] = value.to_dict()
121
- elif isinstance(value, dict):
122
- result[attr] = dict(map(
123
- lambda item: (item[0], item[1].to_dict())
124
- if hasattr(item[1], "to_dict") else item,
125
- value.items()
126
- ))
127
- else:
128
- result[attr] = value
129
-
130
- return result
131
-
132
- def to_str(self):
133
- """Returns the string representation of the model"""
134
- return pprint.pformat(self.to_dict())
135
-
136
- def __repr__(self):
137
- """For `print` and `pprint`"""
138
- return self.to_str()
139
-
140
- def __eq__(self, other):
141
- """Returns true if both objects are equal"""
142
- if not isinstance(other, CreateSessionCommand):
143
- return False
144
-
145
- return self.to_dict() == other.to_dict()
146
-
147
- def __ne__(self, other):
148
- """Returns true if both objects are not equal"""
149
- if not isinstance(other, CreateSessionCommand):
150
- return True
151
-
152
- return self.to_dict() != other.to_dict()