anyscale 0.26.34__py3-none-any.whl → 0.26.35__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/anyscale_client.py +7 -0
- anyscale/_private/anyscale_client/common.py +5 -1
- anyscale/_private/anyscale_client/fake_anyscale_client.py +7 -2
- anyscale/_private/docgen/models.md +2 -2
- anyscale/_private/workload/workload_sdk.py +4 -3
- anyscale/client/openapi_client/models/baseimagesenum.py +2 -1
- anyscale/client/openapi_client/models/supportedbaseimagesenum.py +2 -1
- anyscale/compute_config/_private/compute_config_sdk.py +11 -5
- anyscale/job/_private/job_sdk.py +31 -27
- anyscale/schedule/_private/schedule_sdk.py +7 -0
- anyscale/sdk/anyscale_client/models/baseimagesenum.py +2 -1
- anyscale/sdk/anyscale_client/models/supportedbaseimagesenum.py +2 -1
- anyscale/version.py +1 -1
- {anyscale-0.26.34.dist-info → anyscale-0.26.35.dist-info}/METADATA +1 -1
- {anyscale-0.26.34.dist-info → anyscale-0.26.35.dist-info}/RECORD +20 -20
- {anyscale-0.26.34.dist-info → anyscale-0.26.35.dist-info}/LICENSE +0 -0
- {anyscale-0.26.34.dist-info → anyscale-0.26.35.dist-info}/NOTICE +0 -0
- {anyscale-0.26.34.dist-info → anyscale-0.26.35.dist-info}/WHEEL +0 -0
- {anyscale-0.26.34.dist-info → anyscale-0.26.35.dist-info}/entry_points.txt +0 -0
- {anyscale-0.26.34.dist-info → anyscale-0.26.35.dist-info}/top_level.txt +0 -0
@@ -640,6 +640,7 @@ class AnyscaleClient(AnyscaleClientInterface):
|
|
640
640
|
def get_compute_config_id(
|
641
641
|
self,
|
642
642
|
compute_config_name: Optional[str] = None,
|
643
|
+
cloud: Optional[str] = None,
|
643
644
|
*,
|
644
645
|
include_archived: bool = False,
|
645
646
|
) -> Optional[str]:
|
@@ -648,6 +649,11 @@ class AnyscaleClient(AnyscaleClientInterface):
|
|
648
649
|
if version is None:
|
649
650
|
# Setting `version=-1` will return only the latest version if there are multiple.
|
650
651
|
version = -1
|
652
|
+
|
653
|
+
cloud_id = (
|
654
|
+
self.get_cloud_id(cloud_name=cloud) if cloud is not None else None
|
655
|
+
)
|
656
|
+
|
651
657
|
cluster_computes = self._internal_api_client.search_compute_templates_api_v2_compute_templates_search_post(
|
652
658
|
ComputeTemplateQuery(
|
653
659
|
orgwide=True,
|
@@ -657,6 +663,7 @@ class AnyscaleClient(AnyscaleClientInterface):
|
|
657
663
|
if include_archived
|
658
664
|
else ArchiveStatus.NOT_ARCHIVED,
|
659
665
|
version=version,
|
666
|
+
cloud_id=cloud_id,
|
660
667
|
)
|
661
668
|
).results
|
662
669
|
|
@@ -200,7 +200,11 @@ class AnyscaleClientInterface(ABC):
|
|
200
200
|
|
201
201
|
@abstractmethod
|
202
202
|
def get_compute_config_id(
|
203
|
-
self,
|
203
|
+
self,
|
204
|
+
compute_config_name: Optional[str] = None,
|
205
|
+
cloud: Optional[str] = None,
|
206
|
+
*,
|
207
|
+
include_archived=False,
|
204
208
|
) -> Optional[str]:
|
205
209
|
"""Get the compute config ID for the provided name.
|
206
210
|
|
@@ -468,7 +468,11 @@ class FakeAnyscaleClient(AnyscaleClientInterface):
|
|
468
468
|
return None
|
469
469
|
|
470
470
|
def get_compute_config_id(
|
471
|
-
self,
|
471
|
+
self,
|
472
|
+
compute_config_name: Optional[str] = None,
|
473
|
+
cloud: Optional[str] = None,
|
474
|
+
*,
|
475
|
+
include_archived=False,
|
472
476
|
) -> Optional[str]:
|
473
477
|
if compute_config_name is not None:
|
474
478
|
name, version = parse_cluster_compute_name_version(compute_config_name)
|
@@ -491,7 +495,8 @@ class FakeAnyscaleClient(AnyscaleClientInterface):
|
|
491
495
|
if workspace_cluster is not None:
|
492
496
|
return workspace_cluster.cluster_compute_id
|
493
497
|
|
494
|
-
|
498
|
+
cloud_id = self.get_cloud_id(cloud_name=cloud)
|
499
|
+
return self.get_default_compute_config(cloud_id=cloud_id).id
|
495
500
|
|
496
501
|
def archive_compute_config(self, *, compute_config_id: str):
|
497
502
|
archived_config = self._compute_configs.pop(compute_config_id)
|