anyscale 0.26.51__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 (75) hide show
  1. anyscale/_private/anyscale_client/README.md +1 -1
  2. anyscale/_private/anyscale_client/anyscale_client.py +178 -46
  3. anyscale/_private/anyscale_client/common.py +61 -2
  4. anyscale/_private/anyscale_client/fake_anyscale_client.py +145 -8
  5. anyscale/_private/docgen/__main__.py +42 -31
  6. anyscale/_private/docgen/generator.py +63 -28
  7. anyscale/_private/docgen/models.md +4 -2
  8. anyscale/_private/sdk/__init__.py +124 -1
  9. anyscale/_private/workload/workload_config.py +4 -6
  10. anyscale/_private/workload/workload_sdk.py +105 -12
  11. anyscale/client/README.md +13 -11
  12. anyscale/client/openapi_client/__init__.py +3 -3
  13. anyscale/client/openapi_client/api/default_api.py +512 -316
  14. anyscale/client/openapi_client/models/__init__.py +3 -3
  15. anyscale/client/openapi_client/models/aws_config.py +2 -2
  16. anyscale/client/openapi_client/models/baseimagesenum.py +158 -1
  17. anyscale/client/openapi_client/models/cloud_data_bucket_presigned_url_request.py +31 -3
  18. anyscale/client/openapi_client/models/cloud_deployment.py +37 -36
  19. anyscale/client/openapi_client/models/cloud_resource.py +59 -3
  20. anyscale/client/openapi_client/models/cloud_resource_gcp.py +59 -3
  21. anyscale/client/openapi_client/models/create_cloud_resource.py +59 -3
  22. anyscale/client/openapi_client/models/create_cloud_resource_gcp.py +59 -3
  23. anyscale/client/openapi_client/models/create_resource_notification.py +31 -3
  24. anyscale/client/openapi_client/models/{decorated_cloud_deployment.py → decorated_cloud_resource.py} +124 -96
  25. anyscale/client/openapi_client/models/{clouddeployment_list_response.py → decoratedcloudresource_list_response.py} +15 -15
  26. anyscale/client/openapi_client/models/{decoratedclouddeployment_response.py → decoratedcloudresource_response.py} +11 -11
  27. anyscale/client/openapi_client/models/file_storage.py +4 -4
  28. anyscale/client/openapi_client/models/gcp_config.py +2 -2
  29. anyscale/client/openapi_client/models/ha_job_error_types.py +9 -2
  30. anyscale/client/openapi_client/models/object_storage.py +4 -4
  31. anyscale/client/openapi_client/models/ray_runtime_env_config.py +57 -1
  32. anyscale/client/openapi_client/models/resource_alert_event_type.py +2 -1
  33. anyscale/client/openapi_client/models/resource_notification.py +29 -1
  34. anyscale/client/openapi_client/models/supportedbaseimagesenum.py +155 -1
  35. anyscale/client/openapi_client/models/workload_info.py +31 -3
  36. anyscale/client/openapi_client/models/workload_state_info.py +29 -1
  37. anyscale/cloud/models.py +40 -43
  38. anyscale/commands/cloud_commands.py +93 -88
  39. anyscale/commands/command_examples.py +37 -49
  40. anyscale/commands/exec_commands.py +12 -1
  41. anyscale/commands/list_commands.py +42 -12
  42. anyscale/commands/project_commands.py +399 -115
  43. anyscale/commands/schedule_commands.py +22 -11
  44. anyscale/commands/service_commands.py +11 -6
  45. anyscale/commands/util.py +94 -1
  46. anyscale/commands/workspace_commands.py +92 -38
  47. anyscale/compute_config/__init__.py +1 -1
  48. anyscale/compute_config/_private/compute_config_sdk.py +8 -11
  49. anyscale/compute_config/commands.py +3 -3
  50. anyscale/compute_config/models.py +30 -30
  51. anyscale/controllers/cloud_controller.py +361 -360
  52. anyscale/controllers/kubernetes_verifier.py +1 -1
  53. anyscale/job/_private/job_sdk.py +41 -23
  54. anyscale/job/models.py +1 -1
  55. anyscale/project/__init__.py +101 -1
  56. anyscale/project/_private/project_sdk.py +90 -2
  57. anyscale/project/commands.py +188 -1
  58. anyscale/project/models.py +198 -2
  59. anyscale/sdk/anyscale_client/models/baseimagesenum.py +158 -1
  60. anyscale/sdk/anyscale_client/models/ray_runtime_env_config.py +57 -1
  61. anyscale/sdk/anyscale_client/models/supportedbaseimagesenum.py +155 -1
  62. anyscale/service/_private/service_sdk.py +2 -1
  63. anyscale/shared_anyscale_utils/latest_ray_version.py +1 -1
  64. anyscale/util.py +3 -0
  65. anyscale/utils/runtime_env.py +3 -1
  66. anyscale/version.py +1 -1
  67. anyscale/workspace/commands.py +114 -23
  68. anyscale/workspace/models.py +3 -5
  69. {anyscale-0.26.51.dist-info → anyscale-0.26.53.dist-info}/METADATA +1 -1
  70. {anyscale-0.26.51.dist-info → anyscale-0.26.53.dist-info}/RECORD +75 -75
  71. {anyscale-0.26.51.dist-info → anyscale-0.26.53.dist-info}/WHEEL +0 -0
  72. {anyscale-0.26.51.dist-info → anyscale-0.26.53.dist-info}/entry_points.txt +0 -0
  73. {anyscale-0.26.51.dist-info → anyscale-0.26.53.dist-info}/licenses/LICENSE +0 -0
  74. {anyscale-0.26.51.dist-info → anyscale-0.26.53.dist-info}/licenses/NOTICE +0 -0
  75. {anyscale-0.26.51.dist-info → anyscale-0.26.53.dist-info}/top_level.txt +0 -0
