[diffusion] CI: read consistency GT from ci-data-diffusion at per-platform commit (#32297)

This commit is contained in:
Yihao Wang
2026-07-25 09:55:57 +08:00
committed by GitHub
parent ebf5330f71
commit 95865de24f
2 changed files with 19 additions and 14 deletions
@@ -35,17 +35,16 @@ if TYPE_CHECKING:
logger = init_logger(__name__)
# GT is read from <repo>@<revision>. 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/"
@@ -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):