This repository has been archived by the owner on Nov 1, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 56
179 lines (171 loc) · 6.22 KB
/
models.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
name: Test Models
on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main
jobs:
test-turing:
name: Test Turing Models
runs-on: ubuntu-latest
env:
JULIA_NUM_THREADS: "auto"
strategy:
matrix:
jl-file: [
"01-predictive_checks.jl",
"02-linear_regression-kidiq.jl",
"03-logistic_regression-wells.jl",
"04-ordinal_regression-esoph.jl",
"05-poisson_regression-roaches.jl",
"06-robust_linear_regression-duncan.jl",
#"07-robust_beta_binomial_regression-wells.jl", # FIXME: broken
#"08-robust_robit_regression-wells.jl", # FIXME: broken
"09-robust_negative_binomial_regression-roaches.jl",
"10-robust_zero_inflated_regression-negative_binomial-roaches.jl",
"10-robust_zero_inflated_regression-poisson-roaches.jl",
"11-sparse_horseshoe.jl",
"12-sparse_horseshoe_p.jl",
"13-sparse_finnish_horseshoe.jl",
"14-sparse_r2d2.jl",
"15-hierarchical_varying_intercept-cheese.jl",
"15-hierarchical_varying_intercept-non_centered-cheese.jl",
"16-hierarchical_varying_intercept_slope-cheese.jl",
#"17-model_comparison-roaches.jl", # FIXME: broken upstream in ParetoSmooth.jl
]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v14
- name: Cache Nix artifacts
uses: DeterminateSystems/magic-nix-cache-action@v8
- name: Test ${{ matrix.jl-file }}
run: |
nix develop -L . --command bash -c "julia -e 'using Pkg; Pkg.instantiate()'"
nix develop -L . --command bash -c "julia turing/${{ matrix.jl-file }}"
test-stan:
name: Test Stan Models
runs-on: ubuntu-latest
strategy:
matrix:
stan:
[
{
model: "01-predictive_checks-posterior",
data: "coin_flip.data.json",
},
{
model: "01-predictive_checks-prior",
data: "coin_flip.data.json",
},
{ model: "02-linear_regression-QR", data: "kidiq.data.json" },
{
model: "02-linear_regression-optimized",
data: "kidiq.data.json",
},
{ model: "02-linear_regression", data: "kidiq.data.json" },
{
model: "03-logistic_regression-optimized",
data: "wells.data.json",
},
{ model: "03-logistic_regression", data: "wells.data.json" },
{
model: "04-ordinal_regression-optimized",
data: "esoph.data.json",
},
{ model: "04-ordinal_regression", data: "esoph.data.json" },
{
model: "05-poisson_regression-optimized",
data: "roaches.data.json",
},
{ model: "05-poisson_regression", data: "roaches.data.json" },
{ model: "06-robust_linear_regression", data: "kidiq.data.json" },
{
model: "07-robust_beta_binomial_regression",
data: "wells.data.json",
},
{ model: "08-robust_robit_regression", data: "wells.data.json" },
{
model: "09-robust_negative_binomial_regression-optimized",
data: "roaches.data.json",
},
{
model: "09-robust_negative_binomial_regression",
data: "roaches.data.json",
},
{
model: "10-robust_zero_inflated_regression-negative_binomial-optimized",
data: "roaches.data.json",
},
{
model: "10-robust_zero_inflated_regression-negative_binomial",
data: "roaches.data.json",
},
{
model: "10-robust_zero_inflated_regression-poisson-optimized",
data: "roaches.data.json",
},
{
model: "10-robust_zero_inflated_regression-poisson",
data: "roaches.data.json",
},
{
model: "11-sparse_horseshoe_regression",
data: "sparse_regression.data.json",
},
{
model: "12-sparse_horseshoe_p_regression",
data: "sparse_regression.data.json",
},
{
model: "13-sparse_finnish_horseshoe_regression",
data: "sparse_regression.data.json",
},
{
model: "14-sparse_r2d2_regression",
data: "sparse_regression.data.json",
},
{
model: "15-hierarchical_varying_intercept-non_centered",
data: "cheese.data.json",
},
{
model: "15-hierarchical_varying_intercept",
data: "cheese.data.json",
},
{
model: "16-hierarchical_varying_intercept_slope",
data: "cheese.data.json",
},
{
model: "17-model_comparison-negative_binomial",
data: "roaches.data.json",
},
{ model: "17-model_comparison-poisson", data: "roaches.data.json" },
{
model: "17-model_comparison-zero_inflated-negative_binomial",
data: "roaches.data.json",
},
{
model: "17-model_comparison-zero_inflated-poisson",
data: "roaches.data.json",
},
]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v14
- name: Cache Nix artifacts
uses: DeterminateSystems/magic-nix-cache-action@v8
- name: Test ${{ matrix.stan.model }}
run: |
echo "Compiling: ${{ matrix.stan.model }}"
nix develop -L . --command bash -c "stan stan/${{ matrix.stan.model }}"
nix develop -L . --command bash -c "stan/${{ matrix.stan.model }} sample num_chains=4 data file=stan/${{ matrix.stan.data }}"
nix develop -L . --command bash -c "stansummary output_*.csv"