File tree Expand file tree Collapse file tree 4 files changed +50
-4
lines changed
Expand file tree Collapse file tree 4 files changed +50
-4
lines changed Original file line number Diff line number Diff line change 1+ name : Compile models
2+
3+ on :
4+ push :
5+ branches : [ master ]
6+ pull_request :
7+ branches : [ master ]
8+
9+ jobs :
10+ build :
11+
12+ runs-on : ubuntu-latest
13+
14+ steps :
15+ - uses : actions/setup-python@v2
16+ with :
17+ python-version : ' 3.x'
18+ architecture : ' x64'
19+
20+ - uses : actions/checkout@v2
21+ with :
22+ repository : ' stan-dev/performance-tests-cmdstan'
23+ submodules : recursive
24+
25+ - uses : actions/checkout@v2
26+ with :
27+ path : ' example-models-new'
28+ fetch-depth : 0
29+
30+ - name : Write modified models
31+ run : |
32+ cd example-models-new
33+ echo "example-models-new/basic_distributions/binormal.stan" > ../test-models.txt
34+ git diff --name-only origin/master $GITHUB_SHA --diff-filter=AM | grep ".stan$" | sed -e 's/^/example-models-new\//' >> ../test-models.txt
35+
36+ - name : Compile all new or modified models
37+ run : |
38+ cd cmdstan
39+ make build
40+ cd ..
41+ ./runPerformanceTests.py --runs=0 --tests-file test-models.txt
Original file line number Diff line number Diff line change @@ -11,6 +11,10 @@ model {
1111}
1212generated quantities {
1313 int < lower = 0 , upper = 1 > is_best[K];
14- for (k in 1 : K)
15- is_best[k] = (theta[k] >= best_prob);
14+ {
15+ real best_prob = max( theta);
16+ for (k in 1 : K) {
17+ is_best[k] = (theta[k] >= best_prob);
18+ }
19+ }
1620}
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ model {
2828 beta0 ~ normal (0.0 , 1.0 );
2929 beta1 ~ normal (0.0 , 1.0 );
3030 sigma ~ normal (0.0 , 1.0 );
31- phi ~ icar_normal_lpdf (N, node1, node2);
31+ phi ~ icar_normal (N, node1, node2);
3232 // soft sum-to-zero constraint on phi
3333 // more efficient than mean(phi) ~ normal(0, 0.001)
3434 sum( phi) ~ normal (0 , 0.001 * N);
Original file line number Diff line number Diff line change @@ -39,7 +39,8 @@ model {
3939 to_vector( beta) ~ normal (0 , 2 );
4040
4141 // likelihood
42- y[n] ~ categorical_logit (v[ , n]);
42+ for (n in 1 : N)
43+ y[n] ~ categorical_logit (v[ , n]);
4344}
4445
4546
You can’t perform that action at this time.
0 commit comments