dingo-gw / dingo

Dingo: Deep inference for gravitational-wave observations
MIT License
55 stars 18 forks source link

Remove `torchvision` from dependencies #191

Open stephengreen opened 1 year ago

stephengreen commented 1 year ago

Installing from conda we get a warning as follows:

$ dingo_ls -h
/cvmfs/oasis.opensciencegrid.org/ligo/sw/conda/envs/igwn-py310-testing/lib/python3.10/site-packages/torchvision/io/image.py:13: UserWarning: Failed to load image Python extension: libjpeg.so.8: cannot open shared object file: No such file or directory
  warn(f"Failed to load image Python extension: {e}")
usage: dingo_ls [-h] file_name

positional arguments:
  file_name

options:
  -h, --help  show this help message and exit

In fact, we only use the torchvision package to use its Compose transform, which itself is < 20 lines of code. We could simply reimplement Compose within Dingo, and avoid having to depend on torchvision. What do you think @max-dax @jonaswildberger ?

max-dax commented 1 year ago

Yeah we can just copy the source code. I don't think we'll need any other torchvision functions in the near future.

stephengreen commented 1 year ago

Sounds good, I can quickly do this.

stephengreen commented 1 month ago

Why is it still there?