Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify specifying torch dependency (#642)
ivadomed now <ivadomed/ivadomed#1129> specifies torch as a standard dependency, without giving special manual instructions for it. This means there's finally no need to pin a torch version here in axondeepseg; previously, we had to match their version in our environment.yml because it was a manual step in their install instructions. But now the metadata makes pip handle it. ivadomed gave special install instructions to try to handle the complicated mess that it hardware (i.e. CPU vs GPU vs hyper modern CUDA-11-only GPUs) compatibility. But now they're just leaning on the 80%-20% rule of thumb: >80% of people are covered by the default torch builds. And we know how to handle the <20% cases of people with CUDA-11-only GPUs or Windows machines with GPUs by having them install with '--extra-index-url = https://download.pytorch.org/whl/<hardware-specific-build>' axondeepseg was pushing the CPU version of torch on people, assuming that most users would not own GPUs and that in the Linux case it would be very wasteful, maybe even make ADS uninstallable for some users. We gave our own manual instructions that duplicated ivadomed's for how to switch to the GPU version. That process meant double the downloads and likely mismatched versions, and maintenance work on our end as we would have to update the manual instructions whenever ivadomed did. Instead, follow torch's defaults, like ivadomed now does. But since the users with Linux and CPU-only hardware is still fairly common, highlight --extra-index-url as an optional *pre*step, allowing for the same final install but avoiding the double-download and likely versioning mistakes. Overall: - Windows and macOS continue to have no GPU support - Linux always has GPU support, even if it doesn't need it; this balloons the default install, but anyone using torch now has this same problem and the consensus seems to be just to pay for bigger disks that can tolerate the waste - The relatively common case of Linux users without GPUs have an escape hatch to avoid the large download - Windows users with GPUs have a way to use them (`--extra-index-url https://download.pytorch.org/whl/cu102`), but we don't document nor support this - Linux/Windows users with super new CUDA-11-only GPUs also have a way to use them, which we we also don't document nor support directly Fixes ivadomed/ivadomed#861 (comment) Related: spinalcordtoolbox/spinalcordtoolbox#3790 In passing, remove the redundant parts of the `conda env create` line. Co-authored-by: Mathieu Boudreau, PhD <emb6150@gmail.com> Co-authored-by: Armand <83031821+hermancollin@users.noreply.github.com>
- Loading branch information