Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion .ci/scripts/gather_test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,19 @@ def model_should_run_on_event(model: str, event: str) -> bool:
return True


def model_should_run_on_backend(model: str, backend: str) -> bool:
"""
A helper function to decide whether a model should be tested on a backend.
"""
# dl3 and edsr on portable have hit the 90 minute job limit on every periodic
# run since 2026-08-03, so they only ever report cancelled. Their xnnpack
# variants still cover both models and finish in about ten minutes.
# TODO(#21692): re-enable once portable export of these two fits in the limit.
if backend == "portable" and model in ("dl3", "edsr"):
return False
return True


def model_should_run_on_target_os(model: str, target_os: str) -> bool:
"""
A helper function to decide whether a model should be tested on a target os (linux/macos).
Expand Down Expand Up @@ -153,7 +166,9 @@ def export_models_for_ci() -> dict[str, dict]:
if not model_should_run_on_event(name, event):
continue

if not model_should_run_on_target_os(name, target_os):
if not model_should_run_on_target_os(
name, target_os
) or not model_should_run_on_backend(name, backend):
continue

if backend == "xnnpack":
Expand Down
Loading