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

Improve performance of logdensity computation #228

Merged
merged 7 commits into from
Oct 25, 2024

Conversation

sunxd3
Copy link
Member

@sunxd3 sunxd3 commented Oct 24, 2024

No description provided.

Copy link
Contributor

github-actions bot commented Oct 24, 2024

BridgeStan not found at location specified by $BRIDGESTAN environment variable, downloading version 2.5.0 to /home/runner/.bridgestan/bridgestan-2.5.0
Done!
Model dogs produces error: ErrorException("log_density() failed with exception: Exception: bernoulli_lpmf: Probability parameter is inf, but must be in the interval [0, 1] (in '/home/runner/work/JuliaBUGS.jl/JuliaBUGS.jl/benchmark/stan/bugs_examples/vol1/dogs/dogs.stan', line 37, column 6 to line 38, column 62)\n")

Model Parameter Count Data Count Stan Density Time (µs) Stan Density Gradient Time (µs) JuliaBUGS Density Time with Graph Walk (µs) JuliaBUGS Density Gradient Time with ReverseDiff.jl(compiled tape) (µs)
rats 65 150 5.7026 8.34567 280.256 88.544
pumps 12 10 1.00566 1.38214 29.525 7.76133
dogs 2 720 NA NA 767.848 148.186
seeds 26 21 2.45458 3.22822 71.132 19.837
surgical_realistic 14 12 1.26626 1.72544 40.685 8.569
magnesium 108 96 10.525 12.373 393.096 84.297
salm 22 18 2.36608 2.99556 59.271 12.468
equiv 15 20 2.49273 3.35625 48.159 15.85
dyes 9 30 0.992929 1.33932 30.466 15.639
stacks 6 21 1.13327 1.71435 95.437 15.198
epil 303 236 33.953 39.584 885.286 253.662
blockers 47 44 3.22933 3.6555 164.326 30.797
oxford 244 240 16.12 18.8345 1055.34 206.985
lsat 1006 5000 180.635 222.513 10099.5 1376.2
bones 33 422 73.486 90.638 2587.04 192.037
mice 20 65 7.316 9.49433 79.2325 40.094
kidney 64 58 10.74 16.311 181.923 76.832
leuk 18 714 20.598 26.75 838.69 233.885
leukfr 40 714 24.135 31.939 981.591 240.878

sunxd3 and others added 3 commits October 25, 2024 07:54
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@coveralls
Copy link

coveralls commented Oct 25, 2024

Pull Request Test Coverage Report for Build 11515715686

Details

  • 28 of 29 (96.55%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.1%) to 77.821%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/model.jl 28 29 96.55%
Totals Coverage Status
Change from base Build 11494108749: 0.1%
Covered Lines: 1386
Relevant Lines: 1781

💛 - Coveralls

@sunxd3
Copy link
Member Author

sunxd3 commented Oct 25, 2024

this PR reduces the logdensity evaluation time of Rats from 6ms to about 0.3ms (#227 (comment))

@sunxd3 sunxd3 merged commit ce29cc1 into master Oct 25, 2024
13 checks passed
@sunxd3 sunxd3 deleted the sunxd/improve_logdensity_eval branch October 25, 2024 11:42
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.

2 participants