anyscale 0.26.52__py3-none-any.whl → 0.26.53__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 (62) hide show
  1. anyscale/_private/anyscale_client/anyscale_client.py +26 -26
  2. anyscale/_private/anyscale_client/common.py +5 -5
  3. anyscale/_private/anyscale_client/fake_anyscale_client.py +6 -6
  4. anyscale/_private/docgen/__main__.py +8 -8
  5. anyscale/_private/docgen/generator.py +48 -10
  6. anyscale/_private/docgen/models.md +2 -2
  7. anyscale/_private/sdk/__init__.py +124 -1
  8. anyscale/_private/workload/workload_config.py +4 -6
  9. anyscale/_private/workload/workload_sdk.py +9 -11
  10. anyscale/client/README.md +12 -13
  11. anyscale/client/openapi_client/__init__.py +3 -4
  12. anyscale/client/openapi_client/api/default_api.py +272 -325
  13. anyscale/client/openapi_client/models/__init__.py +3 -4
  14. anyscale/client/openapi_client/models/aws_config.py +2 -2
  15. anyscale/client/openapi_client/models/baseimagesenum.py +76 -1
  16. anyscale/client/openapi_client/models/cloud_data_bucket_presigned_url_request.py +31 -3
  17. anyscale/client/openapi_client/models/cloud_deployment.py +37 -36
  18. anyscale/client/openapi_client/models/create_resource_notification.py +31 -3
  19. anyscale/client/openapi_client/models/{decorated_cloud_deployment.py → decorated_cloud_resource.py} +124 -96
  20. anyscale/client/openapi_client/models/{clouddeployment_list_response.py → decoratedcloudresource_list_response.py} +15 -15
  21. anyscale/client/openapi_client/models/{clouddeployment_response.py → decoratedcloudresource_response.py} +11 -11
  22. anyscale/client/openapi_client/models/file_storage.py +4 -4
  23. anyscale/client/openapi_client/models/gcp_config.py +2 -2
  24. anyscale/client/openapi_client/models/ha_job_error_types.py +9 -2
  25. anyscale/client/openapi_client/models/object_storage.py +2 -2
  26. anyscale/client/openapi_client/models/resource_alert_event_type.py +2 -1
  27. anyscale/client/openapi_client/models/resource_notification.py +29 -1
  28. anyscale/client/openapi_client/models/supportedbaseimagesenum.py +76 -1
  29. anyscale/client/openapi_client/models/workload_info.py +31 -3
  30. anyscale/client/openapi_client/models/workload_state_info.py +29 -1
  31. anyscale/cloud/models.py +39 -42
  32. anyscale/commands/cloud_commands.py +25 -23
  33. anyscale/commands/command_examples.py +10 -10
  34. anyscale/commands/exec_commands.py +12 -1
  35. anyscale/commands/list_commands.py +42 -12
  36. anyscale/commands/project_commands.py +23 -10
  37. anyscale/commands/schedule_commands.py +22 -11
  38. anyscale/commands/service_commands.py +11 -6
  39. anyscale/commands/util.py +94 -1
  40. anyscale/commands/workspace_commands.py +92 -38
  41. anyscale/compute_config/__init__.py +1 -1
  42. anyscale/compute_config/_private/compute_config_sdk.py +8 -11
  43. anyscale/compute_config/commands.py +3 -3
  44. anyscale/compute_config/models.py +30 -30
  45. anyscale/controllers/cloud_controller.py +306 -300
  46. anyscale/controllers/kubernetes_verifier.py +1 -1
  47. anyscale/job/_private/job_sdk.py +12 -12
  48. anyscale/job/models.py +1 -1
  49. anyscale/sdk/anyscale_client/models/baseimagesenum.py +76 -1
  50. anyscale/sdk/anyscale_client/models/supportedbaseimagesenum.py +76 -1
  51. anyscale/shared_anyscale_utils/latest_ray_version.py +1 -1
  52. anyscale/version.py +1 -1
  53. anyscale/workspace/commands.py +114 -23
  54. anyscale/workspace/models.py +3 -5
  55. {anyscale-0.26.52.dist-info → anyscale-0.26.53.dist-info}/METADATA +1 -1
  56. {anyscale-0.26.52.dist-info → anyscale-0.26.53.dist-info}/RECORD +61 -62
  57. anyscale/client/openapi_client/models/decoratedclouddeployment_response.py +0 -121
  58. {anyscale-0.26.52.dist-info → anyscale-0.26.53.dist-info}/WHEEL +0 -0
  59. {anyscale-0.26.52.dist-info → anyscale-0.26.53.dist-info}/entry_points.txt +0 -0
  60. {anyscale-0.26.52.dist-info → anyscale-0.26.53.dist-info}/licenses/LICENSE +0 -0
  61. {anyscale-0.26.52.dist-info → anyscale-0.26.53.dist-info}/licenses/NOTICE +0 -0
  62. {anyscale-0.26.52.dist-info → anyscale-0.26.53.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  from typing import Any, Dict, List, Optional, Tuple
2
2
 
3
- from anyscale._private.sdk import sdk_command
3
+ from anyscale._private.sdk import deprecated_sdk_command
4
4
  from anyscale.workspace._private.workspace_sdk import PrivateWorkspaceSDK
5
5
  from anyscale.workspace.models import (
6
6
  UpdateWorkspaceConfig,
@@ -28,18 +28,26 @@ _CREATE_ARG_DOCSTRINGS = {"config": "The config for defining the workspace."}
28
28
  _WAIT_TIMEOUT_SECONDS = 1800.0
29
29
 
30
30
 
31
- @sdk_command(
31
+ @deprecated_sdk_command(
32
32
  _WORKSPACE_SDK_SINGLETON_KEY,
33
33
  PrivateWorkspaceSDK,
34
34
  doc_py_example=_CREATE_EXAMPLE,
35
35
  arg_docstrings=_CREATE_ARG_DOCSTRINGS,
36
+ removal_date="2025-10-01",
37
+ deprecation_message="Legacy v1 workspaces are no longer supported",
38
+ alternative="use anyscale.workspace_v2.create() instead",
36
39
  )
37
40
  def create(
38
41
  config: WorkspaceConfig, *, _private_sdk: Optional[PrivateWorkspaceSDK] = None
39
42
  ) -> str:
40
43
  """Create a workspace.
41
44
 
42
- Returns the id of the created workspace.
45
+ DEPRECATED: This function will be removed on 2025-10-01.
46
+ Use anyscale.workspace_v2.create instead.
47
+ Legacy v1 workspaces are no longer supported.
48
+
49
+ Returns:
50
+ str: The id of the created workspace.
43
51
  """
44
52
  return _private_sdk.create(config) # type: ignore
45
53
 
@@ -60,11 +68,14 @@ _START_ARG_DOCSTRINGS = {
60
68
  }
61
69
 
62
70
 
63
- @sdk_command(
71
+ @deprecated_sdk_command(
64
72
  _WORKSPACE_SDK_SINGLETON_KEY,
65
73
  PrivateWorkspaceSDK,
66
74
  doc_py_example=_START_EXAMPLE,
67
75
  arg_docstrings=_START_ARG_DOCSTRINGS,
76
+ removal_date="2025-10-01",
77
+ deprecation_message="Legacy v1 workspaces are no longer supported",
78
+ alternative="use anyscale.workspace_v2.start() instead",
68
79
  )
69
80
  def start(
70
81
  *,
@@ -76,7 +87,12 @@ def start(
76
87
  ) -> str:
77
88
  """Start a workspace.
78
89
 
79
- Returns the id of the started workspace.
90
+ DEPRECATED: This function will be removed on 2025-10-01.
91
+ Use anyscale.workspace_v2.start instead.
92
+ Legacy v1 workspaces are no longer supported.
93
+
94
+ Returns:
95
+ str: The id of the started workspace.
80
96
  """
81
97
  return _private_sdk.start(name=name, id=id, cloud=cloud, project=project) # type: ignore
82
98
 
@@ -97,11 +113,14 @@ _TERMINATE_ARG_DOCSTRINGS = {
97
113
  }
98
114
 
99
115
 
100
- @sdk_command(
116
+ @deprecated_sdk_command(
101
117
  _WORKSPACE_SDK_SINGLETON_KEY,
102
118
  PrivateWorkspaceSDK,
103
119
  doc_py_example=_TERMINATE_EXAMPLE,
104
120
  arg_docstrings=_TERMINATE_ARG_DOCSTRINGS,
121
+ removal_date="2025-10-01",
122
+ deprecation_message="Legacy v1 workspaces are no longer supported",
123
+ alternative="use anyscale.workspace_v2.terminate() instead",
105
124
  )
106
125
  def terminate(
107
126
  *,
@@ -113,7 +132,12 @@ def terminate(
113
132
  ) -> str:
114
133
  """Terminate a workspace.
115
134
 
116
- Returns the id of the terminated workspace.
135
+ DEPRECATED: This function will be removed on 2025-10-01.
136
+ Use anyscale.workspace_v2.terminate instead.
137
+ Legacy v1 workspaces are no longer supported.
138
+
139
+ Returns:
140
+ str: The id of the terminated workspace.
117
141
  """
118
142
  return _private_sdk.terminate(name=name, id=id, cloud=cloud, project=project) # type: ignore
119
143
 
@@ -134,11 +158,14 @@ _STATUS_ARG_DOCSTRINGS = {
134
158
  }
135
159
 
136
160
 
137
- @sdk_command(
161
+ @deprecated_sdk_command(
138
162
  _WORKSPACE_SDK_SINGLETON_KEY,
139
163
  PrivateWorkspaceSDK,
140
164
  doc_py_example=_STATUS_EXAMPLE,
141
165
  arg_docstrings=_STATUS_ARG_DOCSTRINGS,
166
+ removal_date="2025-10-01",
167
+ deprecation_message="Legacy v1 workspaces are no longer supported",
168
+ alternative="use anyscale.workspace_v2.status() instead",
142
169
  )
143
170
  def status(
144
171
  *,
@@ -150,7 +177,12 @@ def status(
150
177
  ) -> str:
151
178
  """Get the status of a workspace.
152
179
 
153
- Returns the status of the workspace.
180
+ DEPRECATED: This function will be removed on 2025-10-01.
181
+ Use anyscale.workspace_v2.status instead.
182
+ Legacy v1 workspaces are no longer supported.
183
+
184
+ Returns:
185
+ WorkspaceState: The status of the workspace.
154
186
  """
155
187
  return _private_sdk.status(name=name, id=id, cloud=cloud, project=project) # type: ignore
156
188
 
@@ -173,11 +205,14 @@ _WAIT_ARG_DOCSTRINGS = {
173
205
  }
174
206
 
175
207
 
176
- @sdk_command(
208
+ @deprecated_sdk_command(
177
209
  _WORKSPACE_SDK_SINGLETON_KEY,
178
210
  PrivateWorkspaceSDK,
179
211
  doc_py_example=_WAIT_EXAMPLE,
180
212
  arg_docstrings=_WAIT_ARG_DOCSTRINGS,
213
+ removal_date="2025-10-01",
214
+ deprecation_message="Legacy v1 workspaces are no longer supported",
215
+ alternative="use anyscale.workspace_v2.wait() instead",
181
216
  )
182
217
  def wait(
183
218
  *,
@@ -191,7 +226,12 @@ def wait(
191
226
  ) -> str:
192
227
  """Wait for a workspace to reach a terminal state.
193
228
 
194
- Returns the status of the workspace.
229
+ DEPRECATED: This function will be removed on 2025-10-01.
230
+ Use anyscale.workspace_v2.wait instead.
231
+ Legacy v1 workspaces are no longer supported.
232
+
233
+ Returns:
234
+ WorkspaceState: The status of the workspace.
195
235
  """
196
236
  return _private_sdk.wait( # type: ignore
197
237
  name=name,
@@ -224,11 +264,14 @@ _GENERATE_SSH_CONFIG_FILE_ARG_DOCSTRINGS = {
224
264
  }
225
265
 
226
266
 
227
- @sdk_command(
267
+ @deprecated_sdk_command(
228
268
  _WORKSPACE_SDK_SINGLETON_KEY,
229
269
  PrivateWorkspaceSDK,
230
270
  doc_py_example=_GENERATE_SSH_CONFIG_FILE_EXAMPLE,
231
271
  arg_docstrings=_GENERATE_SSH_CONFIG_FILE_ARG_DOCSTRINGS,
272
+ removal_date="2025-10-01",
273
+ deprecation_message="Legacy v1 workspaces are no longer supported",
274
+ alternative="use anyscale.workspace_v2.generate_ssh_config_file() instead",
232
275
  )
233
276
  def generate_ssh_config_file(
234
277
  *,
@@ -241,7 +284,12 @@ def generate_ssh_config_file(
241
284
  ) -> Tuple[str, str]:
242
285
  """Generate an SSH config file for a workspace.
243
286
 
244
- Returns the hostname and path to the generated config file.
287
+ DEPRECATED: This function will be removed on 2025-10-01.
288
+ Use anyscale.workspace_v2.generate_ssh_config_file instead.
289
+ Legacy v1 workspaces are no longer supported.
290
+
291
+ Returns:
292
+ Tuple[str, str]: The hostname and path to the generated config file.
245
293
  """
246
294
  return _private_sdk.generate_ssh_config_file( # type: ignore
247
295
  name=name, id=id, cloud=cloud, project=project, ssh_config_path=ssh_config_path,
@@ -270,11 +318,14 @@ _RUN_COMMAND_ARG_DOCSTRINGS = {
270
318
  }
271
319
 
272
320
 
273
- @sdk_command(
321
+ @deprecated_sdk_command(
274
322
  _WORKSPACE_SDK_SINGLETON_KEY,
275
323
  PrivateWorkspaceSDK,
276
324
  doc_py_example=_RUN_COMMAND_EXAMPLE,
277
325
  arg_docstrings=_RUN_COMMAND_ARG_DOCSTRINGS,
326
+ removal_date="2025-10-01",
327
+ deprecation_message="Legacy v1 workspaces are no longer supported",
328
+ alternative="use anyscale.workspace_v2.run_command() instead",
278
329
  )
279
330
  def run_command(
280
331
  *,
@@ -288,7 +339,12 @@ def run_command(
288
339
  ):
289
340
  """Run a command in a workspace.
290
341
 
291
- Returns a subprocess.CompletedProcess object.
342
+ DEPRECATED: This function will be removed on 2025-10-01.
343
+ Use anyscale.workspace_v2.run_command instead.
344
+ Legacy v1 workspaces are no longer supported.
345
+
346
+ Returns:
347
+ subprocess.CompletedProcess: The result of the command execution.
292
348
  """
293
349
  return _private_sdk.run_command( # type: ignore
294
350
  name=name, id=id, cloud=cloud, project=project, command=command, **kwargs,
@@ -314,11 +370,14 @@ _PULL_ARG_DOCSTRINGS = {
314
370
  }
315
371
 
316
372
 
317
- @sdk_command(
373
+ @deprecated_sdk_command(
318
374
  _WORKSPACE_SDK_SINGLETON_KEY,
319
375
  PrivateWorkspaceSDK,
320
376
  doc_py_example=_PULL_EXAMPLE,
321
377
  arg_docstrings=_PULL_ARG_DOCSTRINGS,
378
+ removal_date="2025-10-01",
379
+ deprecation_message="Legacy v1 workspaces are no longer supported",
380
+ alternative="use anyscale.workspace_v2.pull() instead",
322
381
  )
323
382
  def pull(
324
383
  *,
@@ -334,7 +393,12 @@ def pull(
334
393
  ) -> None:
335
394
  """Pull a workspace to a local directory.
336
395
 
337
- Returns the path to the pulled workspace.
396
+ DEPRECATED: This function will be removed on 2025-10-01.
397
+ Use anyscale.workspace_v2.pull instead.
398
+ Legacy v1 workspaces are no longer supported.
399
+
400
+ Returns:
401
+ str: The path to the pulled workspace.
338
402
  """
339
403
  _private_sdk.pull( # type: ignore
340
404
  name=name,
@@ -369,11 +433,14 @@ _PUSH_ARG_DOCSTRINGS = {
369
433
  }
370
434
 
371
435
 
372
- @sdk_command(
436
+ @deprecated_sdk_command(
373
437
  _WORKSPACE_SDK_SINGLETON_KEY,
374
438
  PrivateWorkspaceSDK,
375
439
  doc_py_example=_PUSH_EXAMPLE,
376
440
  arg_docstrings=_PUSH_ARG_DOCSTRINGS,
441
+ removal_date="2025-10-01",
442
+ deprecation_message="Legacy v1 workspaces are no longer supported",
443
+ alternative="use anyscale.workspace_v2.push() instead",
377
444
  )
378
445
  def push(
379
446
  *,
@@ -389,7 +456,12 @@ def push(
389
456
  ) -> None:
390
457
  """Push a local directory to a workspace.
391
458
 
392
- Returns the path to the pushed workspace.
459
+ DEPRECATED: This function will be removed on 2025-10-01.
460
+ Use anyscale.workspace_v2.push instead.
461
+ Legacy v1 workspaces are no longer supported.
462
+
463
+ Returns:
464
+ str: The path to the pushed workspace.
393
465
  """
394
466
  _private_sdk.push( # type: ignore
395
467
  name=name,
@@ -421,11 +493,14 @@ _UPDATE_ARG_DOCSTRINGS = {
421
493
  }
422
494
 
423
495
 
424
- @sdk_command(
496
+ @deprecated_sdk_command(
425
497
  _WORKSPACE_SDK_SINGLETON_KEY,
426
498
  PrivateWorkspaceSDK,
427
499
  doc_py_example=_UPDATE_EXAMPLE,
428
500
  arg_docstrings=_UPDATE_ARG_DOCSTRINGS,
501
+ removal_date="2025-10-01",
502
+ deprecation_message="Legacy v1 workspaces are no longer supported",
503
+ alternative="use anyscale.workspace_v2.update() instead",
429
504
  )
430
505
  def update(
431
506
  *,
@@ -433,7 +508,12 @@ def update(
433
508
  config: UpdateWorkspaceConfig,
434
509
  _private_sdk: Optional[PrivateWorkspaceSDK] = None,
435
510
  ) -> None:
436
- """Update a workspace."""
511
+ """Update a workspace.
512
+
513
+ DEPRECATED: This function will be removed on 2025-10-01.
514
+ Use anyscale.workspace_v2.update instead.
515
+ Legacy v1 workspaces are no longer supported.
516
+ """
437
517
  _private_sdk.update( # type: ignore
438
518
  id=id, config=config,
439
519
  )
@@ -456,11 +536,14 @@ _GET_ARG_DOCSTRINGS = {
456
536
  }
457
537
 
458
538
 
459
- @sdk_command(
539
+ @deprecated_sdk_command(
460
540
  _WORKSPACE_SDK_SINGLETON_KEY,
461
541
  PrivateWorkspaceSDK,
462
542
  doc_py_example=_GET_EXAMPLE,
463
543
  arg_docstrings=_GET_ARG_DOCSTRINGS,
544
+ removal_date="2025-10-01",
545
+ deprecation_message="Legacy v1 workspaces are no longer supported",
546
+ alternative="use anyscale.workspace_v2.get() instead",
464
547
  )
465
548
  def get(
466
549
  *,
@@ -470,5 +553,13 @@ def get(
470
553
  project: Optional[str] = None,
471
554
  _private_sdk: Optional[PrivateWorkspaceSDK] = None,
472
555
  ) -> Workspace:
473
- """Get a workspace."""
556
+ """Get a workspace.
557
+
558
+ DEPRECATED: This function will be removed on 2025-10-01.
559
+ Use anyscale.workspace_v2.get instead.
560
+ Legacy v1 workspaces are no longer supported.
561
+
562
+ Returns:
563
+ Workspace: The workspace object.
564
+ """
474
565
  return _private_sdk.get(name=name, id=id, cloud=cloud, project=project) # type: ignore
@@ -7,7 +7,7 @@ from anyscale.compute_config.models import (
7
7
  compute_config_type_from_dict,
8
8
  ComputeConfig,
9
9
  ComputeConfigType,
10
- MultiDeploymentComputeConfig,
10
+ MultiResourceComputeConfig,
11
11
  )
12
12
 
13
13
 
@@ -103,11 +103,9 @@ requirements: /tmp/requirements.txt
103
103
 
104
104
  if isinstance(compute_config, dict):
105
105
  compute_config = compute_config_type_from_dict(compute_config)
106
- if not isinstance(
107
- compute_config, (ComputeConfig, MultiDeploymentComputeConfig)
108
- ):
106
+ if not isinstance(compute_config, (ComputeConfig, MultiResourceComputeConfig)):
109
107
  raise TypeError(
110
- "'compute_config' must be a string, ComputeConfig, MultiDeploymentComputeConfig, or corresponding dict"
108
+ "'compute_config' must be a string, ComputeConfig, MultiResourceComputeConfig, or corresponding dict"
111
109
  )
112
110
 
113
111
  return compute_config
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: anyscale
3
- Version: 0.26.52
3
+ Version: 0.26.53
4
4
  Summary: Command Line Interface for Anyscale
5
5
  Author: Anyscale Inc.
6
6
  License: AS License