File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 11from dstack ._internal .core .backends .base .compute import (
22 ComputeWithCreateInstanceSupport ,
33 ComputeWithGatewaySupport ,
4+ ComputeWithGroupProvisioningSupport ,
45 ComputeWithMultinodeSupport ,
56 ComputeWithPlacementGroupSupport ,
67 ComputeWithPrivateGatewaySupport ,
@@ -39,6 +40,10 @@ def _get_backends_with_compute_feature(
3940 configurator_classes = _configurator_classes ,
4041 compute_feature_class = ComputeWithCreateInstanceSupport ,
4142)
43+ BACKENDS_WITH_GROUP_PROVISIONING_SUPPORT = _get_backends_with_compute_feature (
44+ configurator_classes = _configurator_classes ,
45+ compute_feature_class = ComputeWithGroupProvisioningSupport ,
46+ )
4247BACKENDS_WITH_PRIVILEGED_SUPPORT = _get_backends_with_compute_feature (
4348 configurator_classes = _configurator_classes ,
4449 compute_feature_class = ComputeWithPrivilegedSupport ,
Original file line number Diff line number Diff line change 1515 ComputeWithVolumeSupport ,
1616)
1717from dstack ._internal .core .backends .base .models import JobConfiguration
18+ from dstack ._internal .core .backends .features import BACKENDS_WITH_GROUP_PROVISIONING_SUPPORT
1819from dstack ._internal .core .errors import BackendError , ServerClientError
1920from dstack ._internal .core .models .common import NetworkMode
2021from dstack ._internal .core .models .compute_groups import ComputeGroupProvisioningData
@@ -852,7 +853,8 @@ async def _run_jobs_on_new_instances(
852853 job_configurations = [JobConfiguration (job = j , volumes = offer_volumes ) for j in jobs ]
853854 compute = backend .compute ()
854855 try :
855- if len (jobs ) > 1 and isinstance (compute , ComputeWithGroupProvisioningSupport ):
856+ if len (jobs ) > 1 and offer .backend in BACKENDS_WITH_GROUP_PROVISIONING_SUPPORT :
857+ assert isinstance (compute , ComputeWithGroupProvisioningSupport )
856858 cgpd = await common_utils .run_async (
857859 compute .run_jobs ,
858860 run ,
You can’t perform that action at this time.
0 commit comments