[diffusion] CI: pin diffusion consistency GT revision (#24400)
This commit is contained in:
@@ -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": {{
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user