@@ -315,7 +315,7 @@ worker_nodes:
315
315
 
316
316
  @dataclass(frozen=True)
317
317
  class ComputeConfig(ModelBase):
318
- """Compute configuration for instance types and cloud resources for a cluster with a single cloud deployment."""
318
+ """Compute configuration for instance types and cloud resources for a cluster with a single cloud resource."""
319
319
 
320
320
  __doc_py_example__ = """
321
321
  from anyscale.compute_config.models import (
@@ -417,18 +417,18 @@ advanced_instance_config: # (Optional) Defaults to no advanced configurations.
417
417
  if cloud is not None and not isinstance(cloud, str):
418
418
  raise TypeError("'cloud' must be a string")
419
419
 
420
- cloud_deployment: Optional[str] = field(
420
+ cloud_resource: Optional[str] = field(
421
421
  default=None,
422
422
  repr=False,
423
423
  metadata={
424
- "docstring": "The cloud deployment to use for this workload. Defaults to the primary deployment of the Cloud.",
424
+ "docstring": "The cloud resource to use for this workload. Defaults to the primary cloud resource of the Cloud.",
425
425
  "customer_hosted_only": True,
426
426
  },
427
427
  )
428
428
 
429
- def _validate_cloud_deployment(self, cloud_deployment: Optional[str]):
430
- if cloud_deployment is not None and not isinstance(cloud_deployment, str):
431
- raise TypeError("'cloud_deployment' must be a string")
429
+ def _validate_cloud_resource(self, cloud_resource: Optional[str]):
430
+ if cloud_resource is not None and not isinstance(cloud_resource, str):
431
+ raise TypeError("'cloud_resource' must be a string")
432
432
 
433
433
  head_node: Union[HeadNodeConfig, Dict, None] = field(
434
434
  default=None,
@@ -600,18 +600,18 @@ advanced_instance_config: # (Optional) Defaults to no advanced configurations.
600
600
 
601
601
 
602
602
  @dataclass(frozen=True)
603
- class MultiDeploymentComputeConfig(ModelBase):
604
- """EXPERIMENTAL. Compute configuration for a cluster with multiple possible cloud deployments."""
603
+ class MultiResourceComputeConfig(ModelBase):
604
+ """EXPERIMENTAL. Compute configuration for a cluster with multiple possible cloud resources."""
605
605
 
606
606
  __doc_py_example__ = """
607
607
  from anyscale.compute_config.models import (
608
- MultiDeploymentComputeConfig, ComputeConfig, HeadNodeConfig, WorkerNodeGroupConfig
608
+ MultiResourceComputeConfig, ComputeConfig, HeadNodeConfig, WorkerNodeGroupConfig
609
609
  )
