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.
- anyscale/_private/anyscale_client/README.md +1 -1
- anyscale/_private/anyscale_client/anyscale_client.py +178 -46
- anyscale/_private/anyscale_client/common.py +61 -2
- anyscale/_private/anyscale_client/fake_anyscale_client.py +145 -8
- anyscale/_private/docgen/__main__.py +42 -31
- anyscale/_private/docgen/generator.py +63 -28
- anyscale/_private/docgen/models.md +4 -2
- anyscale/_private/sdk/__init__.py +124 -1
- anyscale/_private/workload/workload_config.py +4 -6
- anyscale/_private/workload/workload_sdk.py +105 -12
- anyscale/client/README.md +13 -11
- anyscale/client/openapi_client/__init__.py +3 -3
- anyscale/client/openapi_client/api/default_api.py +512 -316
- anyscale/client/openapi_client/models/__init__.py +3 -3
- anyscale/client/openapi_client/models/aws_config.py +2 -2
- anyscale/client/openapi_client/models/baseimagesenum.py +158 -1
- anyscale/client/openapi_client/models/cloud_data_bucket_presigned_url_request.py +31 -3
- anyscale/client/openapi_client/models/cloud_deployment.py +37 -36
- anyscale/client/openapi_client/models/cloud_resource.py +59 -3
- anyscale/client/openapi_client/models/cloud_resource_gcp.py +59 -3
- anyscale/client/openapi_client/models/create_cloud_resource.py +59 -3
- anyscale/client/openapi_client/models/create_cloud_resource_gcp.py +59 -3
- anyscale/client/openapi_client/models/create_resource_notification.py +31 -3
- anyscale/client/openapi_client/models/{decorated_cloud_deployment.py → decorated_cloud_resource.py} +124 -96
- anyscale/client/openapi_client/models/{clouddeployment_list_response.py → decoratedcloudresource_list_response.py} +15 -15
- anyscale/client/openapi_client/models/{decoratedclouddeployment_response.py → decoratedcloudresource_response.py} +11 -11
- anyscale/client/openapi_client/models/file_storage.py +4 -4
- anyscale/client/openapi_client/models/gcp_config.py +2 -2
- anyscale/client/openapi_client/models/ha_job_error_types.py +9 -2
- anyscale/client/openapi_client/models/object_storage.py +4 -4
- anyscale/client/openapi_client/models/ray_runtime_env_config.py +57 -1
- anyscale/client/openapi_client/models/resource_alert_event_type.py +2 -1
- anyscale/client/openapi_client/models/resource_notification.py +29 -1
- anyscale/client/openapi_client/models/supportedbaseimagesenum.py +155 -1
- anyscale/client/openapi_client/models/workload_info.py +31 -3
- anyscale/client/openapi_client/models/workload_state_info.py +29 -1
- anyscale/cloud/models.py +40 -43
- anyscale/commands/cloud_commands.py +93 -88
- anyscale/commands/command_examples.py +37 -49
- anyscale/commands/exec_commands.py +12 -1
- anyscale/commands/list_commands.py +42 -12
- anyscale/commands/project_commands.py +399 -115
- anyscale/commands/schedule_commands.py +22 -11
- anyscale/commands/service_commands.py +11 -6
- anyscale/commands/util.py +94 -1
- anyscale/commands/workspace_commands.py +92 -38
- anyscale/compute_config/__init__.py +1 -1
- anyscale/compute_config/_private/compute_config_sdk.py +8 -11
- anyscale/compute_config/commands.py +3 -3
- anyscale/compute_config/models.py +30 -30
- anyscale/controllers/cloud_controller.py +361 -360
- anyscale/controllers/kubernetes_verifier.py +1 -1
- anyscale/job/_private/job_sdk.py +41 -23
- anyscale/job/models.py +1 -1
- anyscale/project/__init__.py +101 -1
- anyscale/project/_private/project_sdk.py +90 -2
- anyscale/project/commands.py +188 -1
- anyscale/project/models.py +198 -2
- anyscale/sdk/anyscale_client/models/baseimagesenum.py +158 -1
- anyscale/sdk/anyscale_client/models/ray_runtime_env_config.py +57 -1
- anyscale/sdk/anyscale_client/models/supportedbaseimagesenum.py +155 -1
- anyscale/service/_private/service_sdk.py +2 -1
- anyscale/shared_anyscale_utils/latest_ray_version.py +1 -1
- anyscale/util.py +3 -0
- anyscale/utils/runtime_env.py +3 -1
- anyscale/version.py +1 -1
- anyscale/workspace/commands.py +114 -23
- anyscale/workspace/models.py +3 -5
- {anyscale-0.26.51.dist-info → anyscale-0.26.53.dist-info}/METADATA +1 -1
- {anyscale-0.26.51.dist-info → anyscale-0.26.53.dist-info}/RECORD +75 -75
- {anyscale-0.26.51.dist-info → anyscale-0.26.53.dist-info}/WHEEL +0 -0
- {anyscale-0.26.51.dist-info → anyscale-0.26.53.dist-info}/entry_points.txt +0 -0
- {anyscale-0.26.51.dist-info → anyscale-0.26.53.dist-info}/licenses/LICENSE +0 -0
- {anyscale-0.26.51.dist-info → anyscale-0.26.53.dist-info}/licenses/NOTICE +0 -0
- {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
|
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
|
-
|
420
|
+
cloud_resource: Optional[str] = field(
|
421
421
|
default=None,
|
422
422
|
repr=False,
|
423
423
|
metadata={
|
424
|
-
"docstring": "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
|
430
|
-
if
|
431
|
-
raise TypeError("'
|
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
|
604
|
-
"""EXPERIMENTAL. Compute configuration for a cluster with multiple possible cloud
|
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
|
-
|
608
|
+
MultiResourceComputeConfig, ComputeConfig, HeadNodeConfig, WorkerNodeGroupConfig
|
609
609
|
)
|
610
|
-
config =
|
610
|
+
config = MultiResourceComputeConfig(
|
611
611
|
cloud="my-cloud",
|
612
612
|
configs=[
|
613
613
|
ComputeConfig(
|
614
|
-
|
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
|
-
|
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
|
-
-
|
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
|
-
-
|
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
|
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
|
-
|
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
|
-
|
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(
|
709
|
+
if len(unique_resources) != len(configs):
|
710
710
|
raise ValueError(
|
711
|
-
"'
|
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,
|
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
|
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
|
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
|
737
|
+
return MultiResourceComputeConfig.from_yaml(config_file)
|
738
738
|
except Exception as e: # noqa: BLE001
|
739
|
-
error_message += f"
|
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
|
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
|
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
|
756
|
+
return MultiResourceComputeConfig.from_dict(config_dict)
|
757
757
|
except Exception as e: # noqa: BLE001
|
758
|
-
error_message += f"
|
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,
|
822
|
+
config, (ComputeConfig, MultiResourceComputeConfig)
|
823
823
|
):
|
824
824
|
raise TypeError(
|
825
|
-
"'config' must be a ComputeConfig or
|
825
|
+
"'config' must be a ComputeConfig or MultiResourceComputeConfig"
|
826
826
|
)
|