Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions src/dstack/_internal/core/backends/kubernetes/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@

import gpuhunt
from gpuhunt import KNOWN_AMD_GPUS, KNOWN_NVIDIA_GPUS, AcceleratorVendor

# XXX: kubernetes.utils is missing in the stubs package
from kubernetes import utils as _kubernetes_utils # pyright: ignore[reportAttributeAccessIssue]
from kubernetes.client import CoreV1Api, V1Node, V1Taint
from kubernetes.utils.quantity import parse_quantity as _parse_quantity
from typing_extensions import Self

from dstack._internal.core.backends.base.compute import normalize_arch
Expand Down Expand Up @@ -344,9 +342,7 @@ def build_dockerconfigjson(image_name: str, username: str, password: str) -> str
return json.dumps({"auths": {registry: entry}})


parse_quantity = cast(
Callable[[Union[str, int, float, Decimal]], Decimal], _kubernetes_utils.parse_quantity
)
parse_quantity = cast(Callable[[Union[str, int, float, Decimal]], Decimal], _parse_quantity)


def format_memory(memory: Memory) -> str:
Expand Down
Loading