anyscale 0.24.88__py3-none-any.whl → 0.24.91__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 (115) hide show
  1. anyscale/__init__.py +46 -0
  2. anyscale/_private/anyscale_client/anyscale_client.py +148 -28
  3. anyscale/_private/anyscale_client/common.py +74 -1
  4. anyscale/_private/anyscale_client/fake_anyscale_client.py +165 -1
  5. anyscale/_private/docgen/README.md +1 -1
  6. anyscale/_private/docgen/__main__.py +62 -19
  7. anyscale/_private/docgen/api.md +0 -20
  8. anyscale/_private/docgen/generator.py +3 -2
  9. anyscale/_private/docgen/models.md +1 -46
  10. anyscale/_private/workload/workload_config.py +1 -1
  11. anyscale/aggregated_instance_usage/__init__.py +1 -1
  12. anyscale/aggregated_instance_usage/commands.py +2 -4
  13. anyscale/aggregated_instance_usage/models.py +8 -8
  14. anyscale/client/README.md +15 -22
  15. anyscale/client/openapi_client/__init__.py +10 -14
  16. anyscale/client/openapi_client/api/default_api.py +634 -957
  17. anyscale/client/openapi_client/models/__init__.py +10 -14
  18. anyscale/client/openapi_client/models/{session_event_types.py → cloud_deployment_config.py} +35 -24
  19. anyscale/client/openapi_client/models/{platformfinetuningjob_response.py → clouddeploymentconfig_response.py} +11 -11
  20. anyscale/client/openapi_client/models/{company_size.py → cluster_size.py} +10 -10
  21. anyscale/client/openapi_client/models/cluster_status_details.py +2 -1
  22. anyscale/client/openapi_client/models/create_experimental_workspace.py +29 -1
  23. anyscale/client/openapi_client/models/{resubmit_ft_job_request.py → describe_machine_pool_request.py} +21 -20
  24. anyscale/client/openapi_client/models/describe_machine_pool_response.py +123 -0
  25. anyscale/client/openapi_client/models/{fine_tuning_job_status.py → describemachinepoolresponse_response.py} +34 -16
  26. anyscale/client/openapi_client/models/machine_allocation_state.py +3 -1
  27. anyscale/client/openapi_client/models/machine_state_info.py +326 -0
  28. anyscale/client/openapi_client/models/organization_marketing_questions.py +80 -54
  29. anyscale/client/openapi_client/models/request_state_info.py +210 -0
  30. anyscale/client/openapi_client/models/{sessionevent_list_response.py → scheduler_info.py} +43 -38
  31. anyscale/client/openapi_client/models/usage_by_cluster.py +28 -1
  32. anyscale/client/openapi_client/models/usage_by_user.py +30 -3
  33. anyscale/client/openapi_client/models/workload_info.py +210 -0
  34. anyscale/cloud/__init__.py +83 -0
  35. anyscale/cloud/_private/cloud_sdk.py +25 -0
  36. anyscale/cloud/commands.py +45 -0
  37. anyscale/cloud/models.py +91 -0
  38. anyscale/cluster_compute.py +1 -1
  39. anyscale/commands/aggregated_instance_usage_commands.py +4 -4
  40. anyscale/commands/cloud_commands.py +38 -2
  41. anyscale/commands/command_examples.py +61 -0
  42. anyscale/commands/job_commands.py +15 -3
  43. anyscale/commands/machine_pool_commands.py +113 -1
  44. anyscale/commands/organization_invitation_commands.py +98 -0
  45. anyscale/commands/project_commands.py +52 -2
  46. anyscale/commands/resource_quota_commands.py +98 -11
  47. anyscale/commands/service_commands.py +1 -1
  48. anyscale/commands/session_commands_hidden.py +5 -1
  49. anyscale/commands/user_commands.py +1 -1
  50. anyscale/commands/util.py +1 -1
  51. anyscale/commands/workspace_commands.py +1 -1
  52. anyscale/connect.py +1 -1
  53. anyscale/connect_utils/project.py +7 -4
  54. anyscale/controllers/cloud_controller.py +6 -6
  55. anyscale/controllers/cloud_functional_verification_controller.py +1 -1
  56. anyscale/controllers/cluster_controller.py +2 -2
  57. anyscale/controllers/compute_config_controller.py +1 -1
  58. anyscale/controllers/experimental_integrations_controller.py +1 -1
  59. anyscale/controllers/job_controller.py +8 -3
  60. anyscale/controllers/list_controller.py +2 -2
  61. anyscale/controllers/machine_pool_controller.py +12 -1
  62. anyscale/controllers/project_controller.py +4 -3
  63. anyscale/controllers/schedule_controller.py +1 -1
  64. anyscale/controllers/service_controller.py +1 -1
  65. anyscale/controllers/workspace_controller.py +1 -1
  66. anyscale/models/job_model.py +1 -1
  67. anyscale/organization_invitation/__init__.py +61 -0
  68. anyscale/organization_invitation/_private/organization_invitation_sdk.py +24 -0
  69. anyscale/organization_invitation/commands.py +84 -0
  70. anyscale/organization_invitation/models.py +45 -0
  71. anyscale/project/__init__.py +35 -0
  72. anyscale/project/_private/project_sdk.py +27 -0
  73. anyscale/project/commands.py +56 -0
  74. anyscale/project/models.py +91 -0
  75. anyscale/{project.py → project_utils.py} +3 -4
  76. anyscale/resource_quota/__init__.py +99 -0
  77. anyscale/resource_quota/_private/resource_quota_sdk.py +111 -0
  78. anyscale/resource_quota/commands.py +150 -0
  79. anyscale/resource_quota/models.py +303 -0
  80. anyscale/scripts.py +4 -0
  81. anyscale/sdk/anyscale_client/__init__.py +0 -5
  82. anyscale/sdk/anyscale_client/api/default_api.py +0 -150
  83. anyscale/sdk/anyscale_client/models/__init__.py +0 -5
  84. anyscale/sdk/anyscale_client/models/cluster_status_details.py +2 -1
  85. anyscale/sdk/anyscale_client/sdk.py +1 -1
  86. anyscale/user/__init__.py +1 -1
  87. anyscale/user/commands.py +1 -1
  88. anyscale/user/models.py +25 -15
  89. anyscale/util.py +15 -0
  90. anyscale/utils/cloud_utils.py +1 -1
  91. anyscale/version.py +1 -1
  92. anyscale/workspace_utils.py +1 -1
  93. {anyscale-0.24.88.dist-info → anyscale-0.24.91.dist-info}/METADATA +1 -5
  94. {anyscale-0.24.88.dist-info → anyscale-0.24.91.dist-info}/RECORD +100 -94
  95. anyscale/client/openapi_client/models/create_fine_tuning_hyperparameters.py +0 -156
  96. anyscale/client/openapi_client/models/create_fine_tuning_job_product_request.py +0 -353
  97. anyscale/client/openapi_client/models/finish_ft_job_request.py +0 -204
  98. anyscale/client/openapi_client/models/log_level_types.py +0 -100
  99. anyscale/client/openapi_client/models/platform_fine_tuning_job.py +0 -577
  100. anyscale/client/openapi_client/models/platformfinetuningjob_list_response.py +0 -147
  101. anyscale/client/openapi_client/models/session_event.py +0 -267
  102. anyscale/client/openapi_client/models/session_event_cause.py +0 -150
  103. anyscale/controllers/resource_quota_controller.py +0 -183
  104. anyscale/sdk/anyscale_client/models/log_level_types.py +0 -100
  105. anyscale/sdk/anyscale_client/models/session_event.py +0 -267
  106. anyscale/sdk/anyscale_client/models/session_event_cause.py +0 -150
  107. anyscale/sdk/anyscale_client/models/session_event_types.py +0 -111
  108. anyscale/sdk/anyscale_client/models/sessionevent_list_response.py +0 -147
  109. anyscale/utils/imports/azure.py +0 -14
  110. /anyscale/{cloud.py → cloud_utils.py} +0 -0
  111. {anyscale-0.24.88.dist-info → anyscale-0.24.91.dist-info}/LICENSE +0 -0
  112. {anyscale-0.24.88.dist-info → anyscale-0.24.91.dist-info}/NOTICE +0 -0
  113. {anyscale-0.24.88.dist-info → anyscale-0.24.91.dist-info}/WHEEL +0 -0
  114. {anyscale-0.24.88.dist-info → anyscale-0.24.91.dist-info}/entry_points.txt +0 -0
  115. {anyscale-0.24.88.dist-info → anyscale-0.24.91.dist-info}/top_level.txt +0 -0
