Tractables / ProbabilisticCircuits.jl

Probabilistic Circuits from the Juice library
https://tractables.github.io/ProbabilisticCircuits.jl/dev
Apache License 2.0
104 stars 11 forks source link

Gpu refactor #96

Closed khosravipasha closed 3 years ago

khosravipasha commented 3 years ago

The tests are passing (both on github actions and on gpu)

Breaking Changes:

  1. Removal of use_gpu, if want a query to be run on gpu then need to move the data to gpu first. Now juice decides between where to run based on where the data is. This avoids accidently moving stuff between cpu/gpu all the time.

  2. Removal of use_sample_weights: did not seem necessary as you can check isweighted(data) (already done in the code logic, seemed redundant)

  3. Rename uniform_parameters to uniform_parameters! as its changing the circuit parameters.

  4. rename estimate_paramters_em to something like estimate_paramters_em!

  5. rename estimate_parameters_cached! to e update_pc_paramters_from_pbc!

  6. rename estimate_parameters to estimate_parameters!

  7. Few other renames to add ! indicating change

Non-breaking changes:

codecov[bot] commented 3 years ago

Codecov Report

Merging #96 (a391746) into master (31a2d33) will decrease coverage by 1.69%. The diff coverage is 49.75%.

:exclamation: Current head a391746 differs from pull request most recent head 8faf902. Consider uploading reports for the commit 8faf902 to get more accurate results Impacted file tree graph

@@            Coverage Diff             @@
##           master      #96      +/-   ##
==========================================
- Coverage   70.19%   68.49%   -1.70%     
==========================================
  Files          39       39              
  Lines        3214     3276      +62     
==========================================
- Hits         2256     2244      -12     
- Misses        958     1032      +74     
Impacted Files Coverage Δ
src/ProbabilisticCircuits.jl 100.00% <ø> (ø)
src/factor_graph/fg_compile.jl 56.41% <ø> (ø)
src/io/clt_io.jl 73.68% <ø> (ø)
src/io/io.jl 90.00% <ø> (ø)
src/io/plot.jl 0.00% <ø> (ø)
src/parameter_learn/param_bit_circuit.jl 93.10% <ø> (ø)
src/queries/map.jl 54.54% <0.00%> (-1.27%) :arrow_down:
src/queries/sample.jl 44.11% <0.00%> (-1.34%) :arrow_down:
src/structurelearner/chow_liu_tree.jl 100.00% <ø> (ø)
src/structurelearner/vtree_learner.jl 96.66% <ø> (ø)
... and 16 more

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 31a2d33...8faf902. Read the comment docs.