mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2025-12-10 07:45:29 +08:00
[Bugfix]: fix metadata file copy in test_sharded_state_loader (#21830)
Signed-off-by: Andy Xie <andy.xning@gmail.com>
This commit is contained in:
parent
055bd3978e
commit
3e36fcbee6
@ -1,6 +1,7 @@
|
|||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||||
|
|
||||||
|
import fnmatch
|
||||||
import multiprocessing as mp
|
import multiprocessing as mp
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
@ -64,9 +65,10 @@ def _run_writer(input_dir, output_dir, weights_patterns, **kwargs):
|
|||||||
# Copy metadata files to output directory
|
# Copy metadata files to output directory
|
||||||
for file in os.listdir(input_dir):
|
for file in os.listdir(input_dir):
|
||||||
if os.path.isdir(os.path.join(input_dir, file)):
|
if os.path.isdir(os.path.join(input_dir, file)):
|
||||||
continue
|
shutil.copytree(os.path.join(input_dir, file),
|
||||||
if not any(file.endswith(ext) for ext in weights_patterns):
|
os.path.join(output_dir, file))
|
||||||
shutil.copy(f"{input_dir}/{file}", output_dir)
|
elif not any(fnmatch.fnmatch(file, ext) for ext in weights_patterns):
|
||||||
|
shutil.copy(os.path.join(input_dir, file), output_dir)
|
||||||
|
|
||||||
|
|
||||||
def _run_generate(input_dir, queue: mp.Queue, **kwargs):
|
def _run_generate(input_dir, queue: mp.Queue, **kwargs):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user