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

How to control number of threads? #63

Open
SmilingYogi opened this issue Oct 10, 2024 · 4 comments
Open

How to control number of threads? #63

SmilingYogi opened this issue Oct 10, 2024 · 4 comments

Comments

@SmilingYogi
Copy link

I am using grape.embedders.Node2VecGloVeEnsmallen in an environment where there is a strict limit on number of threads being spawned. I could not find any argument that sets the number of threads.

Is there a recommended way to work around this?

@LucaCappelletti94
Copy link
Member

Try setting the RAYON_NUM_THREADS system variable.

@SmilingYogi
Copy link
Author

Thanks for the reply! Is there any way to do it within the grape functions only?

@LucaCappelletti94
Copy link
Member

Not for those using Rayon for parallelism such as Node2VecGloVeEnsmallen. The ones that were straightforwardly possible to set it via a parameter are already available as kwargs.

@SmilingYogi
Copy link
Author

Okay. Can you point me to any Node2Vec or similar embedding methods where I can set it via a parameter?

Thanks!

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

No branches or pull requests

2 participants