Skip to content

Add warning when using the torch GPU package instead of the CPU variant #1748

Open
@edmorley

Description

@edmorley

Similar to #1343, but for PyTorch.

We should add a warning when we see that an app has installed the torch package from PyPI, which includes all of the GPU packages (that won't actually be used on Heroku) and results in a multi-gigabyte slug size.

PyTorch does have a CPU-only package variant, but it needs the correct package index to be specified. See:
https://pytorch.org/get-started/locally/

eg something like:

torch==<version>+cpu --index-url https://download.pytorch.org/whl/cpu

As seen in:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions