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 set the number of cores used by GRNboost2 #34

Open
divyanshusrivastava opened this issue Mar 13, 2023 · 1 comment
Open

How to set the number of cores used by GRNboost2 #34

divyanshusrivastava opened this issue Mar 13, 2023 · 1 comment

Comments

@divyanshusrivastava
Copy link

I cannot find any parameter which limits the number of cores used in GRNboost2. I am using a shared server, and my code is blocking all the resource available. Wha tcould be way the limit it to only use a predefined number of nodes, similar to '--num-worker' argument in the command line grnboost call. ?

@divyanshusrivastava
Copy link
Author

divyanshusrivastava commented Mar 13, 2023

One way of doing this could be to create a client with a local cluster already set to the number of workers to use. Something like

from distributed import Client, LocalCluster
client = Client(LocalCluster(
name='grn_call',
n_workers=4,
threads_per_worker=4
))

adjacencies = grnboost2(
ex_matrix,
tf_names=tf_names,
client_or_address=client
)

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

1 participant