Repository navigation
[CI] Fix torchvision::nms error in RL integration tests - #2959
Merged
Merged
Conversation
vllm pulls in torchvision transitively via transformers, but the PyPI torchvision doesn't match the nightly torch ABI, causing "operator torchvision::nms does not exist" at import time. Install torchvision explicitly from the nightly channel alongside torch.
weifengpy
requested review from
fegin,
tianyu-l,
wconstab and
wwwjn
as code owners
April 14, 2026 05:16
shuhuayu
approved these changes
Apr 14, 2026
shuhuayu
left a comment
Contributor
There was a problem hiding this comment.
LGTM. But curious where is the previous torchvision installed?
Contributor
Author
|
thanks for the prompt review. RL Integration Tests are back to normal. I am landing this RL Integration Tests / build-test (cuda, linux.g5.48xlarge.nvidia.gpu, cuda, 12.8, torchtitan-ubuntu-20.04-clang12, http... / linux-job (pull_request)Successful in 20m |
jemitche1
pushed a commit
to jemitche1/torchtitan
that referenced
this pull request
Apr 14, 2026
fix https://github.com/pytorch/torchtitan/actions/runs/24377404846/job/71193671209?pr=2741 ## Summary - vllm pulls in torchvision transitively via transformers, but the PyPI torchvision doesn't match the nightly torch ABI, causing `operator torchvision::nms does not exist` at import time. - Install torchvision explicitly from the nightly channel alongside torch in both RL CI workflows (A10G and H100). ## Test plan - [ ] RL integration tests pass on A10G (`integration_test_4gpu_rl.yaml`) - [ ] RL integration tests pass on H100 (`integration_test_4gpu_rl_h100.yaml`) ``` + python -m torchtitan.experiments.rl.tests.integration_tests /home/ec2-user/actions-runner/_work/_temp/artifacts-to-be-uploaded --ngpu 4 --hf_assets_path /var/lib/ci-user/.cache/huggingface/hub/models--Qwen--Qwen3-0.6B/snapshots/c1899de289a04d12100db370d81485cdf75e47ca Traceback (most recent call last): File "<frozen runpy>", line 189, in _run_module_as_main File "<frozen runpy>", line 112, in _get_module_details File "/pytorch/torchtitan/torchtitan/experiments/rl/__init__.py", line 15, in <module> from torchtitan.experiments.rl.models.vllm_wrapper import TorchTitanVLLMModelWrapper File "/pytorch/torchtitan/torchtitan/experiments/rl/models/vllm_wrapper.py", line 27, in <module> from torchtitan.experiments.rl.models.attention import VLLMAttentionWrapper File "/pytorch/torchtitan/torchtitan/experiments/rl/models/attention.py", line 20, in <module> from vllm.model_executor.layers.attention import Attention File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/vllm/model_executor/layers/attention/__init__.py", line 4, in <module> from vllm.model_executor.layers.attention.attention import Attention File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/vllm/model_executor/layers/attention/attention.py", line 10, in <module> from vllm.config import CacheConfig, get_current_vllm_config File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/vllm/config/__init__.py", line 19, in <module> from vllm.config.model import ( File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/vllm/config/model.py", line 30, in <module> from vllm.transformers_utils.config import ( File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/vllm/transformers_utils/config.py", line 19, in <module> from transformers.models.auto.image_processing_auto import get_image_processor_config File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/transformers/models/auto/image_processing_auto.py", line 27, in <module> from ...image_processing_utils import ImageProcessingMixin File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/transformers/image_processing_utils.py", line 21, in <module> from .image_processing_base import BatchFeature, ImageProcessingMixin File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/transformers/image_processing_base.py", line 26, in <module> from .image_utils import is_valid_image, load_image File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/transformers/image_utils.py", line 55, in <module> from torchvision.transforms import InterpolationMode File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torchvision/__init__.py", line 8, in <module> from torchvision import _meta_registrations, datasets, io, models, ops, transforms, utils # usort:skip ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torchvision/_meta_registrations.py", line 163, in <module> @torch.library.register_fake("torchvision::nms") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/library.py", line 1085, in register use_lib._register_fake( File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/library.py", line 202, in _register_fake handle = entry.fake_impl.register( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/_library/fake_impl.py", line 50, in register if torch._C._dispatch_has_kernel_for_dispatch_key(self.qualname, "Meta"): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RuntimeError: operator torchvision::nms does not exist ```
mreso
added a commit
to mreso/torchtitan
that referenced
this pull request
Apr 14, 2026
…ests transformers pulls in torchvision transitively via image_utils, but the PyPI torchvision doesn't match the nightly torch ABI, causing `operator torchvision::nms does not exist` at import time. Install torchvision from the nightly channel alongside torch, matching the fix in pytorch#2959 for RL integration tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix https://github.com/pytorch/torchtitan/actions/runs/24377404846/job/71193671209?pr=2741
Summary
operator torchvision::nms does not existat import time.Test plan
integration_test_4gpu_rl.yaml)integration_test_4gpu_rl_h100.yaml)