From 95865de24f2e6a18e9df1ea0a567933c3bb57379 Mon Sep 17 00:00:00 2001 From: Yihao Wang <42559837+AgainstEntropy@users.noreply.github.com> Date: Fri, 24 Jul 2026 18:55:57 -0700 Subject: [PATCH] [diffusion] CI: read consistency GT from ci-data-diffusion at per-platform commit (#32297) --- python/sglang/multimodal_gen/test/test_utils.py | 17 ++++++++--------- .../test/unit/test_consistency_metrics.py | 16 +++++++++++----- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/python/sglang/multimodal_gen/test/test_utils.py b/python/sglang/multimodal_gen/test/test_utils.py index 2c9d3093e..09300734e 100644 --- a/python/sglang/multimodal_gen/test/test_utils.py +++ b/python/sglang/multimodal_gen/test/test_utils.py @@ -35,17 +35,16 @@ if TYPE_CHECKING: logger = init_logger(__name__) # GT is read from @. A given SHA only exists in the repo it was -# committed to, so REPO and REVISION must be bumped together. New GT now -# publishes to sgl-project/ci-data-diffusion; the pins below still resolve -# against sgl-project/ci-data (readable but frozen). When you bump REVISION to a -# freshly generated commit, switch REPO to sgl-project/ci-data-diffusion too -# (and update the URL assertion in the consistency-metrics unit test). -SGL_TEST_FILES_CI_DATA_REPO = "sgl-project/ci-data" - -SGL_TEST_FILES_CI_DATA_REVISION = "320949ecc2587474a2f535229ffc8f47ed16ee51" +# committed to, so REPO and REVISION must be bumped together. All GT (CUDA and +# NPU/ascend) is read from sgl-project/ci-data-diffusion, where the GT-gen workflows +# publish. +SGL_TEST_FILES_CI_DATA_REPO = "sgl-project/ci-data-diffusion" +SGL_TEST_FILES_CI_DATA_REVISION = "6d689f4833e8c106ff0d853865f50496d1f2b453" +# The NPU pin is kept as a separate branch so ascend GT can be bumped independently +# when it's regenerated on its own cadence. if current_platform.is_npu(): - SGL_TEST_FILES_CI_DATA_REVISION = "6b62f4b6825c76a25fd2ba28248df68f2b400e65" + SGL_TEST_FILES_CI_DATA_REVISION = "6d689f4833e8c106ff0d853865f50496d1f2b453" SGL_TEST_FILES_CONSISTENCY_GT_ROOT = ( "https://raw.githubusercontent.com/" diff --git a/python/sglang/multimodal_gen/test/unit/test_consistency_metrics.py b/python/sglang/multimodal_gen/test/unit/test_consistency_metrics.py index f35f7b70e..bf8f7c354 100644 --- a/python/sglang/multimodal_gen/test/unit/test_consistency_metrics.py +++ b/python/sglang/multimodal_gen/test/unit/test_consistency_metrics.py @@ -33,11 +33,17 @@ def _disable_remote_official_gt_case_map(monkeypatch): 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 + # GT must be pinned to an immutable commit (not a moving branch) so results are + # reproducible and the per-URL download cache invalidates on regeneration. + assert test_utils.SGL_TEST_FILES_CI_DATA_REVISION != "main" + pinned_revision_path = ( + f"/{test_utils.SGL_TEST_FILES_CI_DATA_REPO}/" + f"{test_utils.SGL_TEST_FILES_CI_DATA_REVISION}/" + ) + assert ( + pinned_revision_path in test_utils.SGL_TEST_FILES_OFFICIAL_CONSISTENCY_GT_BASE + ) + assert pinned_revision_path in test_utils.SGL_TEST_FILES_SGLANG_CONSISTENCY_GT_BASE def test_remote_file_exists_returns_false_for_definitive_404(monkeypatch):