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

Update README, add section on parallel and distributed sampling #109

Merged
merged 1 commit into from
Oct 12, 2023

Conversation

sunxd3
Copy link
Member

@sunxd3 sunxd3 commented Sep 26, 2023

Fix #70

@sunxd3 sunxd3 changed the title Update README, add parallel sampling Update README, add section on parallel and distributed sampling Sep 26, 2023
@sunxd3 sunxd3 requested a review from yebai September 26, 2023 08:45
@codecov
Copy link

codecov bot commented Sep 26, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (e3f5487) 71.42% compared to head (7b9c54c) 71.42%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #109   +/-   ##
=======================================
  Coverage   71.42%   71.42%           
=======================================
  Files          16       16           
  Lines        1673     1673           
=======================================
  Hits         1195     1195           
  Misses        478      478           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@yebai
Copy link
Member

yebai commented Sep 26, 2023

Let's add this information to the docs instead of README. We also want to transfer other README materials to docs gradually.

Can you also add a test for parallel and distributed sampling? This AbstractMCMC example shows how to test this rigorously.

@sunxd3
Copy link
Member Author

sunxd3 commented Sep 26, 2023

Of course, adding to doc is better. Thanks for the link also.


function ForExpr(expr)
processed_expr = only(loop_fission_helper(expr))
T = Union{Int, Symbol, Expr}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
T = Union{Int, Symbol, Expr}
T = Union{Int,Symbol,Expr}

end
end
sub_expr
end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
end
end

for (i, id) in enumerate(idx)
if id isa Number # good
elseif id isa Symbol
id = le.loop_bounds[findfirst(x->x==id, le.loop_vars)][2]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
id = le.loop_bounds[findfirst(x->x==id, le.loop_vars)][2]
id = le.loop_bounds[findfirst(x -> x == id, le.loop_vars)][2]

if MacroTools.@capture(se, l_:h_)
h
elseif se in le.loop_vars
le.loop_bounds[findfirst(x->x==se, le.loop_vars)][2]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
le.loop_bounds[findfirst(x->x==se, le.loop_vars)][2]
le.loop_bounds[findfirst(x -> x == se, le.loop_vars)][2]

test_e = @bugs begin
for i in 1:N
for j in 1:M
Y[i:i+1, j:j+1] ~ Normal(mu[i, j], sigma)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
Y[i:i+1, j:j+1] ~ Normal(mu[i, j], sigma)
Y[i:(i + 1), j:(j + 1)] ~ Normal(mu[i, j], sigma)

test/bugsast.jl Outdated
Comment on lines 160 to 161
@test repr(JuliaBUGS.sort_expressions(expr)) ==
repr(@bugs begin
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
@test repr(JuliaBUGS.sort_expressions(expr)) ==
repr(@bugs begin
@test repr(JuliaBUGS.sort_expressions(expr)) == repr(@bugs begin

test/bugsast.jl Outdated
Comment on lines 165 to 166
for i = 1:N
for j = 1:T
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
for i = 1:N
for j = 1:T
for i in 1:N
for j in 1:T

test/bugsast.jl Outdated
Comment on lines 177 to 178
for i = 1:N
for j = 1:T
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
for i = 1:N
for j = 1:T
for i in 1:N
for j in 1:T

test/bugsast.jl Outdated
end
end

for i = 1:N
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
for i = 1:N
for i in 1:N

test/bugsast.jl Outdated
alpha[i] ~ dnorm(var"alpha.c", var"alpha.tau")
end

for i = 1:N
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
for i = 1:N
for i in 1:N

@sunxd3 sunxd3 force-pushed the sunxd/add_parallel_readme branch from a334e63 to 7b9c54c Compare October 8, 2023 10:29
@yebai yebai merged commit 2ddfdcb into master Oct 12, 2023
@yebai yebai deleted the sunxd/add_parallel_readme branch October 12, 2023 12:26
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.

Assess the possibility of doing parallel sampling and add to documentations.
2 participants