Skip to content

Commit b8de4ca

Browse files
gate JSON video test to sagemaker
1 parent 43f1e46 commit b8de4ca

4 files changed

Lines changed: 33 additions & 4 deletions

File tree

.github/config/model-tests/vllm-omni-model-tests.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,15 @@ smoke-test:
110110
# /v1/videos/sync handler, which only accepts form data. Exercises the
111111
# JSON content-type path so SageMaker callers can send JSON instead of
112112
# building a multipart body by hand.
113+
#
114+
# sagemaker-only: the JSON->multipart conversion lives in the SageMaker
115+
# routing middleware, which is not loaded on the EC2 image (plain
116+
# `vllm serve`). On EC2 this JSON body reaches the Form-only upstream
117+
# handler and returns 400, so the test is gated to the sagemaker config.
113118
- name: "wan2.1-t2v-1.3b-sync-json"
114119
s3_model: "wan2.1-t2v-1.3b.tar.gz"
115120
fleet: "x86-g6exl-runner"
121+
customer_type: "sagemaker"
116122
extra_args: ""
117123
route: "/v1/videos/sync"
118124
content_type: "application/json"

.github/workflows/vllm-omni.pr.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
name: "PR - vLLM-Omni"
22

33
on:
4-
workflow_dispatch:
54
pull_request:
65
branches: [main]
76
types: [opened, reopened, synchronize]

.github/workflows/vllm-omni.tests-model.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
uv venv --python 3.12
6060
source .venv/bin/activate
6161
uv pip install pyyaml
62-
python3 scripts/ci/parse_model_config.py --config .github/config/model-tests/vllm-omni-model-tests.yml --runner-type codebuild-fleet
62+
python3 scripts/ci/parse_model_config.py --config .github/config/model-tests/vllm-omni-model-tests.yml --runner-type codebuild-fleet --customer-type "${{ steps.config.outputs.customer-type }}"
6363
6464
smoke-test:
6565
name: smoke-test (${{ matrix.model.name }})

scripts/ci/parse_model_config.py

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,24 @@ def load_yaml(path: str) -> dict:
6262
return json.loads(result.stdout)
6363

6464

65-
def parse_config(config_path: str, section: str, runner_type: str) -> dict[str, str]:
65+
def matches_customer_type(model: dict, customer_type: str) -> bool:
66+
"""A model runs on a config unless it pins a different customer_type.
67+
68+
Models without a ``customer_type`` field run everywhere (backward
69+
compatible). A model that pins e.g. ``customer_type: sagemaker`` only runs
70+
when the config's customer type matches — used to gate tests for features
71+
that exist on only one container variant (e.g. the SageMaker routing
72+
middleware, which adds the JSON->multipart video path absent on EC2).
73+
"""
74+
pinned = model.get("customer_type")
75+
if not pinned or not customer_type:
76+
return True
77+
return pinned == customer_type
78+
79+
80+
def parse_config(
81+
config_path: str, section: str, runner_type: str, customer_type: str = ""
82+
) -> dict[str, str]:
6683
cfg = load_yaml(config_path)
6784

6885
s3_prefix = cfg.get("s3_prefix", "")
@@ -73,6 +90,7 @@ def parse_config(config_path: str, section: str, runner_type: str) -> dict[str,
7390

7491
for rt in types:
7592
models = cfg.get(section, {}).get(rt, []) or []
93+
models = [m for m in models if matches_customer_type(m, customer_type)]
7694
transformed = [transform_model(m, s3_prefix, fixtures_prefix) for m in models]
7795
key = rt if runner_type == "all" else "matrix"
7896
results[key] = json.dumps(transformed, separators=(",", ":"))
@@ -91,13 +109,19 @@ def main():
91109
default="all",
92110
help="Runner type: all, codebuild-fleet, or runner-scale-sets",
93111
)
112+
parser.add_argument(
113+
"--customer-type",
114+
default="",
115+
help="Config customer type (e.g. ec2, sagemaker). When set, drops models "
116+
"that pin a different customer_type. Empty = include all models.",
117+
)
94118
args = parser.parse_args()
95119

96120
if not os.path.isfile(args.config):
97121
print(f"ERROR: Config file not found: {args.config}", file=sys.stderr)
98122
sys.exit(1)
99123

100-
results = parse_config(args.config, args.section, args.runner_type)
124+
results = parse_config(args.config, args.section, args.runner_type, args.customer_type)
101125

102126
output_file = os.environ.get("GITHUB_OUTPUT")
103127
if output_file:

0 commit comments

Comments
 (0)