[Rebase] Rebase to vllm 0.27.0 (#5976)
Signed-off-by: tzhouam <tzhouam@connect.ust.hk> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
584d78c673
commit
2ce15ab7a0
55 files changed
+1335
-93
No files matched your search
@@ -33,16 +33,19 @@ BAGEL_CI_DEPLOY = get_deploy_config_path("ci/bagel.yaml")
|
||||
# Generated with seed=52, num_inference_steps=15,
|
||||
# prompt='Change the grass color to red',
|
||||
# input image: 2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg
|
||||
# Re-goldened from the vLLM-0.27-aligned output (nightly builds 2953/2954
|
||||
# produced bit-identical pixels across two different torch/base images; only
|
||||
# (512, 336) moved beyond tolerance vs the main-branch goldens from #5898).
|
||||
REFERENCE_PIXELS = [
|
||||
{"position": (100, 100), "rgb": (156, 172, 217)},
|
||||
{"position": (100, 100), "rgb": (157, 172, 217)},
|
||||
{"position": (400, 50), "rgb": (105, 144, 217)},
|
||||
{"position": (700, 100), "rgb": (118, 159, 232)},
|
||||
{"position": (150, 400), "rgb": (180, 22, 52)},
|
||||
{"position": (512, 336), "rgb": (221, 211, 194)},
|
||||
{"position": (700, 400), "rgb": (192, 10, 46)},
|
||||
{"position": (100, 600), "rgb": (102, 12, 22)},
|
||||
{"position": (400, 600), "rgb": (161, 28, 47)},
|
||||
{"position": (700, 600), "rgb": (100, 87, 94)},
|
||||
{"position": (150, 400), "rgb": (185, 21, 55)},
|
||||
{"position": (512, 336), "rgb": (205, 215, 191)},
|
||||
{"position": (700, 400), "rgb": (193, 11, 48)},
|
||||
{"position": (100, 600), "rgb": (103, 14, 25)},
|
||||
{"position": (400, 600), "rgb": (159, 28, 48)},
|
||||
{"position": (700, 600), "rgb": (101, 87, 94)},
|
||||
{"position": (256, 256), "rgb": (181, 201, 221)},
|
||||
]
|
||||
|
||||
@@ -141,13 +144,24 @@ def _validate_pixels(
|
||||
Raises:
|
||||
AssertionError: If any pixel differs beyond tolerance.
|
||||
"""
|
||||
mismatches = []
|
||||
probes = []
|
||||
for ref in reference_pixels:
|
||||
x, y = ref["position"]
|
||||
expected = ref["rgb"]
|
||||
actual = image.getpixel((x, y))[:3]
|
||||
assert all(abs(a - e) <= tolerance for a, e in zip(actual, expected)), (
|
||||
f"Pixel mismatch at ({x}, {y}): expected {expected}, got {actual}"
|
||||
)
|
||||
probes.append(f' {{"position": ({x}, {y}), "rgb": {actual}}},')
|
||||
if not all(abs(a - e) <= tolerance for a, e in zip(actual, expected)):
|
||||
mismatches.append(f"({x}, {y}): expected {expected}, got {actual}")
|
||||
# Report every probe, not just the first mismatch: CI does not upload the
|
||||
# generated image, so this failure message is the only place the full
|
||||
# actual-value table exists when the goldens need to be regenerated.
|
||||
assert not mismatches, (
|
||||
f"Pixel mismatch at {len(mismatches)} probe(s) (tolerance ±{tolerance}):\n "
|
||||
+ "\n ".join(mismatches)
|
||||
+ "\nActual values at all probes (paste as the new reference table if re-goldening):\n"
|
||||
+ "\n".join(probes)
|
||||
)
|
||||
|
||||
|
||||
def _generate_bagel_img2img(
|
||||
|
||||
@@ -1094,6 +1094,12 @@ class _HashableRequest(SimpleNamespace):
|
||||
# request; real Requests initialise it to 0 (vllm/v1/request.py).
|
||||
num_in_flight_tokens = 0
|
||||
|
||||
# vLLM 0.27 (a0c092ee72): the stale-output counter that replaced
|
||||
# async_tokens_to_discard. update_from_output reads it for every scheduled
|
||||
# request, and real Requests initialise it to 0 (vllm/v1/request.py), so the
|
||||
# double needs it too.
|
||||
num_stale_output_tokens = 0
|
||||
|
||||
def __hash__(self):
|
||||
return hash(self.request_id)
|
||||
|
||||
|
||||
Reference in new issue
Block a user