@@ -137,7 +137,6 @@ from anyscale_client.models.list_service_model import ListServiceModel
137
137
  from anyscale_client.models.listservicemodel_list_response import ListservicemodelListResponse
138
138
  from anyscale_client.models.log_download_result import LogDownloadResult
139
139
  from anyscale_client.models.log_file_chunk import LogFileChunk
140
- from anyscale_client.models.log_level_types import LogLevelTypes
141
140
  from anyscale_client.models.log_stream import LogStream
142
141
  from anyscale_client.models.logdownloadresult_response import LogdownloadresultResponse
143
142
  from anyscale_client.models.logstream_response import LogstreamResponse
@@ -194,9 +193,6 @@ from anyscale_client.models.servicemodel_response import ServicemodelResponse
194
193
  from anyscale_client.models.session import Session
195
194
  from anyscale_client.models.session_command import SessionCommand
196
195
  from anyscale_client.models.session_command_types import SessionCommandTypes
197
- from anyscale_client.models.session_event import SessionEvent
198
- from anyscale_client.models.session_event_cause import SessionEventCause
199
- from anyscale_client.models.session_event_types import SessionEventTypes
200
196
  from anyscale_client.models.session_list_response import SessionListResponse
201
197
  from anyscale_client.models.session_operation import SessionOperation
