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

Add transformers to required deps #1295

Closed
wants to merge 1 commit into from

Conversation

mcognetta
Copy link

This resolves #1263, which I also ran into.

Slightly unrelated: It seems like also numpy should be pinned to < 2.0 to avoid an error upon importing ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject. I can open a new issue for this.

@rlouf rlouf mentioned this pull request Nov 28, 2024
8 tasks
@rlouf
Copy link
Member

rlouf commented Nov 28, 2024

Thank you for opening a PR! I opened a new PR #1296 which includes your changes as part of fixing more things related to the imports.

@rlouf rlouf closed this Nov 28, 2024
rlouf added a commit that referenced this pull request Nov 28, 2024
Users are currently running into install issues. After a clean install
of `outlines` they get an error message that asks for `transformers` to
be installed. This should not be the case, as the library is not
required for every integration. In this PR we remove `transformers` and
`datasets` top-level imports, and add per-integration optional
dependencies.

## TODO
- [x] Test `import outlines` from clean install
- [x] Test installing outlines with vLLM optional dependencies
- [x] Test installing outlines with MLX optional dependencies
- [x] Test installing outlines with transformers optional dependencies
- [x] Test installing outlines with llama-cpp optional dependencies
- [x] Test installing outlines with exllamav2 optional dependencies
- [x] Test installing outlines with openai optional dependencies
- [x] Update the documentation

Supersedes #1295.  Fixes #1263.
@mcognetta mcognetta deleted the add_transformers_dep branch November 29, 2024 01:09
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.

Missing dependency transformers upon fresh install
2 participants