diff --git a/python/sglang/multimodal_gen/test/server/test_server_common.py b/python/sglang/multimodal_gen/test/server/test_server_common.py index f34a7be3d..af04cf688 100644 --- a/python/sglang/multimodal_gen/test/server/test_server_common.py +++ b/python/sglang/multimodal_gen/test/server/test_server_common.py @@ -35,6 +35,7 @@ from sglang.multimodal_gen.test.server.testcase_configs import ( ScenarioConfig, ) from sglang.multimodal_gen.test.test_utils import ( + SGL_TEST_FILES_CI_DATA_REVISION, _consistency_gt_filenames, _get_consistency_gt_dir, compare_with_gt, @@ -569,6 +570,7 @@ Add the expected file(s) to sgl-project/ci-data in diffusion-ci/consistency_gt/s For this case, expected file(s): {names} Repository: https://github.com/sgl-project/ci-data (path: diffusion-ci/consistency_gt/sglang_generated/) +Pinned revision used by this check: {SGL_TEST_FILES_CI_DATA_REVISION} (Optional) Per-case override in consistency_threshold.json: "cases": {{ diff --git a/python/sglang/multimodal_gen/test/test_consistency_metrics.py b/python/sglang/multimodal_gen/test/test_consistency_metrics.py index f78e8819e..b77b42d3a 100644 --- a/python/sglang/multimodal_gen/test/test_consistency_metrics.py +++ b/python/sglang/multimodal_gen/test/test_consistency_metrics.py @@ -18,6 +18,14 @@ def _solid_image(value: int, size: int = 32) -> np.ndarray: return np.full((size, size, 3), value, dtype=np.uint8) +def test_consistency_gt_urls_are_pinned_to_ci_data_revision(): + revision_path = f"/ci-data/{test_utils.SGL_TEST_FILES_CI_DATA_REVISION}/" + + assert "/ci-data/main/" not in test_utils.SGL_TEST_FILES_CONSISTENCY_GT_ROOT + assert revision_path in test_utils.SGL_TEST_FILES_OFFICIAL_CONSISTENCY_GT_BASE + assert revision_path in test_utils.SGL_TEST_FILES_SGLANG_CONSISTENCY_GT_BASE + + def test_pixel_metrics_identical_image(): image = _solid_image(128) diff --git a/python/sglang/multimodal_gen/test/test_utils.py b/python/sglang/multimodal_gen/test/test_utils.py index 45db47371..873cd98fe 100644 --- a/python/sglang/multimodal_gen/test/test_utils.py +++ b/python/sglang/multimodal_gen/test/test_utils.py @@ -33,8 +33,18 @@ if TYPE_CHECKING: logger = init_logger(__name__) -SGL_TEST_FILES_OFFICIAL_CONSISTENCY_GT_BASE = "https://raw.githubusercontent.com/sgl-project/ci-data/main/diffusion-ci/consistency_gt/official_generated" -SGL_TEST_FILES_SGLANG_CONSISTENCY_GT_BASE = "https://raw.githubusercontent.com/sgl-project/ci-data/main/diffusion-ci/consistency_gt/sglang_generated" +SGL_TEST_FILES_CI_DATA_REVISION = "437539b330592b1421d239b22d7d76b4a6d08fda" +SGL_TEST_FILES_CONSISTENCY_GT_ROOT = ( + "https://raw.githubusercontent.com/" + f"sgl-project/ci-data/{SGL_TEST_FILES_CI_DATA_REVISION}/" + "diffusion-ci/consistency_gt" +) +SGL_TEST_FILES_OFFICIAL_CONSISTENCY_GT_BASE = ( + f"{SGL_TEST_FILES_CONSISTENCY_GT_ROOT}/official_generated" +) +SGL_TEST_FILES_SGLANG_CONSISTENCY_GT_BASE = ( + f"{SGL_TEST_FILES_CONSISTENCY_GT_ROOT}/sglang_generated" +) SGL_TEST_FILES_CONSISTENCY_GT_BASE = SGL_TEST_FILES_SGLANG_CONSISTENCY_GT_BASE SGL_TEST_FILES_CONSISTENCY_GT_BASES = ( SGL_TEST_FILES_OFFICIAL_CONSISTENCY_GT_BASE,