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

Feature/parallel hill climb search #1259

Open
wants to merge 9 commits into
base: dev
Choose a base branch
from

Conversation

ssuyash28
Copy link

@ssuyash28 ssuyash28 commented Apr 30, 2020

Your checklist for this pull request

Please review the guidelines for contributing to this repository.

  • Make sure you are requesting to pull a topic/feature/bugfix branch (right side). Don't request your master!
  • Make sure you are making a pull request against the dev branch (left side). Also you should start your branch off our dev.
  • Check the commit's or even all commits' message styles matches our requested structure.

Fixes # .

Changes

  • Used joblib for calculating scores for '+', '-' and 'flip' operations parallelly.
  • Added a function '_operation_execution' for enabling parallel processing.
  • Added a parameter n_jobs (int)(maximum number of concurrently running jobs) with default value -1.

@codecov
Copy link

codecov bot commented May 1, 2020

Codecov Report

Merging #1259 into dev will increase coverage by 0.25%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev    #1259      +/-   ##
==========================================
+ Coverage   92.04%   92.29%   +0.25%     
==========================================
  Files         135      133       -2     
  Lines       13210    12642     -568     
==========================================
- Hits        12159    11668     -491     
+ Misses       1051      974      -77     
Impacted Files Coverage Δ
pgmpy/estimators/HillClimbSearch.py 98.76% <100.00%> (+0.06%) ⬆️
pgmpy/readwrite/__init__.py 100.00% <0.00%> (ø)
pgmpy/tests/test_readwrite/test_ProbModelXML.py
pgmpy/readwrite/ProbModelXML.py

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9768584...7983e04. Read the comment docs.

@ankurankan
Copy link
Member

@ssuyash28 Thanks a lot for the PR. I have a couple of comments about this PR:

  1. If I am understanding things correctly, making the algorithm parallel should make the algorithm non-deterministic i.e. the results could differ in different runs of the algorithm as the operation being selected could depend on the order of execution. Right? And if that is the case, I think we should add that as a warning in the documentation.
  2. Did you by any chance check whether parallelization improves the runtime of the algorithm as parallelization would add extra overhead too? Or for what graph sizes do we start to see any substantial improvement. I think it would be nice to add that to the documentation as well, as a suggestion for when to use parallelization.

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

Successfully merging this pull request may close these issues.

None yet

2 participants