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

Fix: Now uses device if set in cli parameters #141

Merged
merged 2 commits into from
Dec 2, 2024

Conversation

mahenning
Copy link
Collaborator

No description provided.

@mahenning
Copy link
Collaborator Author

The fix in the second commit was tricky, if you use

from .misc import SCRAIBE_NUM_THREADS

then SCRAIBE_NUM_THREADS becomes a local copy in the file. If SCRAIBE_NUM_THREADS in misc is later changed, the local copy stays the same in the file it was imported ealier. So when using it as a default parameter in load_model() after changing it in set_threads(), the default parameter in load_model() has the initial value it had when loading everything in the __init__.py.

@JSchmie JSchmie merged commit 931f50c into develop Dec 2, 2024
4 checks passed
@JSchmie JSchmie deleted the fix-inference-device-setting branch December 2, 2024 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants