erdogant / bnlearn

Python library for learning the graphical structure of Bayesian networks, parameter learning, inference and sampling methods.
https://erdogant.github.io/bnlearn
Other
463 stars 45 forks source link

Limit core/mem usage #54

Closed gregl83 closed 2 years ago

gregl83 commented 2 years ago

Is it possible to limit the system resource usage?

I've seen some structured learning execution exhaust system resources preventing SSH to a remote server.

erdogant commented 2 years ago

I added the n_jobs where possible. If you set verbose=4, the message whether n_jobs is supported or not will be shown. At this point, it is supported for the chow-liu/TAN method in structure_learning and BayesianEstimator in parameter_learning.

update to the latest version with: pip install -U bnlearn

hallavar commented 2 years ago

I added the n_jobs where possible. If you set verbose=4, the message whether n_jobs is supported or not will be shown. At this point, it is supported for the chow-liu/TAN method in structure_learning and BayesianEstimator in parameter_learning.

Do you know if it will be available on the other methods, for example Hill Climbing for structure learning and MLE for the probability learning part ?

For the moment, I can only use chow-liu combined with BE otherwise the process gets killed.

Thanks for your work.