Skip to content

Fix run-tests CI import failures by aligning torch_scatter wheel with active torch ABI#21

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-failing-actions-job
Draft

Fix run-tests CI import failures by aligning torch_scatter wheel with active torch ABI#21
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-failing-actions-job

Conversation

Copilot AI commented Jun 6, 2026

Copy link
Copy Markdown

The run-tests GitHub Actions job failed during pytest collection due to a binary ABI mismatch between the container’s installed torch and torch_scatter. This change updates the test entry script to always install a torch_scatter wheel that matches the active torch version/backend before running tests.

  • Root cause addressed

    • torch_scatter in the runtime environment was built against a different torch ABI, causing import-time symbol resolution errors.
  • CI script hardening (ut.sh)

    • Detect active torch version at runtime.
    • Detect backend flavor (cpu or CUDA tag derived from torch.version.cuda).
    • Construct the matching PyG wheel index URL.
    • Force-reinstall torch_scatter from that index (--only-binary) before pytest.
  • Resulting behavior

    • ut.sh no longer assumes the preinstalled torch_scatter is compatible with the current torch in the container.
    • Test collection uses a wheel aligned with the runtime torch ABI.
TORCH_VERSION=$(python -c "import torch; print(torch.__version__.split('+')[0])")
TORCH_BACKEND=$(python -c "import torch; print('cpu' if torch.version.cuda is None else 'cu' + torch.version.cuda.replace('.', ''))")
TORCH_SCATTER_INDEX="https://data.pyg.org/whl/torch-${TORCH_VERSION}+${TORCH_BACKEND}.html"
pip install --no-cache-dir --force-reinstall --only-binary=torch_scatter torch_scatter -f "${TORCH_SCATTER_INDEX}"

Copilot AI changed the title [WIP] Fix failing GitHub Actions job run-tests Fix run-tests CI import failures by aligning torch_scatter wheel with active torch ABI Jun 6, 2026
Copilot AI requested a review from AsymmetryChou June 6, 2026 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants