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

Test that bitsandbytes is not imported when it's not used #351

Merged
merged 3 commits into from
Jul 14, 2023

Conversation

borzunov
Copy link
Collaborator

@borzunov borzunov commented Jul 14, 2023

We avoid importing bitsandbytes when it's not used, since bitsandbytes doesn't always find correct CUDA libs and may raise exceptions because of that.

@@ -43,7 +43,7 @@ def test_sequence_manager_basics(mode: str):
assert shutdown_evt.is_set()


class TestSequenceManager(RemoteSequenceManager):
class RemoteSequenceManagerWithChecks(RemoteSequenceManager):
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

pytest thinks that classes whose name starts with Test are test cases and raises warnings during test collection. Fixing that.

@@ -33,7 +33,7 @@ python_requires = >=3.7
install_requires =
torch>=1.12
bitsandbytes==0.40.0.post4
accelerate>=0.16.0,<1.0.0
accelerate>=0.16.0,<0.21.0
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

accelerate 0.21.0 released yesterday imports bnb automatically if it's installed :( Maybe this will change in future.

@borzunov borzunov merged commit 1a78638 into main Jul 14, 2023
7 checks passed
@borzunov borzunov deleted the test-bnb-not-imported branch July 14, 2023 14:40
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.

None yet

2 participants