610
- config = MultiDeploymentComputeConfig(
610
+ config = MultiResourceComputeConfig(
611
611
  cloud="my-cloud",
612
612
  configs=[
613
613
  ComputeConfig(
614
- cloud_deployment="vm-aws-us-west-1",
614
+ cloud_resource="vm-aws-us-west-1",
615
615
  head_node=HeadNodeConfig(
616
616
  instance_type="m5.2xlarge",
617
617
  ),
@@ -624,7 +624,7 @@ config = MultiDeploymentComputeConfig(
624
624
  ],
625
625
  ),
626
626
  ComputeConfig(
627
- cloud_deployment="vm-aws-us-west-2",
627
+ cloud_resource="vm-aws-us-west-2",
628
628
  head_node=HeadNodeConfig(
629
629
  instance_type="m5.2xlarge",
630
630
  ),
@@ -643,14 +643,14 @@ config = MultiDeploymentComputeConfig(
643
643
  __doc_yaml_example__ = """
644
644
  cloud: my-cloud
645
645
  configs:
646
- - cloud_deployment: vm-aws-us-west-1
646
+ - cloud_resource: vm-aws-us-west-1
647
647
  head_node:
648
648
  instance_type: m5.2xlarge
649
649
  worker_nodes:
650
650
  - instance_type: m5.4xlarge
651
651
  min_nodes: 1
652
652
  max_nodes: 10
653
- - cloud_deployment: vm-aws-us-west-2
653
+ - cloud_resource: vm-aws-us-west-2
654
654
  head_node:
655
655
  instance_type: m5.2xlarge
656
656
  worker_nodes:
@@ -673,7 +673,7 @@ configs:
673
673
  default_factory=list,
674
674
  repr=False,
675
675
  metadata={
676
- "docstring": "List of compute configurations, one for each cloud deployment.",
676
+ "docstring": "List of compute configurations, one for each cloud resource.",
677
677
  "customer_hosted_only": True,
678
678
  },
679
679
  )
@@ -690,7 +690,7 @@ configs:
690
690
 
691
691
  config_models: List[ComputeConfig] = []
692
692
  unique_clouds = set()
693
- unique_deployments = set()
693
+ unique_resources = set()
694
694
  for config in configs:
695
695
  if isinstance(config, dict):
696
696
  config = ComputeConfig.from_dict(config)
@@ -701,14 +701,14 @@ configs:
701
701
  if config.cloud:
702
702
  unique_clouds.add(config.cloud)
703
703
 
704
- unique_deployments.add(config.cloud_deployment)
704
+ unique_resources.add(config.cloud_resource)
705
705
 
706
706
  if len(unique_clouds) > 1:
707
707
  raise ValueError("'cloud' must be the same for all configs.")
708
708
 
709
- if len(unique_deployments) != len(configs):
709
+ if len(unique_resources) != len(configs):
710
710
  raise ValueError(
711
- "'cloud_deployment' must be unique for each compute configuration."
711
+ "'cloud_resource' must be unique for each compute configuration."
712
712
  )
713
713
 
714
714
  if len(configs) == 0:
@@ -719,14 +719,14 @@ configs:
719
719
  return config_models
720
720
 
721
721
 
722
- ComputeConfigType = Union[ComputeConfig, MultiDeploymentComputeConfig]
722
+ ComputeConfigType = Union[ComputeConfig, MultiResourceComputeConfig]
723
723
 
724
724
 
725
725
  def compute_config_type_from_yaml(config_file: str) -> ComputeConfigType:
726
726
  """
727
- Parse a YAML compute config file into either a ComputeConfig or MultiDeploymentComputeConfig.
727
+ Parse a YAML compute config file into either a ComputeConfig or MultiResourceComputeConfig.
728
728
  """
729
- error_message = f"Could not parse config file '{config_file}' as a ComputeConfig or MultiDeploymentComputeConfig:\n"
729
+ error_message = f"Could not parse config file '{config_file}' as a ComputeConfig or MultiResourceComputeConfig:\n"
730
730
 
731
731
  try:
732
732
  return ComputeConfig.from_yaml(config_file)
@@ -734,18 +734,18 @@ def compute_config_type_from_yaml(config_file: str) -> ComputeConfigType:
734
734
  error_message += f"ComputeConfig: {e}\n"
735
735
 
736
736
  try:
737
- return MultiDeploymentComputeConfig.from_yaml(config_file)
737
+ return MultiResourceComputeConfig.from_yaml(config_file)
738
738
  except Exception as e: # noqa: BLE001
739
- error_message += f"MultiDeploymentComputeConfig: {e}\n"
739
+ error_message += f"MultiResourceComputeConfig: {e}\n"
740
740
 
741
741
  raise TypeError(error_message.rstrip())
742
742
 
743
743
 
744
744
  def compute_config_type_from_dict(config_dict: Dict) -> ComputeConfigType:
745
745
  """
746
- Parse a compute config dict into either a ComputeConfig or MultiDeploymentComputeConfig.
746
+ Parse a compute config dict into either a ComputeConfig or MultiResourceComputeConfig.
747
747
  """
748
- error_message = f"Could not parse config dict '{config_dict}' as a ComputeConfig or MultiDeploymentComputeConfig:\n"
748
+ error_message = f"Could not parse config dict '{config_dict}' as a ComputeConfig or MultiResourceComputeConfig:\n"
749
749
 
750
750
  try:
751
751
  return ComputeConfig.from_dict(config_dict)
@@ -753,9 +753,9 @@ def compute_config_type_from_dict(config_dict: Dict) -> ComputeConfigType:
753
753
  error_message += f"ComputeConfig: {e}\n"
754
754
 
755
755
  try:
756
- return MultiDeploymentComputeConfig.from_dict(config_dict)
756
+ return MultiResourceComputeConfig.from_dict(config_dict)
757
757
  except Exception as e: # noqa: BLE001
758
- error_message += f"MultiDeploymentComputeConfig: {e}\n"
758
+ error_message += f"MultiResourceComputeConfig: {e}\n"
759
759
 
760
760
  raise TypeError(error_message.rstrip())
761
761
 
@@ -819,8 +819,8 @@ config:
819
819
 
820
820
  def _validate_config(self, config: Optional[ComputeConfigType]):
821
821
  if config is not None and not isinstance(
822
- config, (ComputeConfig, MultiDeploymentComputeConfig)
822
+ config, (ComputeConfig, MultiResourceComputeConfig)
823
823
  ):
824
824
  raise TypeError(
825
- "'config' must be a ComputeConfig or MultiDeploymentComputeConfig"
825
+ "'config' must be a ComputeConfig or MultiResourceComputeConfig"
826
826
  )