202
198
  from anyscale_client.models.session_operation_type import SessionOperationType
@@ -207,7 +203,6 @@ from anyscale_client.models.session_state_data import SessionStateData
207
203
  from anyscale_client.models.session_stopping_data import SessionStoppingData
208
204
  from anyscale_client.models.sessioncommand_list_response import SessioncommandListResponse
209
205
  from anyscale_client.models.sessioncommand_response import SessioncommandResponse
210
- from anyscale_client.models.sessionevent_list_response import SessioneventListResponse
211
206
  from anyscale_client.models.sessionoperation_response import SessionoperationResponse
212
207
  from anyscale_client.models.sessions_query import SessionsQuery
213
208
  from anyscale_client.models.sort_by_clause_jobs_sort_field import SortByClauseJobsSortField
@@ -6140,156 +6140,6 @@ class DefaultApi(object):
6140
6140
  _request_timeout=local_var_params.get('_request_timeout'),
6141
6141
  collection_formats=collection_formats)
6142
6142
 
6143
- def get_session_event_log(self, session_id, **kwargs): # noqa: E501
6144
- """Get Session Event Log # noqa: E501
6145
-
6146
- Retrieves a session's event log. # noqa: E501
6147
- This method makes a synchronous HTTP request by default. To make an
6148
- asynchronous HTTP request, please pass async_req=True
6149
- >>> thread = api.get_session_event_log(session_id, async_req=True)
6150
- >>> result = thread.get()
6151
-
6152
- :param async_req bool: execute request asynchronously
6153
- :param str session_id: ID of the Session to retrieve event logs for. (required)
6154
- :param datetime before: Filters events occurring before this datetime.
6155
- :param datetime after: Filters events occurring after this datetime.
6156
- :param list[SessionEventTypes] event_types: Filters events to these types.
6157
- :param list[LogLevelTypes] log_level_types: Filters logs to these leves.
6158
- :param str paging_token:
6159
- :param int count:
6160
- :param _preload_content: if False, the urllib3.HTTPResponse object will
6161
- be returned without reading/decoding response
6162
- data. Default is True.
6163
- :param _request_timeout: timeout setting for this request. If one
6164
- number provided, it will be total request
6165
- timeout. It can also be a pair (tuple) of
6166
- (connection, read) timeouts.
6167
- :return: SessioneventListResponse
6168
- If the method is called asynchronously,
6169
- returns the request thread.
6170
- """
6171
- kwargs['_return_http_data_only'] = True
6172
- return self.get_session_event_log_with_http_info(session_id, **kwargs) # noqa: E501
6173
-
6174
- def get_session_event_log_with_http_info(self, session_id, **kwargs): # noqa: E501
6175
- """Get Session Event Log # noqa: E501
6176
-
6177
- Retrieves a session's event log. # noqa: E501
6178
- This method makes a synchronous HTTP request by default. To make an
6179
- asynchronous HTTP request, please pass async_req=True
6180
- >>> thread = api.get_session_event_log_with_http_info(session_id, async_req=True)
6181
- >>> result = thread.get()
6182
-
6183
- :param async_req bool: execute request asynchronously
6184
- :param str session_id: ID of the Session to retrieve event logs for. (required)
6185
- :param datetime before: Filters events occurring before this datetime.
6186
- :param datetime after: Filters events occurring after this datetime.
6187
- :param list[SessionEventTypes] event_types: Filters events to these types.
6188
- :param list[LogLevelTypes] log_level_types: Filters logs to these leves.
6189
- :param str paging_token:
6190
- :param int count:
6191
- :param _return_http_data_only: response data without head status code
6192
- and headers
6193
- :param _preload_content: if False, the urllib3.HTTPResponse object will
6194
- be returned without reading/decoding response
6195
- data. Default is True.
6196
- :param _request_timeout: timeout setting for this request. If one
6197
- number provided, it will be total request
6198
- timeout. It can also be a pair (tuple) of
6199
- (connection, read) timeouts.
6200
- :return: tuple(SessioneventListResponse, status_code(int), headers(HTTPHeaderDict))
6201
- If the method is called asynchronously,
6202
- returns the request thread.
6203
- """
6204
-
6205
- local_var_params = locals()
6206
-
6207
- all_params = [
6208
- 'session_id',
6209
- 'before',
6210
- 'after',
6211
- 'event_types',
6212
- 'log_level_types',
6213
- 'paging_token',
6214
- 'count'
6215
- ]
6216
- all_params.extend(
6217
- [
6218
- 'async_req',
6219
- '_return_http_data_only',
6220
- '_preload_content',
6221
- '_request_timeout'
6222
- ]
6223
- )
6224
-
6225
- for key, val in six.iteritems(local_var_params['kwargs']):
6226
- if key not in all_params:
6227
- raise ApiTypeError(
6228
- "Got an unexpected keyword argument '%s'"
6229
- " to method get_session_event_log" % key
6230
- )
6231
- local_var_params[key] = val
6232
- del local_var_params['kwargs']
6233
- # verify the required parameter 'session_id' is set
6234
- if self.api_client.client_side_validation and ('session_id' not in local_var_params or # noqa: E501
6235
- local_var_params['session_id'] is None): # noqa: E501
6236
- raise ApiValueError("Missing the required parameter `session_id` when calling `get_session_event_log`") # noqa: E501
6237
-
6238
- if self.api_client.client_side_validation and 'count' in local_var_params and local_var_params['count'] > 1000: # noqa: E501
6239
- raise ApiValueError("Invalid value for parameter `count` when calling `get_session_event_log`, must be a value less than or equal to `1000`") # noqa: E501
6240
- if self.api_client.client_side_validation and 'count' in local_var_params and local_var_params['count'] < 0: # noqa: E501
6241
- raise ApiValueError("Invalid value for parameter `count` when calling `get_session_event_log`, must be a value greater than or equal to `0`") # noqa: E501
6242
- collection_formats = {}
6243
-
6244
- path_params = {}
6245
-
6246
- query_params = []
6247
- if 'session_id' in local_var_params and local_var_params['session_id'] is not None: # noqa: E501
6248
- query_params.append(('session_id', local_var_params['session_id'])) # noqa: E501
6249
- if 'before' in local_var_params and local_var_params['before'] is not None: # noqa: E501
6250
- query_params.append(('before', local_var_params['before'])) # noqa: E501
6251
- if 'after' in local_var_params and local_var_params['after'] is not None: # noqa: E501
6252
- query_params.append(('after', local_var_params['after'])) # noqa: E501
6253
- if 'event_types' in local_var_params and local_var_params['event_types'] is not None: # noqa: E501
6254
- query_params.append(('event_types', local_var_params['event_types'])) # noqa: E501
6255
- collection_formats['event_types'] = 'multi' # noqa: E501
6256
- if 'log_level_types' in local_var_params and local_var_params['log_level_types'] is not None: # noqa: E501
6257
- query_params.append(('log_level_types', local_var_params['log_level_types'])) # noqa: E501
6258
- collection_formats['log_level_types'] = 'multi' # noqa: E501
6259
- if 'paging_token' in local_var_params and local_var_params['paging_token'] is not None: # noqa: E501
6260
- query_params.append(('paging_token', local_var_params['paging_token'])) # noqa: E501
6261
- if 'count' in local_var_params and local_var_params['count'] is not None: # noqa: E501
6262
- query_params.append(('count', local_var_params['count'])) # noqa: E501
6263
-
6264
- header_params = {}
6265
-
6266
- form_params = []
6267
- local_var_files = {}
6268
-
6269
- body_params = None
6270
- # HTTP header `Accept`
6271
- header_params['Accept'] = self.api_client.select_header_accept(
6272
- ['application/json']) # noqa: E501
6273
-
6274
- # Authentication setting
6275
- auth_settings = [] # noqa: E501
6276
-
6277
- return self.api_client.call_api(
6278
- '/session_events/', 'GET',
6279
- path_params,
6280
- query_params,
6281
- header_params,
6282
- body=body_params,
6283
- post_params=form_params,
6284
- files=local_var_files,
6285
- response_type='SessioneventListResponse', # noqa: E501
6286
- auth_settings=auth_settings,
6287
- async_req=local_var_params.get('async_req'),
6288
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
6289
- _preload_content=local_var_params.get('_preload_content', True),
6290
- _request_timeout=local_var_params.get('_request_timeout'),
6291
- collection_formats=collection_formats)
6292
-
6293
6143
  def get_session_for_job(self, production_job_id, **kwargs): # noqa: E501
