Skip to content

Bug: The threads configuration is not effective on python #592

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

Open
2 of 3 tasks
youzif opened this issue Apr 17, 2025 · 4 comments
Open
2 of 3 tasks

Bug: The threads configuration is not effective on python #592

youzif opened this issue Apr 17, 2025 · 4 comments
Labels
bug Something isn't working

Comments

@youzif
Copy link

youzif commented Apr 17, 2025

Describe the bug

  1. When loading multiple index files, threads can only set 1, and other values will report an error
    segmentation fault (core dumped)
        data_indices= Indexes(
                paths=data_files,
                view=False,
                threads=1
            )
  1. threads also have no effect in index.search
    .search(vector[0], topk,threads=10)

Steps to reproduce

python version: Python 3.13.2
usearch version: 2.17.7

Expected behavior

The threads parameter takes effect

USearch version

2.17.7

Operating System

Ubuntu 22.04

Hardware architecture

x86

Which interface are you using?

C++ implementation

Contact Details

No response

Are you open to being tagged as a contributor?

  • I am open to being mentioned in the project .git history as a contributor

Is there an existing issue for this?

  • I have searched the existing issues

Code of Conduct

  • I agree to follow this project's Code of Conduct
@youzif youzif added the bug Something isn't working label Apr 17, 2025
@youzif youzif changed the title Bug: The threads configuration is not effective Bug: The threads configuration is not effective on python Apr 17, 2025
@youzif
Copy link
Author

youzif commented Apr 17, 2025

@ashvardanian hi Ash, Can you give me some explanations and suggestions ?

@ashvardanian
Copy link
Contributor

@youzif, thanks for spotting! I am working on something else the next week. Any chance you can diagnose and patch the issue yourself using the AI tools? Look into the lib.cpp file containing the Python binding.

@youzif
Copy link
Author

youzif commented Apr 18, 2025

@youzif, thanks for spotting! I am working on something else the next week. Any chance you can diagnose and patch the issue yourself using the AI tools? Look into the lib.cpp file containing the Python binding.

@ashvardanian Thank you for your reply . I want to quickly confirm that threads in usearch are expected to work normally in python, right?

@ashvardanian
Copy link
Contributor

Yes, @youzif, they are expected to work fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants