Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
de80783b
Unverified
Commit
de80783b
authored
Sep 06, 2024
by
Rui Qiao
Committed by
GitHub
Sep 06, 2024
Browse files
[Misc] Use ray[adag] dependency instead of cuda (#7938)
parent
e5cab715
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
12 deletions
+19
-12
Dockerfile
Dockerfile
+0
-2
MANIFEST.in
MANIFEST.in
+0
-1
requirements-adag.txt
requirements-adag.txt
+0
-3
requirements-test.txt
requirements-test.txt
+1
-4
vllm/executor/ray_gpu_executor.py
vllm/executor/ray_gpu_executor.py
+18
-2
No files found.
Dockerfile
View file @
de80783b
...
@@ -37,7 +37,6 @@ WORKDIR /workspace
...
@@ -37,7 +37,6 @@ WORKDIR /workspace
# install build and runtime dependencies
# install build and runtime dependencies
COPY
requirements-common.txt requirements-common.txt
COPY
requirements-common.txt requirements-common.txt
COPY
requirements-adag.txt requirements-adag.txt
COPY
requirements-cuda.txt requirements-cuda.txt
COPY
requirements-cuda.txt requirements-cuda.txt
RUN
--mount
=
type
=
cache,target
=
/root/.cache/pip
\
RUN
--mount
=
type
=
cache,target
=
/root/.cache/pip
\
python3
-m
pip
install
-r
requirements-cuda.txt
python3
-m
pip
install
-r
requirements-cuda.txt
...
@@ -66,7 +65,6 @@ COPY setup.py setup.py
...
@@ -66,7 +65,6 @@ COPY setup.py setup.py
COPY
cmake cmake
COPY
cmake cmake
COPY
CMakeLists.txt CMakeLists.txt
COPY
CMakeLists.txt CMakeLists.txt
COPY
requirements-common.txt requirements-common.txt
COPY
requirements-common.txt requirements-common.txt
COPY
requirements-adag.txt requirements-adag.txt
COPY
requirements-cuda.txt requirements-cuda.txt
COPY
requirements-cuda.txt requirements-cuda.txt
COPY
pyproject.toml pyproject.toml
COPY
pyproject.toml pyproject.toml
COPY
vllm vllm
COPY
vllm vllm
...
...
MANIFEST.in
View file @
de80783b
include LICENSE
include LICENSE
include requirements-adag.txt
include requirements-common.txt
include requirements-common.txt
include requirements-cuda.txt
include requirements-cuda.txt
include requirements-rocm.txt
include requirements-rocm.txt
...
...
requirements-adag.txt
deleted
100644 → 0
View file @
e5cab715
# Dependencies for Ray accelerated DAG
cupy-cuda12x
ray >= 2.32
\ No newline at end of file
requirements-test.txt
View file @
de80783b
# Needed for Ray accelerated DAG tests
-r requirements-adag.txt
# testing
# testing
pytest
pytest
tensorizer>=2.9.0
tensorizer>=2.9.0
...
@@ -16,7 +13,7 @@ httpx
...
@@ -16,7 +13,7 @@ httpx
librosa # required for audio test
librosa # required for audio test
peft
peft
requests
requests
ray
ray
[adag]>=2.35
sentence-transformers # required for embedding
sentence-transformers # required for embedding
soundfile # required for audio test
soundfile # required for audio test
compressed-tensors==0.4.0 # required for compressed-tensors
compressed-tensors==0.4.0 # required for compressed-tensors
...
...
vllm/executor/ray_gpu_executor.py
View file @
de80783b
...
@@ -427,18 +427,34 @@ class RayGPUExecutor(DistributedGPUExecutor):
...
@@ -427,18 +427,34 @@ class RayGPUExecutor(DistributedGPUExecutor):
async_run_remote_workers_only to complete."""
async_run_remote_workers_only to complete."""
ray
.
get
(
parallel_worker_tasks
)
ray
.
get
(
parallel_worker_tasks
)
def
_c
ompiled
_ray_dag
(
self
,
enable_asyncio
:
bool
):
def
_c
heck
_ray_
a
dag
_installation
(
self
):
import
pkg_resources
import
pkg_resources
from
packaging
import
version
from
packaging
import
version
required_version
=
version
.
parse
(
"2.3
2
"
)
required_version
=
version
.
parse
(
"2.3
5
"
)
current_version
=
version
.
parse
(
current_version
=
version
.
parse
(
pkg_resources
.
get_distribution
(
"ray"
).
version
)
pkg_resources
.
get_distribution
(
"ray"
).
version
)
if
current_version
<
required_version
:
if
current_version
<
required_version
:
raise
ValueError
(
f
"Ray version
{
required_version
}
or greater is "
raise
ValueError
(
f
"Ray version
{
required_version
}
or greater is "
f
"required, but found
{
current_version
}
"
)
f
"required, but found
{
current_version
}
"
)
import
importlib.util
adag_spec
=
importlib
.
util
.
find_spec
(
"ray.experimental.compiled_dag_ref"
)
if
adag_spec
is
None
:
raise
ValueError
(
"Ray accelerated DAG is not installed. "
"Run `pip install ray[adag]` to install it."
)
cupy_spec
=
importlib
.
util
.
find_spec
(
"cupy"
)
if
cupy_spec
is
None
and
envs
.
VLLM_USE_RAY_COMPILED_DAG_NCCL_CHANNEL
:
raise
ValueError
(
"cupy is not installed but required since "
"VLLM_USE_RAY_COMPILED_DAG_NCCL_CHANNEL is set."
"Run `pip install ray[adag]` and check cupy installation."
)
def
_compiled_ray_dag
(
self
,
enable_asyncio
:
bool
):
assert
self
.
parallel_config
.
use_ray
assert
self
.
parallel_config
.
use_ray
self
.
_check_ray_adag_installation
()
from
ray.dag
import
InputNode
,
MultiOutputNode
from
ray.dag
import
InputNode
,
MultiOutputNode
from
ray.experimental.channel.torch_tensor_type
import
TorchTensorType
from
ray.experimental.channel.torch_tensor_type
import
TorchTensorType
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment