Skip to content

Use transformers as optional dependency #360

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

Merged
merged 1 commit into from
Jan 27, 2025

Conversation

albertvillanova
Copy link
Member

@albertvillanova albertvillanova commented Jan 26, 2025

Use transformers as optional dependency.

Transformers is now an optional dependency, but we made a regression and we require it at import time as a required dependency. This raises a ModuleNotFoundError when smolagents is installed with no extra.

This PR fixes the use of transformers, as an optional dependency.

I think we need to make a patch release.

Fix #357.

CC: @aymeric-roucher

Copy link
Contributor

@Wauplin Wauplin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@albertvillanova albertvillanova merged commit 39133ac into huggingface:main Jan 27, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Do I need to manually install transformers module?
2 participants