6294
6144
  """Get Session For Job # noqa: E501
6295
6145
 
@@ -123,7 +123,6 @@ from anyscale_client.models.list_service_model import ListServiceModel
123
123
  from anyscale_client.models.listservicemodel_list_response import ListservicemodelListResponse
124
124
  from anyscale_client.models.log_download_result import LogDownloadResult
125
125
  from anyscale_client.models.log_file_chunk import LogFileChunk
126
- from anyscale_client.models.log_level_types import LogLevelTypes
127
126
  from anyscale_client.models.log_stream import LogStream
128
127
  from anyscale_client.models.logdownloadresult_response import LogdownloadresultResponse
129
128
  from anyscale_client.models.logstream_response import LogstreamResponse
@@ -180,9 +179,6 @@ from anyscale_client.models.servicemodel_response import ServicemodelResponse
180
179
  from anyscale_client.models.session import Session
181
180
  from anyscale_client.models.session_command import SessionCommand
182
181
  from anyscale_client.models.session_command_types import SessionCommandTypes
183
- from anyscale_client.models.session_event import SessionEvent
184
- from anyscale_client.models.session_event_cause import SessionEventCause
185
- from anyscale_client.models.session_event_types import SessionEventTypes
186
182
  from anyscale_client.models.session_list_response import SessionListResponse
187
183
  from anyscale_client.models.session_operation import SessionOperation
188
184
  from anyscale_client.models.session_operation_type import SessionOperationType
@@ -193,7 +189,6 @@ from anyscale_client.models.session_state_data import SessionStateData
193
189
  from anyscale_client.models.session_stopping_data import SessionStoppingData
194
190
  from anyscale_client.models.sessioncommand_list_response import SessioncommandListResponse
195
191
  from anyscale_client.models.sessioncommand_response import SessioncommandResponse
196
- from anyscale_client.models.sessionevent_list_response import SessioneventListResponse
197
192
  from anyscale_client.models.sessionoperation_response import SessionoperationResponse
198
193
  from anyscale_client.models.sessions_query import SessionsQuery
199
194
  from anyscale_client.models.sort_by_clause_jobs_sort_field import SortByClauseJobsSortField
@@ -30,8 +30,9 @@ class ClusterStatusDetails(object):
30
30
  """
