anyscale 0.26.47__py3-none-any.whl → 0.26.48__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/__init__.py +0 -7
- anyscale/_private/anyscale_client/anyscale_client.py +1 -208
- anyscale/_private/anyscale_client/common.py +0 -55
- anyscale/_private/anyscale_client/fake_anyscale_client.py +19 -46
- anyscale/_private/docgen/__main__.py +24 -45
- anyscale/_private/docgen/generator.py +32 -16
- anyscale/_private/docgen/generator_legacy.py +58 -6
- anyscale/_private/docgen/models.md +3 -2
- anyscale/_private/workload/workload_config.py +16 -8
- anyscale/_private/workload/workload_sdk.py +22 -5
- anyscale/client/README.md +4 -1
- anyscale/client/openapi_client/__init__.py +2 -1
- anyscale/client/openapi_client/api/default_api.py +253 -4
- anyscale/client/openapi_client/models/__init__.py +2 -1
- anyscale/client/openapi_client/models/{alert_type.py → alert_issue_type.py} +8 -20
- anyscale/client/openapi_client/models/baseimagesenum.py +1 -2
- anyscale/client/openapi_client/models/cloud.py +31 -3
- anyscale/client/openapi_client/models/cloud_deployment.py +30 -3
- anyscale/client/openapi_client/models/cloud_with_cloud_resource.py +29 -1
- anyscale/client/openapi_client/models/cloud_with_cloud_resource_gcp.py +29 -1
- anyscale/client/openapi_client/models/dataset_metrics.py +6 -6
- anyscale/client/openapi_client/models/dataset_state.py +2 -1
- anyscale/client/openapi_client/models/describe_system_workload_response.py +32 -6
- anyscale/client/openapi_client/models/experimental_workspace.py +29 -1
- anyscale/client/openapi_client/models/experimental_workspaces_sort_field.py +2 -1
- anyscale/client/openapi_client/models/operator_metrics.py +8 -9
- anyscale/client/openapi_client/models/operator_status.py +102 -0
- anyscale/client/openapi_client/models/organization_usage_alert.py +20 -20
- anyscale/client/openapi_client/models/supportedbaseimagesenum.py +1 -2
- anyscale/cloud/models.py +330 -0
- anyscale/commands/cloud_commands.py +132 -43
- anyscale/commands/command_examples.py +54 -134
- anyscale/commands/compute_config_commands.py +7 -11
- anyscale/compute_config/__init__.py +2 -16
- anyscale/compute_config/_private/compute_config_sdk.py +27 -17
- anyscale/compute_config/commands.py +14 -44
- anyscale/compute_config/models.py +49 -26
- anyscale/controllers/cloud_controller.py +289 -171
- anyscale/controllers/cloud_file_storage_utils.py +204 -0
- anyscale/controllers/kubernetes_verifier.py +1567 -0
- anyscale/job/_private/job_sdk.py +17 -8
- anyscale/job/models.py +1 -1
- anyscale/scripts.py +0 -2
- anyscale/sdk/anyscale_client/models/baseimagesenum.py +1 -2
- anyscale/sdk/anyscale_client/models/cloud.py +31 -3
- anyscale/sdk/anyscale_client/models/supportedbaseimagesenum.py +1 -2
- anyscale/shared_anyscale_utils/utils/id_gen.py +1 -0
- anyscale/version.py +1 -1
- anyscale/workspace/models.py +14 -7
- {anyscale-0.26.47.dist-info → anyscale-0.26.48.dist-info}/METADATA +1 -1
- {anyscale-0.26.47.dist-info → anyscale-0.26.48.dist-info}/RECORD +56 -70
- anyscale/commands/llm/dataset_commands.py +0 -269
- anyscale/commands/llm/group.py +0 -15
- anyscale/commands/llm/models_commands.py +0 -123
- anyscale/controllers/llm/__init__.py +0 -0
- anyscale/controllers/llm/models_controller.py +0 -144
- anyscale/llm/__init__.py +0 -2
- anyscale/llm/dataset/__init__.py +0 -2
- anyscale/llm/dataset/_private/__init__.py +0 -0
- anyscale/llm/dataset/_private/docs.py +0 -63
- anyscale/llm/dataset/_private/models.py +0 -71
- anyscale/llm/dataset/_private/sdk.py +0 -147
- anyscale/llm/model/__init__.py +0 -2
- anyscale/llm/model/_private/models_sdk.py +0 -62
- anyscale/llm/model/commands.py +0 -93
- anyscale/llm/model/models.py +0 -171
- anyscale/llm/model/sdk.py +0 -62
- anyscale/llm/sdk.py +0 -27
- {anyscale-0.26.47.dist-info → anyscale-0.26.48.dist-info}/WHEEL +0 -0
- {anyscale-0.26.47.dist-info → anyscale-0.26.48.dist-info}/entry_points.txt +0 -0
- {anyscale-0.26.47.dist-info → anyscale-0.26.48.dist-info}/licenses/LICENSE +0 -0
- {anyscale-0.26.47.dist-info → anyscale-0.26.48.dist-info}/licenses/NOTICE +0 -0
- {anyscale-0.26.47.dist-info → anyscale-0.26.48.dist-info}/top_level.txt +0 -0
@@ -3,9 +3,8 @@ from typing import Optional
|
|
3
3
|
from anyscale._private.sdk import sdk_command
|
4
4
|
from anyscale.compute_config._private.compute_config_sdk import PrivateComputeConfigSDK
|
5
5
|
from anyscale.compute_config.models import (
|
6
|
-
|
6
|
+
ComputeConfigType,
|
7
7
|
ComputeConfigVersion,
|
8
|
-
MultiDeploymentComputeConfig,
|
9
8
|
)
|
10
9
|
|
11
10
|
|
@@ -15,7 +14,7 @@ _CREATE_EXAMPLE = """
|
|
15
14
|
import anyscale
|
16
15
|
from anyscale.compute_config.models import ComputeConfig, HeadNodeConfig, MarketType, WorkerNodeGroupConfig
|
17
16
|
|
18
|
-
|
17
|
+
single_deployment_compute_config = ComputeConfig(
|
19
18
|
head_node=HeadNodeConfig(
|
20
19
|
instance_type="m5.8xlarge",
|
21
20
|
),
|
@@ -33,39 +32,9 @@ config = ComputeConfig(
|
|
33
32
|
),
|
34
33
|
],
|
35
34
|
)
|
36
|
-
full_name: str = anyscale.compute_config.create(
|
37
|
-
"""
|
35
|
+
full_name: str = anyscale.compute_config.create(single_deployment_compute_config, name="my-single-deployment-compute-config")
|
38
36
|
|
39
|
-
|
40
|
-
"config": "The config options defining the compute config.",
|
41
|
-
"name": "The name of the compute config. This should *not* include a version tag. If a name is not provided, one will be automatically generated.",
|
42
|
-
}
|
43
|
-
|
44
|
-
|
45
|
-
@sdk_command(
|
46
|
-
_COMPUTE_CONFIG_SDK_SINGLETON_KEY,
|
47
|
-
PrivateComputeConfigSDK,
|
48
|
-
doc_py_example=_CREATE_EXAMPLE,
|
49
|
-
arg_docstrings=_CREATE_ARG_DOCSTRINGS,
|
50
|
-
)
|
51
|
-
def create(
|
52
|
-
config: ComputeConfig,
|
53
|
-
*,
|
54
|
-
name: Optional[str],
|
55
|
-
_private_sdk: Optional[PrivateComputeConfigSDK] = None,
|
56
|
-
) -> str:
|
57
|
-
"""Create a new version of a compute config.
|
58
|
-
|
59
|
-
Returns the full name of the registered compute config, including the version.
|
60
|
-
"""
|
61
|
-
full_name, _ = _private_sdk.create_compute_config(config, name=name) # type: ignore
|
62
|
-
return full_name
|
63
|
-
|
64
|
-
|
65
|
-
_CREATE_MULTI_DEPLOYMENT_EXAMPLE = """
|
66
|
-
import anyscale
|
67
|
-
from anyscale.compute_config.models import MultiDeploymentComputeConfig, ComputeConfig, HeadNodeConfig, WorkerNodeGroupConfig
|
68
|
-
config = MultiDeploymentComputeConfig(
|
37
|
+
multi_deployment_compute_config = MultiDeploymentComputeConfig(
|
69
38
|
configs=[
|
70
39
|
ComputeConfig(
|
71
40
|
cloud_deployment="vm-aws-us-west-1",
|
@@ -95,11 +64,11 @@ config = MultiDeploymentComputeConfig(
|
|
95
64
|
)
|
96
65
|
]
|
97
66
|
)
|
98
|
-
full_name: str = anyscale.compute_config.
|
67
|
+
full_name: str = anyscale.compute_config.create(multi_deployment_compute_config, name="my-multi-deployment-compute-config")
|
99
68
|
"""
|
100
69
|
|
101
|
-
|
102
|
-
"config": "The config options defining the
|
70
|
+
_CREATE_ARG_DOCSTRINGS = {
|
71
|
+
"config": "The config options defining the compute config.",
|
103
72
|
"name": "The name of the compute config. This should *not* include a version tag. If a name is not provided, one will be automatically generated.",
|
104
73
|
}
|
105
74
|
|
@@ -107,19 +76,20 @@ _CREATE_MULTI_DEPLOYMENT_ARG_DOCSTRINGS = {
|
|
107
76
|
@sdk_command(
|
108
77
|
_COMPUTE_CONFIG_SDK_SINGLETON_KEY,
|
109
78
|
PrivateComputeConfigSDK,
|
110
|
-
doc_py_example=
|
111
|
-
arg_docstrings=
|
79
|
+
doc_py_example=_CREATE_EXAMPLE,
|
80
|
+
arg_docstrings=_CREATE_ARG_DOCSTRINGS,
|
112
81
|
)
|
113
|
-
def
|
114
|
-
config:
|
82
|
+
def create(
|
83
|
+
config: ComputeConfigType,
|
115
84
|
*,
|
116
85
|
name: Optional[str],
|
117
86
|
_private_sdk: Optional[PrivateComputeConfigSDK] = None,
|
118
87
|
) -> str:
|
119
|
-
"""
|
88
|
+
"""Create a new version of a compute config.
|
89
|
+
|
120
90
|
Returns the full name of the registered compute config, including the version.
|
121
91
|
"""
|
122
|
-
full_name, _ = _private_sdk.
|
92
|
+
full_name, _ = _private_sdk.create_compute_config(config, name=name) # type: ignore
|
123
93
|
return full_name
|
124
94
|
|
125
95
|
|
@@ -315,7 +315,7 @@ worker_nodes:
|
|
315
315
|
|
316
316
|
@dataclass(frozen=True)
|
317
317
|
class ComputeConfig(ModelBase):
|
318
|
-
"""
|
318
|
+
"""Compute configuration for instance types and cloud resources for a cluster with a single cloud deployment."""
|
319
319
|
|
320
320
|
__doc_py_example__ = """
|
321
321
|
from anyscale.compute_config.models import (
|
@@ -586,7 +586,7 @@ advanced_instance_config: # (Optional) Defaults to no advanced configurations.
|
|
586
586
|
default=False,
|
587
587
|
repr=False,
|
588
588
|
metadata={
|
589
|
-
"docstring": "Allow worker groups to be automatically configured based on workload. When false, worker groups must be explicitly configured.",
|
589
|
+
"docstring": "Allow worker groups to be automatically configured based on the workload's logical resource requests. When false, worker groups must be explicitly configured.",
|
590
590
|
},
|
591
591
|
)
|
592
592
|
|
@@ -608,6 +608,7 @@ from anyscale.compute_config.models import (
|
|
608
608
|
MultiDeploymentComputeConfig, ComputeConfig, HeadNodeConfig, WorkerNodeGroupConfig
|
609
609
|
)
|
610
610
|
config = MultiDeploymentComputeConfig(
|
611
|
+
cloud="my-cloud",
|
611
612
|
configs=[
|
612
613
|
ComputeConfig(
|
613
614
|
cloud_deployment="vm-aws-us-west-1",
|
@@ -657,7 +658,6 @@ configs:
|
|
657
658
|
min_nodes: 1
|
658
659
|
max_nodes: 10
|
659
660
|
"""
|
660
|
-
|
661
661
|
cloud: Optional[str] = field(
|
662
662
|
default=None,
|
663
663
|
metadata={
|
@@ -698,9 +698,6 @@ configs:
|
|
698
698
|
assert isinstance(config, ComputeConfig)
|
699
699
|
config_models.append(config)
|
700
700
|
|
701
|
-
if not config.cloud_deployment:
|
702
|
-
raise ValueError("'cloud_deployment' is required for each config.")
|
703
|
-
|
704
701
|
if config.cloud:
|
705
702
|
unique_clouds.add(config.cloud)
|
706
703
|
|
@@ -722,6 +719,47 @@ configs:
|
|
722
719
|
return config_models
|
723
720
|
|
724
721
|
|
722
|
+
ComputeConfigType = Union[ComputeConfig, MultiDeploymentComputeConfig]
|
723
|
+
|
724
|
+
|
725
|
+
def compute_config_type_from_yaml(config_file: str) -> ComputeConfigType:
|
726
|
+
"""
|
727
|
+
Parse a YAML compute config file into either a ComputeConfig or MultiDeploymentComputeConfig.
|
728
|
+
"""
|
729
|
+
error_message = f"Could not parse config file '{config_file}' as a ComputeConfig or MultiDeploymentComputeConfig:\n"
|
730
|
+
|
731
|
+
try:
|
732
|
+
return ComputeConfig.from_yaml(config_file)
|
733
|
+
except Exception as e: # noqa: BLE001
|
734
|
+
error_message += f"ComputeConfig: {e}\n"
|
735
|
+
|
736
|
+
try:
|
737
|
+
return MultiDeploymentComputeConfig.from_yaml(config_file)
|
738
|
+
except Exception as e: # noqa: BLE001
|
739
|
+
error_message += f"MultiDeploymentComputeConfig: {e}\n"
|
740
|
+
|
741
|
+
raise TypeError(error_message.rstrip())
|
742
|
+
|
743
|
+
|
744
|
+
def compute_config_type_from_dict(config_dict: Dict) -> ComputeConfigType:
|
745
|
+
"""
|
746
|
+
Parse a compute config dict into either a ComputeConfig or MultiDeploymentComputeConfig.
|
747
|
+
"""
|
748
|
+
error_message = f"Could not parse config dict '{config_dict}' as a ComputeConfig or MultiDeploymentComputeConfig:\n"
|
749
|
+
|
750
|
+
try:
|
751
|
+
return ComputeConfig.from_dict(config_dict)
|
752
|
+
except Exception as e: # noqa: BLE001
|
753
|
+
error_message += f"ComputeConfig: {e}\n"
|
754
|
+
|
755
|
+
try:
|
756
|
+
return MultiDeploymentComputeConfig.from_dict(config_dict)
|
757
|
+
except Exception as e: # noqa: BLE001
|
758
|
+
error_message += f"MultiDeploymentComputeConfig: {e}\n"
|
759
|
+
|
760
|
+
raise TypeError(error_message.rstrip())
|
761
|
+
|
762
|
+
|
725
763
|
@dataclass(frozen=True)
|
726
764
|
class ComputeConfigVersion(ModelBase):
|
727
765
|
"""Details of a created version of a compute config.
|
@@ -775,29 +813,14 @@ config:
|
|
775
813
|
if not isinstance(id, str):
|
776
814
|
raise TypeError("'id' must be a string.")
|
777
815
|
|
778
|
-
config: Optional[
|
816
|
+
config: Optional[ComputeConfigType] = field(
|
779
817
|
default=None, metadata={"docstring": "The compute configuration."},
|
780
818
|
)
|
781
819
|
|
782
|
-
def _validate_config(self, config: Optional[
|
783
|
-
if config is not None and not isinstance(
|
784
|
-
|
785
|
-
|
786
|
-
multi_deployment_config: Optional[MultiDeploymentComputeConfig] = field(
|
787
|
-
default=None,
|
788
|
-
repr=False,
|
789
|
-
metadata={
|
790
|
-
"docstring": "Compute configuration for a cluster with multiple possible cloud deployments.",
|
791
|
-
"customer_hosted_only": True,
|
792
|
-
},
|
793
|
-
)
|
794
|
-
|
795
|
-
def _validate_multi_deployment_config(
|
796
|
-
self, multi_deployment_config: Optional[MultiDeploymentComputeConfig]
|
797
|
-
):
|
798
|
-
if multi_deployment_config is not None and not isinstance(
|
799
|
-
multi_deployment_config, MultiDeploymentComputeConfig
|
820
|
+
def _validate_config(self, config: Optional[ComputeConfigType]):
|
821
|
+
if config is not None and not isinstance(
|
822
|
+
config, (ComputeConfig, MultiDeploymentComputeConfig)
|
800
823
|
):
|
801
824
|
raise TypeError(
|
802
|
-
"'
|
825
|
+
"'config' must be a ComputeConfig or MultiDeploymentComputeConfig"
|
803
826
|
)
|