<#2124 Universal lock file might not contain platf...
# github-notifications
c
#2124 Universal lock file might not contain platform-dependent dependencies Issue created by misbernerSample command:
pex3 lock create --style=universal 'torch==2.0.0'
Expected behavior: A lockfile is created with all (transitive) dependencies of packages matching the
torch==2.0.0
for all platforms. • Observed behavior: Lockfile does not reference dependencies of packages for Linux (
nvidia-*
packages,
triton-2.0.0
). Without knowing too much about the internals of Pex, it looks like only the first wheel is taken into account (in my case, that's https://files.pythonhosted.org/packages/9f/cd/670e5e178db87065ee60f60fb35b040abbb819a1f686a91d9ff799fc5048/torch-2.0.0-1-cp310-cp310-manylinux2014_aarch64.whl ) and inspected for dependencies. The
torch-2.0.0.dist-info/METADATA
file for this wheel lists:
Copy code
Requires-Dist: filelock
Requires-Dist: typing-extensions
Requires-Dist: sympy
Requires-Dist: networkx
Requires-Dist: jinja2
Provides-Extra: opt-einsum
Requires-Dist: opt-einsum (>=3.3) ; extra == 'opt-einsum'
which matches the lockfile output:
Copy code
"project_name": "torch",
          "requires_dists": [
            "filelock",
            "jinja2",
            "networkx",
            "opt-einsum>=3.3; extra == \"opt-einsum\"",
            "sympy",
            "typing-extensions"
          ],
However, one of the linux/amd64 wheels (https://files.pythonhosted.org/packages/5f/24/16e94ac3a470027a2f6cf56dbbe2ce1b2742fa0ac98844f039fad103e142/torch-2.0.0-cp39-cp39-manylinux1_x86_64.whl) lists the following in its
METADATA
file:
Copy code
Requires-Dist: filelock
Requires-Dist: typing-extensions
Requires-Dist: sympy
Requires-Dist: networkx
Requires-Dist: jinja2
Requires-Dist: nvidia-cuda-nvrtc-cu11 (==11.7.99) ; platform_system == "Linux" and platform_machine == "x86_64"
Requires-Dist: nvidia-cuda-runtime-cu11 (==11.7.99) ; platform_system == "Linux" and platform_machine == "x86_64"
Requires-Dist: nvidia-cuda-cupti-cu11 (==11.7.101) ; platform_system == "Linux" and platform_machine == "x86_64"
Requires-Dist: nvidia-cudnn-cu11 (==8.5.0.96) ; platform_system == "Linux" and platform_machine == "x86_64"
Requires-Dist: nvidia-cublas-cu11 (==11.10.3.66) ; platform_system == "Linux" and platform_machine == "x86_64"
Requires-Dist: nvidia-cufft-cu11 (==10.9.0.58) ; platform_system == "Linux" and platform_machine == "x86_64"
Requires-Dist: nvidia-curand-cu11 (==10.2.10.91) ; platform_system == "Linux" and platform_machine == "x86_64"
Requires-Dist: nvidia-cusolver-cu11 (==11.4.0.1) ; platform_system == "Linux" and platform_machine == "x86_64"
Requires-Dist: nvidia-cusparse-cu11 (==11.7.4.91) ; platform_system == "Linux" and platform_machine == "x86_64"
Requires-Dist: nvidia-nccl-cu11 (==2.14.3) ; platform_system == "Linux" and platform_machine == "x86_64"
Requires-Dist: nvidia-nvtx-cu11 (==11.7.91) ; platform_system == "Linux" and platform_machine == "x86_64"
Requires-Dist: triton (==2.0.0) ; platform_system == "Linux" and platform_machine == "x86_64"
Provides-Extra: opt-einsum
Requires-Dist: opt-einsum (>=3.3) ; extra == 'opt-einsum'
where all the platform-specific dependencies are absent from the universal lockfile. Is this a bug, or is my understanding of what should be in the universal lockfile just wrong? Many thanks! pantsbuild/pex