Skip to content

Commit da7a1ef

Browse files
committed
move code from Turing
1 parent 8f1a844 commit da7a1ef

10 files changed

+2348
-1
lines changed

Diff for: Project.toml

+6
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ uuid = "366bfd00-2699-11ea-058f-f148b4cae6d8"
33
authors = ["mohamed82008 <[email protected]>"]
44
version = "0.1.0"
55

6+
[deps]
7+
AbstractMCMC = "80f14c24-f653-4e6a-9b94-39d6b0f70001"
8+
Bijectors = "76274a88-744f-5084-9051-94815aaf08c4"
9+
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
10+
MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
11+
612
[compat]
713
julia = "1"
814

Diff for: src/DynamicPPL.jl

+84-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,88 @@
11
module DynamicPPL
22

3-
greet() = print("Hello World!")
3+
using AbstractMCMC: AbstractSampler, AbstractChains, AbstractModel
4+
using Distributions: UnivariateDistribution,
5+
MultivariateDistribution,
6+
MatrixDistribution,
7+
Distribution
8+
using Bijectors: link, invlink
9+
using MacroTools
10+
11+
import Base: string,
12+
Symbol,
13+
==,
14+
hash,
15+
in,
16+
getindex,
17+
setindex!,
18+
push!,
19+
show,
20+
isempty,
21+
empty!,
22+
getproperty,
23+
setproperty!,
24+
keys,
25+
haskey
26+
27+
# VarInfo
28+
export VarName,
29+
AbstractVarInfo,
30+
VarInfo,
31+
UntypedVarInfo,
32+
getlogp,
33+
setlogp!,
34+
acclogp!,
35+
resetlogp!,
36+
set_retained_vns_del_by_spl!,
37+
is_flagged,
38+
unset_flag!,
39+
setgid!,
40+
updategid!,
41+
setorder!,
42+
istrans,
43+
link!,
44+
invlink!,
45+
tonamedtuple,
46+
# Compiler
47+
ModelGen,
48+
@model,
49+
@varname,
50+
@varinfo,
51+
@logpdf,
52+
@sampler,
53+
# Utilities
54+
vectorize,
55+
reconstruct,
56+
reconstruct!,
57+
Sample,
58+
Chain,
59+
init,
60+
vectorize,
61+
set_resume!,
62+
# Model
63+
Model,
64+
getmissing,
65+
# Contexts
66+
DefaultContext,
67+
LikelihoodContext,
68+
PriorContext,
69+
MiniBatchContext,
70+
# Prob macros
71+
@prob_str,
72+
@logprob_str
73+
74+
# Used here and overloaded in Turing
75+
function getspace end
76+
function tilde end
77+
function dot_tilde end
78+
79+
include("utils.jl")
80+
include("selector.jl")
81+
include("model.jl")
82+
include("sampler.jl")
83+
include("contexts.jl")
84+
include("varinfo.jl")
85+
include("compiler.jl")
86+
include("prob_macro.jl")
487

588
end # module

0 commit comments

Comments
 (0)