Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Putting torch dependency behind an Extra flag #1449

Open
istrupin opened this issue Dec 5, 2024 · 0 comments
Open

Putting torch dependency behind an Extra flag #1449

istrupin opened this issue Dec 5, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@istrupin
Copy link

istrupin commented Dec 5, 2024

🚀 The feature

In order to avoid a potentially ~6 GB library size, I'd like to put the torch dependency behind an Extra flag, so users could opt into it.

Motivation, pitch

When torch was added as a dependency in 2.3.1, the library size increases dramatically. On my Apple silicon mac, the size went from ~600mb to ~2gb. When running on a fresh Debian build box, the size was ~6gb (as torch will pull in nvidia dependencies on linux)

Looking through the code, it seems that torch is not explicitly used anywhere, so I imagine it is a transitive dependency for another feature.

I'd like to suggest putting the torch dependency behind an Extra flag (similar to the Excel extra, for example), so users could opt into it if they don't mind the large size.

Alternatives

Currently, I downgraded to 2.3.0, which does not have the torch dependency. I also tried going into my libs and removing torch/nvidia dependencies manually which drastically reduced image size, and core functionality seemed to be unharmed.

Additional context

No response

@dosubot dosubot bot added the enhancement New feature or request label Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant