Repository navigation
ci: pin torchvision alongside torch in vlm 8-GPU workflow - #3047
Conversation
|
Unknown label
|
|
|
There was a problem hiding this comment.
I knew that transformers backend will likely import torchvision internally.
This and models.py test (https://github.com/pytorch/torchtitan/blob/main/tests/integration_tests/models.py#L192) will use torchvision, but for others where is torchvision needed?
There was a problem hiding this comment.
You're right, sorry, it should be vlm only. I'll make the change. Honestly given vlm is currently green though, I'm not sure it's worth pushing the narrowed version either; happy to either re-scope or close, whichever you'd prefer.
Separately: 8 GPU Feature Tests has been red since ~04-13 from a different bug (EOFError in dcp.load gather_object, it looks ROCm-specific, save takes 16s vs 2s on CUDA). Looking into that now.
There was a problem hiding this comment.
happy to either re-scope or close, whichever you'd prefer
I think it's more principled to include torchvision nightly, so let's do that even if we don't hit a conflict today. Thanks!
Force-reinstalling only torch from the nightly index leaves the pre-installed torchvision (built against an older nightly) in place. Pip's resolver doesn't catch the resulting ABI break (pip check passes), but any code path that does `import torchvision` fails: RuntimeError: operator torchvision::nms does not exist Same one-line fix that landed in pytorch#3002 for the transformers modeling backend workflow. Narrowing this PR to the vlm workflow only — the other ROCm 8-GPU workflows (features/torchft/autoparallel) are failing for unrelated reasons and a torchvision pin there would be speculative. Verified locally on MI325X / rocm/pytorch:latest against the nightly/rocm7.1 index: bug reproduced before fix, import succeeds after.
13e4c67 to
6591c54
Compare
What
Add
torchvisionto thepip install --force-reinstall --pre torch ...line in the VLM 8-GPU integration test workflow:integration_test_8gpu_vlm.yamlSame one-line fix that landed in #3002 for
integration_test_8gpu_transformers_modeling_backend.yaml.Why
Force-reinstalling only
torchfrom the nightly index leaves the pre-installedtorchvision(built against an older nightly) in place. Pip's resolver doesn't catch the resulting ABI break (pip checkpasses), but any code path that doesimport torchvisionfails:The VLM workflow's test entry point pulls
torchvisiontransitively (image-utils path throughtransformers), so the ABI break is fatal at import time.Scope note
An earlier revision of this PR also patched
features.yaml,torchft.yaml, andautoparallel.yaml. Removed — those workflows are red on ROCm for an unrelated reason (DCP plannerEOFErroringather_object, see #3051), and a torchvision pin there would be speculative. Will file separately if/when verified.Repro / verification (local, MI325X /
rocm/pytorch:latest)torchonly fromnightly/rocm7.1import torchvisionRuntimeError: operator torchvision::nms does not existpip checktorch torchvisiontogether)import torchvisionThe exact same shape was previously confirmed and merged for
transformers_modeling_backend.yamlin #3002.Note comment
Per review feedback on #3002, the touched file gets a 2-line
# NOTE:explaining whytorchvisionis on the install line, so future maintainers don't strip it.