[CI] Install sgl-eval from PyPI through the test extra (#37504)
This commit is contained in:
@@ -172,11 +172,8 @@ test = [
|
||||
"lm-eval[api]>=0.4.9.2",
|
||||
"matplotlib",
|
||||
# 4.9.3 is what sgl-eval's math_verify grader needs (latex2sympy2_extended
|
||||
# raises ImportError on 4.7.x), so a `sglang[test]` environment is already
|
||||
# compatible when sgl-eval is installed on top of it.
|
||||
# Do NOT declare sgl-eval itself here: it is git-only, and PyPI rejects any
|
||||
# uploaded distribution whose metadata carries a direct URL requirement.
|
||||
# CUDA CI installs it in scripts/ci/cuda/ci_install_dependency.sh.
|
||||
# raises ImportError on 4.7.x); pinned here so other test deps cannot pull
|
||||
# it down.
|
||||
"antlr4-python3-runtime==4.9.3",
|
||||
"pandas",
|
||||
"parameterized",
|
||||
@@ -185,6 +182,10 @@ test = [
|
||||
"pytest",
|
||||
"pytest-cov",
|
||||
"sentence_transformers",
|
||||
# Pinned: a bump moves scoring for every eval test at once, so re-baseline
|
||||
# MODEL_SCORE_THRESHOLDS in test/registered/eval/test_text_models_gsm8k_eval.py
|
||||
# and the mmlu thresholds of run_eval's other callers before changing it.
|
||||
"sgl-eval==0.1.0",
|
||||
"sglang[fastokens]",
|
||||
"tabulate",
|
||||
]
|
||||
|
||||
@@ -109,6 +109,7 @@ test = [
|
||||
"pandas",
|
||||
"peft>=0.18.0",
|
||||
"sentence_transformers",
|
||||
"sgl-eval==0.1.0",
|
||||
]
|
||||
all = []
|
||||
dev = ["sglang[test]"]
|
||||
|
||||
@@ -106,6 +106,7 @@ test = [
|
||||
"peft>=0.18.0",
|
||||
"pytest",
|
||||
"sentence_transformers",
|
||||
"sgl-eval==0.1.0",
|
||||
"tabulate",
|
||||
]
|
||||
|
||||
|
||||
@@ -197,6 +197,7 @@ test = [
|
||||
"peft>=0.18.0,<0.19.0", # Pin to <0.19.0 due to torchao incompatibility
|
||||
"pytest",
|
||||
"sentence_transformers",
|
||||
"sgl-eval==0.1.0",
|
||||
"tabulate",
|
||||
]
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ def _run_sgl_eval(
|
||||
asserts the score meets ``score_threshold``, and checks the speculative accept
|
||||
length. ``thinking=True`` sends per-request ``chat_template_kwargs={"thinking":
|
||||
True}`` so the server separates reasoning from the final answer. Skips the test
|
||||
if sgl-eval (git-only) is not installed. Returns the RunResult.
|
||||
if sgl-eval is not installed. Returns the RunResult.
|
||||
"""
|
||||
assert (
|
||||
score_threshold == score_threshold
|
||||
@@ -122,10 +122,7 @@ def _run_sgl_eval(
|
||||
from sgl_eval.sampler import ChatCompletionSampler
|
||||
from sgl_eval.types import GenConfig
|
||||
except ImportError:
|
||||
test_case.skipTest(
|
||||
"sgl-eval not installed; pip install "
|
||||
"'sgl-eval @ git+https://github.com/sgl-project/sgl-eval'"
|
||||
)
|
||||
test_case.skipTest("sgl-eval not installed; pip install 'sglang[test]'")
|
||||
|
||||
base_url = test_case.base_url.rstrip("/")
|
||||
if not base_url.endswith("/v1"):
|
||||
|
||||
Reference in New Issue
Block a user