Skip to content

Commit 5f75d50

Browse files
committed
addressed comments
Signed-off-by: Kinjal Patel <kinjalpravin@nvidia.com>
1 parent b5729a1 commit 5f75d50

3 files changed

Lines changed: 14 additions & 11 deletions

File tree

.github/workflows/gpu_tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ jobs:
7979
run: |
8080
python3 -m pip install nox && nox -s ${{ matrix.example }}
8181
- name: Upload GPU coverage to Codecov
82+
# vLLM container has no ``git``, which codecov-action needs; gpu_vllm
83+
# also runs without ``--cov`` so there's no coverage.xml to upload.
84+
if: matrix.example != 'gpu_vllm'
8285
uses: codecov/codecov-action@v5
8386
with:
8487
token: ${{ secrets.CODECOV_TOKEN }}

tests/_test_utils/torch/transformers_models.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,14 @@ def get_tiny_deepseek_v3(**config_kwargs) -> PreTrainedModel:
153153
return AutoModelForCausalLM.from_config(cfg)
154154

155155

156-
def create_tiny_deepseek_v3_dir(tmp_path: Path | str, **config_kwargs) -> Path:
156+
def create_tiny_deepseek_v3_dir(
157+
tmp_path: Path | str, with_tokenizer: bool = False, **config_kwargs
158+
) -> Path:
157159
deepseek_dir = Path(tmp_path) / "tiny_deepseek_v3"
160+
if with_tokenizer:
161+
tokenizer = get_tiny_tokenizer()
162+
tokenizer.save_pretrained(deepseek_dir)
163+
config_kwargs["vocab_size"] = tokenizer.vocab_size
158164
get_tiny_deepseek_v3(**config_kwargs).save_pretrained(deepseek_dir)
159165
return deepseek_dir
160166

tests/gpu_vllm/conftest.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,12 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16-
"""Shared setup for vLLM tests.
17-
18-
vLLM handles its own distributed init, current-vllm-config context, and
19-
parallel-state setup when ``LLM(...)`` is constructed, so this conftest only
20-
opts into ``VLLM_ALLOW_INSECURE_SERIALIZATION=1`` *before* importing vLLM so
21-
``LLM.collective_rpc(callable)`` can ship our worker callables over the engine
22-
IPC channel via pickle. Without this, the default msgpack encoder rejects raw
23-
functions and the call raises ``TypeError``. Only safe in a controlled test
24-
environment.
16+
"""Set ``VLLM_ALLOW_INSECURE_SERIALIZATION=1`` before vLLM is imported so
17+
``LLM.collective_rpc(callable)`` can pickle worker callables. pytest loads
18+
conftests before sibling test modules, so this beats the top-level
19+
``from vllm import LLM`` in ``test_*.py``.
2520
"""
2621

2722
import os
2823

29-
# Must precede any ``import vllm``: the env is read at module-import time.
3024
os.environ.setdefault("VLLM_ALLOW_INSECURE_SERIALIZATION", "1")

0 commit comments

Comments
 (0)