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
@@ -1,5 +1,5 @@
|
|
1
1
|
import re
|
2
|
-
from typing import List, Tuple
|
2
|
+
from typing import Dict, List, Tuple
|
3
3
|
|
4
4
|
|
5
5
|
ANYSCALE_SDK_INTRO = """\
|
@@ -18,6 +18,57 @@ sdk = AnyscaleSDK()
|
|
18
18
|
"""
|
19
19
|
|
20
20
|
|
21
|
+
def _build_model_to_module_mapping() -> Dict[str, str]:
|
22
|
+
"""Build mapping from model name (lowercase) to module filename.
|
23
|
+
|
24
|
+
This dynamically discovers the mapping from ALL_MODULES configuration,
|
25
|
+
eliminating the need for hardcoded constants.
|
26
|
+
"""
|
27
|
+
# Import here to avoid circular imports
|
28
|
+
from anyscale._private.docgen.__main__ import ALL_MODULES
|
29
|
+
|
30
|
+
model_name_to_file = {}
|
31
|
+
|
32
|
+
for module in ALL_MODULES:
|
33
|
+
# Current models (Python types)
|
34
|
+
for model_type in module.models:
|
35
|
+
model_name_to_file[model_type.__name__.lower()] = module.filename
|
36
|
+
|
37
|
+
# Legacy models (strings)
|
38
|
+
if module.legacy_sdk_models:
|
39
|
+
for model_name in module.legacy_sdk_models:
|
40
|
+
model_name_to_file[model_name.lower()] = module.filename
|
41
|
+
|
42
|
+
return model_name_to_file
|
43
|
+
|
44
|
+
|
45
|
+
def _transform_legacy_links(text: str) -> str:
|
46
|
+
"""Transform legacy model links to include proper cross-module references."""
|
47
|
+
# Build the mapping dynamically
|
48
|
+
model_mapping = _build_model_to_module_mapping()
|
49
|
+
|
50
|
+
def replace_link(match):
|
51
|
+
model_name = match.group(1)
|
52
|
+
if model_name in model_mapping:
|
53
|
+
module_file = model_mapping[model_name]
|
54
|
+
return f"({module_file}#{model_name}-legacy)"
|
55
|
+
else:
|
56
|
+
# Fallback for unmapped models (stay in same file)
|
57
|
+
return f"(#{model_name}-legacy)"
|
58
|
+
|
59
|
+
# Transform links from (#modelname) to proper cross-module references
|
60
|
+
text = re.sub(r"\(#([a-z]+)\)", replace_link, text)
|
61
|
+
|
62
|
+
# Transform workspace command references to point to workspaces.md
|
63
|
+
text = re.sub(
|
64
|
+
r"\(#anyscale-workspace_v2-([a-z]+)\)",
|
65
|
+
r"(workspaces.md#anyscale-workspace_v2-\1)",
|
66
|
+
text,
|
67
|
+
)
|
68
|
+
|
69
|
+
return text
|
70
|
+
|
71
|
+
|
21
72
|
class LegacySDK:
|
22
73
|
def __init__(self, name: str, docstring: str):
|
23
74
|
self.name = name
|
@@ -35,9 +86,10 @@ class LegacySDK:
|
|
35
86
|
if line.startswith("### "):
|
36
87
|
name = line[4:]
|
37
88
|
else:
|
38
|
-
|
39
|
-
|
40
|
-
)
|
89
|
+
# First transform ./models.md links, then transform local links
|
90
|
+
line = re.sub(r"\(./models\.md#([a-z]+)\)", r"(#\1-legacy)", line)
|
91
|
+
line = _transform_legacy_links(line)
|
92
|
+
docstring += line + "\n"
|
41
93
|
|
42
94
|
return cls(name=name, docstring=docstring.strip())
|
43
95
|
|
@@ -50,7 +102,7 @@ class LegacyModel:
|
|
50
102
|
@classmethod
|
51
103
|
def from_md(cls, md: str) -> "LegacyModel":
|
52
104
|
"""
|
53
|
-
Convert a blob of markdown into a
|
105
|
+
Convert a blob of markdown into a LegacyModel object.
|
54
106
|
"""
|
55
107
|
name = ""
|
56
108
|
docstring = ""
|
@@ -59,7 +111,7 @@ class LegacyModel:
|
|
59
111
|
if line.startswith("## "):
|
60
112
|
name = line[3:]
|
61
113
|
else:
|
62
|
-
docstring +=
|
114
|
+
docstring += _transform_legacy_links(line) + "\n"
|
63
115
|
|
64
116
|
return cls(name=name, docstring=docstring.strip())
|
65
117
|
|