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

transformers-cli now requires PyTorch #36244

Open
setu4993 opened this issue Feb 17, 2025 · 1 comment
Open

transformers-cli now requires PyTorch #36244

setu4993 opened this issue Feb 17, 2025 · 1 comment
Labels

Comments

@setu4993
Copy link
Contributor

setu4993 commented Feb 17, 2025

System Info

N/A

Who can help?

@gante (author of #35714)

Reproduction

uv run --python 3.12 --with transformers transformers-cli --help

Expected behavior

Since #35714 (released in v4.49.0), the transformers-cli now requires PyTorch to even run a simple: transformers-cli --help command.

I am pretty sure it is originating from this line.

My question is if this is intentional or unintentional. So far, PyTorch has been an optional dependency for any functionality with CLI or the package itself.

@setu4993 setu4993 added the bug label Feb 17, 2025
@Rocketknight1
Copy link
Member

Seems real, and I don't think we should require Torch for transformers-cli. I think this is probably a testing failure more than anything, though - cc @gante, maybe we should have tests for transformers-cli that don't @require_torch so we catch things like this in future?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants