@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 3e36fcbee6
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 14, 22:35 UTC

[Bugfix]: fix metadata file copy in test_sharded_state_loader (#21830)

Signed-off-by: Andy Xie <andy.xning@gmail.com>

Ning Xie committed Jul 31, 2025 at 14:22 UTC 3e36fcbee642f41278a4881c9e2bfbbd7c28e607
1 file changed +5 -3
tests/test_sharded_state_loader.py
+5 -3
@@ -1,6 +1,7 @@
1 # SPDX-License-Identifier: Apache-2.0
2 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project
3
4 +import fnmatch
5 import multiprocessing as mp
6 import os
7 import shutil
@@ -64,9 +65,10 @@ def _run_writer(input_dir, output_dir, weights_patterns, **kwargs):
65 # Copy metadata files to output directory
66 for file in os.listdir(input_dir):
67 if os.path.isdir(os.path.join(input_dir, file)):
67 - continue
68 - if not any(file.endswith(ext) for ext in weights_patterns):
69 - shutil.copy(f"{input_dir}/{file}", output_dir)
68 + shutil.copytree(os.path.join(input_dir, file),
69 + os.path.join(output_dir, file))
70 + elif not any(fnmatch.fnmatch(file, ext) for ext in weights_patterns):
71 + shutil.copy(os.path.join(input_dir, file), output_dir)
72
73
74 def _run_generate(input_dir, queue: mp.Queue, **kwargs):