31
31
  LAUNCHING_NODES = "LAUNCHING_NODES"
32
32
  CONFIGURING_HEAD_NODE = "CONFIGURING_HEAD_NODE"
33
+ UPDATING_CONTAINERS = "UPDATING_CONTAINERS"
33
34
 
34
- allowable_values = [LAUNCHING_NODES, CONFIGURING_HEAD_NODE] # noqa: E501
35
+ allowable_values = [LAUNCHING_NODES, CONFIGURING_HEAD_NODE, UPDATING_CONTAINERS] # noqa: E501
35
36
 
36
37
  """
37
38
  Attributes:
@@ -39,7 +39,7 @@ from anyscale.util import get_endpoint
39
39
  from anyscale.authenticate import AuthenticationBlock
40
40
  from anyscale_client.models import ClusterEnvironmentBuildStatus
41
41
  from anyscale.util import get_ray_and_py_version_for_default_cluster_env
42
- from anyscale.project import get_default_project
42
+ from anyscale.project_utils import get_default_project
43
43
  from anyscale.utils.ray_version_utils import get_correct_name_for_base_image_name
44
44
 
45
45
  logger = logging.getLogger(__file__)
anyscale/user/__init__.py CHANGED
@@ -30,6 +30,6 @@ class UserSDK:
30
30
  def admin_batch_create( # noqa: F811
31
31
  self, admin_create_users: List[AdminCreateUser],
32
32
  ) -> List[AdminCreatedUser]:
33
- """Batch create users without email verification as an admin.
33
+ """Batch create, as an admin, users without email verification.
34
34
  """
