heroku / heroku/heroku-buildpack-python

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

Open
#1,748 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Ruby
Stars
993
Forks
1.8k
Avg merge
10h 50m
Merged PRs (30d)
10

Description

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==+cpu --index-url https://download.pytorch.org/whl/cpu
```

As seen in:
- https://heroku.support/1527398
- https://heroku.support/1531439
- https://heroku.support/1531634

GUS-W-19247065.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.