@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 9def10664e
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 16, 22:00 UTC

[Bugfix][CI/Build][Hardware][AMD] Install matching torchvision to fix AMD tests (#5949)

Matt Wong committed Jun 29, 2024 at 14:47 UTC 9def10664e8b54dcc5c6114f2895bc9e712bf182
2 files changed +14 -8
Dockerfile.rocm
+12 -6
@@ -55,16 +55,22 @@ RUN apt-get purge -y sccache; pip uninstall -y sccache; rm -f "$(which sccache)"
55 # Install torch == 2.4.0 on ROCm
56 RUN case "$(ls /opt | grep -Po 'rocm-[0-9]\.[0-9]')" in \
57 *"rocm-5.7"*) \
58 - pip uninstall -y torch \
59 - && pip install --no-cache-dir --pre torch==2.4.0.dev20240612 \
58 + pip uninstall -y torch torchaudio torchvision \
59 + && pip install --no-cache-dir --pre \
60 + torch==2.4.0.dev20240612 torchaudio==2.4.0.dev20240612 \
61 + torchvision==0.19.0.dev20240612 \
62 --index-url https://download.pytorch.org/whl/nightly/rocm5.7;; \
63 *"rocm-6.0"*) \
62 - pip uninstall -y torch \
63 - && pip install --no-cache-dir --pre torch==2.4.0.dev20240612 \
64 + pip uninstall -y torch torchaudio torchvision \
65 + && pip install --no-cache-dir --pre \
66 + torch==2.4.0.dev20240612 torchaudio==2.4.0.dev20240612 \
67 + torchvision==0.19.0.dev20240612 \
68 --index-url https://download.pytorch.org/whl/nightly/rocm6.0;; \
69 *"rocm-6.1"*) \
66 - pip uninstall -y torch \
67 - && pip install --no-cache-dir --pre torch==2.4.0.dev20240612 \
70 + pip uninstall -y torch torchaudio torchvision \
71 + && pip install --no-cache-dir --pre \
72 + torch==2.4.0.dev20240612 torchaudio==2.4.0.dev20240612 \
73 + torchvision==0.19.0.dev20240612 \
74 --index-url https://download.pytorch.org/whl/nightly/rocm6.1;; \
75 *) ;; esac
76
tests/entrypoints/test_openai_chat.py
+2 -2
@@ -14,7 +14,7 @@ import torch
14 from huggingface_hub import snapshot_download
15 from openai import BadRequestError
16
17 -from ..utils import VLLM_PATH, RemoteOpenAIServer
17 +from ..utils import RemoteOpenAIServer
18
19 # any model with a chat template should work here
20 MODEL_NAME = "HuggingFaceH4/zephyr-7b-beta"
@@ -79,7 +79,7 @@ def zephyr_lora_files():
79
80 @pytest.fixture(scope="module")
81 def ray_ctx():
82 - ray.init(runtime_env={"working_dir": VLLM_PATH})
82 + ray.init()
83 yield
84 ray.shutdown()
85