35
35
  return self._private_sdk.admin_batch_create(admin_create_users)
anyscale/user/commands.py CHANGED
@@ -37,6 +37,6 @@ _ADMIN_BATCH_CREATE_ARG_DOCSTRINGS = {
37
37
  def admin_batch_create(
38
38
  admin_create_users: List[AdminCreateUser], *, _sdk: PrivateUserSDK
39
39
  ) -> List[AdminCreatedUser]:
40
- """Batch create users without email verification as an admin.
40
+ """Batch create, as an admin, users without email verification.
41
41
  """
42
42
  return _sdk.admin_batch_create(admin_create_users)
anyscale/user/models.py CHANGED
@@ -15,13 +15,13 @@ import anyscale
15
15
  from anyscale.user.models import AdminCreateUser
16
16
 
17
17
  admin_create_user = AdminCreateUser(
18
- # Name of the user to be created.
18
+ # First name of the user to be created.
19
19
  name="name",
20
20
  # Email of the user to be created.
21
21
  email="test@anyscale.com",
22
22
  # Password for the user account being created.
23
23
  password="",
24
- # Whether the user is an SSO user.
24
+ # Whether the user is an SSO user. SSO users can log in using SSO.
25
25
  is_sso_user=False,
26
26
  # Optional last name of the user to be created.
27
27
  lastname="lastname",
@@ -29,7 +29,7 @@ admin_create_user = AdminCreateUser(
29
29
  title="title",
30
30
  )
31
31
  """
32
- name: str = field(metadata={"docstring": "Name of the user to be created."})
32
+ name: str = field(metadata={"docstring": "First name of the user to be created."})
33
33
 
34
34
  def _validate_name(self, name: str):
35
35
  if not isinstance(name, str):
@@ -50,7 +50,9 @@ admin_create_user = AdminCreateUser(
50
50
  raise TypeError("password must be a string.")
51
51
 
52
52
  is_sso_user: bool = field(
53
- metadata={"docstring": "Whether the user is an SSO user."},
53
+ metadata={
54
+ "docstring": "Whether the user is an SSO user. SSO users can log in using SSO."
55
+ },
54
56
  )
55
57
 
56
58
  def _validate_is_sso_user(self, is_sso_user: bool):
@@ -86,13 +88,13 @@ import anyscale
86
88
  from anyscale.user.models import AdminCreateUser
87
89
 
88
90
  admin_create_user = AdminCreateUser(
89
- # Name of the user to be created.
91
+ # First name of the user to be created.
90
92
  name="name",
91
93
  # Email of the user to be created.
92
94
  email="test@anyscale.com",
93
95
  # Password for the user account being created.
94
96
  password="",
95
- # Whether the user is an SSO user.
97
+ # Whether the user is an SSO user. SSO users can log in using SSO.
96
98
  is_sso_user=False,
97
99
  # Optional last name of the user to be created.
98
100
  lastname="lastname",
@@ -115,7 +117,7 @@ admin_create_users = AdminCreateUsers(
115
117
 
116
118
  @dataclass(frozen=True)
117
119
  class AdminCreatedUser(ModelBase):
118
- """User account created by an admin.
120
+ """User account created by an admin that has organization collaborator permissions.
119
121
  """
120
122
 
121
123
  __doc_py_example__ = """\
@@ -123,13 +125,13 @@ import anyscale
123
125
  from anyscale.user.models import AdminCreatedUser
124
126
 
125
127
  admin_create_user = AdminCreateUser(
126
- # Name of the user to be created.
128
+ # First name of the user to be created.
127
129
  name="name",
128
130
  # Email of the user to be created.
129
131
  email="test@anyscale.com",
130
132
  # Password for the user account being created.
131
133
  password="",
132
- # Whether the user is an SSO user.
134
+ # Whether the user is an SSO user. SSO users can log in using SSO.
133
135
  is_sso_user=False,
134
136
  # Optional last name of the user to be created.
135
137
  lastname="lastname",
@@ -138,19 +140,25 @@ admin_create_user = AdminCreateUser(
138
140
  )
139
141
  admin_created_users: List[AdminCreatedUser] = anyscale.user.admin_batch_create([admin_create_user])
140
142
  """
141
- user_id: str = field(metadata={"docstring": "Name of the user to be created."})
143
+ user_id: str = field(
144
+ metadata={"docstring": "ID of the user that has been created."}
145
+ )
142
146
 
143
147
  def _validate_user_id(self, user_id: str):
144
148
  if not isinstance(user_id, str):
145
149
  raise TypeError("user_id must be a string.")
146
150
 
147
- name: str = field(metadata={"docstring": "Name of the user to be created."})
151
+ name: str = field(
152
+ metadata={"docstring": "First name of the user that has been created."}
153
+ )
148
154
 
149
155
  def _validate_name(self, name: str):
150
156
  if not isinstance(name, str):
151
157
  raise TypeError("name must be a string.")
152
158
 
153
- email: str = field(metadata={"docstring": "Email of the user to be created."})
159
+ email: str = field(
160
+ metadata={"docstring": "Email of the user that has been created."}
161
+ )
154
162
 
155
163
  def _validate_email(self, email: str):
156
164
  if not isinstance(email, str):
@@ -165,7 +173,9 @@ admin_created_users: List[AdminCreatedUser] = anyscale.user.admin_batch_create([
165
173
  raise TypeError("created_at must be a datetime.")
166
174
 
167
175
  is_sso_user: bool = field(
168
- metadata={"docstring": "Whether the user is an SSO user."},
176
+ metadata={
177
+ "docstring": "Whether the user is an SSO user. SSO users can log in using SSO."
178
+ },
169
179
  )
170
180
 
171
181
  def _validate_is_sso_user(self, is_sso_user: bool):
@@ -174,7 +184,7 @@ admin_created_users: List[AdminCreatedUser] = anyscale.user.admin_batch_create([
174
184
 
175
185
  lastname: Optional[str] = field(
176
186
  default=None,
177
- metadata={"docstring": "Optional last name of the user to be created."},
187
+ metadata={"docstring": "Optional last name of the user that has been created."},
178
188
  )
179
189
 
180
190
  def _validate_lastname(self, lastname: Optional[str]):
@@ -183,7 +193,7 @@ admin_created_users: List[AdminCreatedUser] = anyscale.user.admin_batch_create([
183
193
 
184
194
  title: Optional[str] = field(
185
195
  default=None,
186
- metadata={"docstring": "Optional title of the user to be created."},
196
+ metadata={"docstring": "Optional title of the user that has been created."},
187
197
  )
188
198
 
189
199
  def _validate_title(self, title: Optional[str]):
anyscale/util.py CHANGED
@@ -44,6 +44,7 @@ from anyscale.client.openapi_client.models.cloud_analytics_event_cloud_resource
44
44
  from anyscale.client.openapi_client.models.decorated_compute_template import (
45
45
  DecoratedComputeTemplate,
46
46
  )
47
+ from anyscale.client.openapi_client.models.ha_job_states import HaJobStates
47
48
  from anyscale.client.openapi_client.models.user_info import UserInfo
48
49
  from anyscale.cluster_compute import get_cluster_compute_from_name
49
50
  import anyscale.conf
@@ -986,6 +987,20 @@ def validate_job_config_dict(
986
987
  )
987
988
 
988
989
 
990
+ def validate_list_jobs_state_filter(ctx, param, value) -> List[str]: # noqa: ARG001
991
+ """
992
+ Validate the job state filter for list jobs CLI method
993
+ """
994
+ if not value:
995
+ return []
996
+ for each_value in value:
997
+ if each_value.upper() not in HaJobStates.allowable_values:
998
+ raise click.ClickException(
999
+ f"{each_value} is not a valid value for {param.opts[0]}. Allowed values: {', '.join(HaJobStates.allowable_values)}"
1000
+ )
1001
+ return [each_value.upper() for each_value in value]
1002
+
1003
+
989
1004
  def get_cluster_model_for_current_workspace(
990
1005
  anyscale_api_client: BaseApi,
991
1006
  ) -> Optional[Cluster]:
@@ -20,7 +20,7 @@ from anyscale.client.openapi_client.models import (
20
20
  CloudProviders,
21
21
  CreateAnalyticsEvent,
22
22
  )
23
- from anyscale.cloud import get_cloud_id_and_name
23
+ from anyscale.cloud_utils import get_cloud_id_and_name
24
24
  from anyscale.shared_anyscale_utils.utils.collections import flatten
25
25
 
26
26
 
anyscale/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.24.88"
1
+ __version__ = "0.24.91"
@@ -3,7 +3,7 @@ import os
3
3
  from click import ClickException
4
4
  import yaml
5
5
 
6
- from anyscale.project import ANYSCALE_PROJECT_FILE, find_project_root
6
+ from anyscale.project_utils import ANYSCALE_PROJECT_FILE, find_project_root
7
7
 
8
8
 
9
9
  def write_workspace_id_to_disk(workspace_id: str, directory: str) -> None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: anyscale
3
- Version: 0.24.88
3
+ Version: 0.24.91
4
4
  Summary: Command Line Interface for Anyscale
5
5
  Author: Anyscale Inc.
6
6
  License: AS License
@@ -47,7 +47,6 @@ Requires-Dist: google-cloud-filestore; extra == "backend"
47
47
  Requires-Dist: google-cloud-storage; extra == "backend"
48
48
  Requires-Dist: google-cloud-redis; extra == "backend"
49
49
  Requires-Dist: google-cloud-certificate-manager; extra == "backend"
50
- Requires-Dist: azure-storage-blob; extra == "backend"
51
50
  Provides-Extra: gcp
52
51
  Requires-Dist: protobuf<4; python_version < "3.11" and extra == "gcp"
53
52
  Requires-Dist: google-api-python-client; extra == "gcp"
@@ -58,8 +57,6 @@ Requires-Dist: google-cloud-filestore; extra == "gcp"
58
57
  Requires-Dist: google-cloud-storage; extra == "gcp"
59
58
  Requires-Dist: google-cloud-redis; extra == "gcp"
60
59
  Requires-Dist: google-cloud-certificate-manager; extra == "gcp"
61
- Provides-Extra: azure
62
- Requires-Dist: azure-storage-blob; extra == "azure"
63
60
  Provides-Extra: all
64
61
  Requires-Dist: ray>=1.4.0; extra == "all"
65
62
  Requires-Dist: protobuf<4; python_version < "3.11" and extra == "all"
@@ -71,7 +68,6 @@ Requires-Dist: google-cloud-filestore; extra == "all"
71
68
  Requires-Dist: google-cloud-storage; extra == "all"
72
69
  Requires-Dist: google-cloud-redis; extra == "all"
73
70
  Requires-Dist: google-cloud-certificate-manager; extra == "all"
74
- Requires-Dist: azure-storage-blob; extra == "all"
75
71
 
76
72
  # Anyscale
77
73