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 11, 01:15 UTC
[CI] add polling for precompiled wheel in python_only_compile.sh, fix index generation for releases (#30781)
Signed-off-by: Shengqi Chen <harry-chen@outlook.com>
Shengqi Chen committed
Dec 22, 2025 at 21:24 UTC
2cf91c2ea48f27572b9fdcdd8d8802c7f1059e8b
3 files changed
+32
-11
.buildkite/scripts/generate-nightly-index.py
+10
-2
@@ -291,6 +291,7 @@ if __name__ == "__main__":
291
"""
292
Arguments:
293
--version <version> : version string for the current build (e.g., commit hash)
294
+ --wheel-dir <wheel_directory> : directory containing wheel files (default to be same as `version`)
295
--current-objects <path_to_json> : path to JSON file containing current S3 objects listing in this version directory
296
--output-dir <output_directory> : directory to store generated index files
297
--alias-to-default <alias_variant_name> : (optional) alias variant name for the default variant
@@ -318,6 +319,12 @@ if __name__ == "__main__":
319
required=True,
320
help="Directory to store generated index files",
321
)
322
+ parser.add_argument(
323
+ "--wheel-dir",
324
+ type=str,
325
+ default=None,
326
+ help="Directory containing wheel files (default to be same as `version`)",
327
+ )
328
parser.add_argument(
329
"--alias-to-default",
330
type=str,
@@ -384,9 +391,10 @@ if __name__ == "__main__":
391
print("Nightly version detected, keeping all wheel files.")
392
393
# Generate index and metadata, assuming wheels and indices are stored as:
387
- # s3://vllm-wheels/{version}/<wheel files>
394
+ # s3://vllm-wheels/{wheel_dir}/<wheel files>
395
# s3://vllm-wheels/<anything>/<index files>
389
- wheel_base_dir = Path(output_dir).parent / version
396
+ wheel_dir = args.wheel_dir or version
397
+ wheel_base_dir = Path(output_dir).parent / wheel_dir.strip().rstrip("/")
398
index_base_dir = Path(output_dir)
399
400
generate_index_and_metadata(
.buildkite/scripts/upload-wheels.sh
+2
-1
@@ -102,6 +102,7 @@ if [[ "$version" != *"dev"* ]]; then
102
echo "Re-generating indices for /$pure_version/"
103
rm -rf "$INDICES_OUTPUT_DIR/*"
104
mkdir -p "$INDICES_OUTPUT_DIR"
105
- $PYTHON .buildkite/scripts/generate-nightly-index.py --version "$pure_version" --current-objects "$obj_json" --output-dir "$INDICES_OUTPUT_DIR" --comment "version $pure_version" $alias_arg
105
+ # wheel-dir is overridden to be the commit directory, so that the indices point to the correct wheel path
106
+ $PYTHON .buildkite/scripts/generate-nightly-index.py --version "$pure_version" --wheel-dir "$SUBPATH" --current-objects "$obj_json" --output-dir "$INDICES_OUTPUT_DIR" --comment "version $pure_version" $alias_arg
107
aws s3 cp --recursive "$INDICES_OUTPUT_DIR/" "s3://$BUCKET/$pure_version/"
108
fi
tests/standalone_tests/python_only_compile.sh
+20
-8
@@ -18,25 +18,37 @@ for i in {1..5}; do
18
echo "Checking metadata.json URL (attempt $i)..."
19
if curl --fail "$meta_json_url" > metadata.json; then
20
echo "INFO: metadata.json URL is valid."
21
- # check whether it is valid json by python
21
+ # check whether it is valid json by python (printed to stdout)
22
if python3 -m json.tool metadata.json; then
23
- echo "INFO: metadata.json is valid JSON. Proceeding with the test."
23
+ echo "INFO: metadata.json is valid JSON. Proceeding with the check."
24
+ # check whether there is an object in the json matching:
25
+ # "package_name": "vllm", and "platform_tag" matches the current architecture
26
+ # see `determine_wheel_url` in setup.py for more details
27
+ if python3 -c "import platform as p,json as j,sys as s; d = j.load(open('metadata.json')); \
28
+ s.exit(int(not any(o.get('package_name') == 'vllm' and p.machine() in o.get('platform_tag') \
29
+ for o in d)))" 2>/dev/null; then
30
+ echo "INFO: metadata.json contains a pre-compiled wheel for the current architecture."
31
+ break
32
+ else
33
+ echo "WARN: metadata.json does not have a pre-compiled wheel for the current architecture."
34
+ fi
35
else
36
echo "CRITICAL: metadata.json exists but is not valid JSON, please do report in #sig-ci channel!"
37
+ echo "INFO: metadata.json content:"
38
+ cat metadata.json
39
exit 1
40
fi
28
- break
41
fi
30
- # failure handling
42
+ # failure handling & retry logic
43
if [ $i -eq 5 ]; then
32
- echo "ERROR: metadata.json URL is still not valid after 5 attempts."
33
- echo "ERROR: Please check whether the precompiled wheel for commit $merge_base_commit exists."
44
+ echo "ERROR: metadata is still not available after 5 attempts."
45
+ echo "ERROR: Please check whether the precompiled wheel for commit $merge_base_commit is available."
46
echo " NOTE: If $merge_base_commit is a new commit on main, maybe try again after its release pipeline finishes."
47
echo " NOTE: If it fails, please report in #sig-ci channel."
48
exit 1
49
else
38
- echo "WARNING: metadata.json URL is not valid. Retrying in 3 minutes..."
39
- sleep 180
50
+ echo "WARNING: metadata is not available. Retrying after 5 minutes..."
51
+ sleep 300
52
fi
53
done
54