From 9f2aba236bd25b496bb80a091ed3175461c775a4 Mon Sep 17 00:00:00 2001 From: Huy Do Date: Thu, 1 Oct 2026 14:35:20 -0700 Subject: [PATCH] Install xmlrunner so the cuda tests can run The cuda leg of .ci/torchbench/test.sh runs python3 -m torchbenchmark._components.test.test_subprocess which calls torch's run_tests(). That imports xmlrunner when TEST_SAVE_XML is set, and CI sets it, so the job dies before any test runs: File ".../torch/testing/_internal/common_utils.py", line 1366 import xmlrunner ModuleNotFoundError: No module named 'xmlrunner' The module comes from unittest-xml-reporting, not from a package named xmlrunner; the pin matches pytorch's .ci/docker/requirements-ci.txt. This has never been installed, so the cuda leg has never been able to pass. It went unnoticed because Test cuda does not run on main -- linux.aws.a100 queues it until something cancels it, in every run on record. It only showed up once the job moved to a runner that was actually available. Authored with Claude Code. --- requirements.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/requirements.txt b/requirements.txt index b2576e9375..0d9e8fd317 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,6 +7,9 @@ distro iopath pytest pytest-benchmark +# torch's run_tests() imports xmlrunner whenever TEST_SAVE_XML is set, which +# it is under CI, so the cuda leg of .ci/torchbench/test.sh needs it present. +unittest-xml-reporting<=3.2.0,>=2.0.0 requests tabulate timm==1.0.19