Skip to content

Commit 66db349

Browse files
committed
Deploying to gh-pages from @ 606e518 🚀
1 parent ca11049 commit 66db349

44 files changed

Lines changed: 507 additions & 500 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

dev/articles/cmdstanr-internals.html

Lines changed: 35 additions & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev/articles/cmdstanr-internals.md

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,11 @@ compilation approach described above).
171171

172172
``` r
173173
mod_pedantic <- cmdstan_model(stan_file_pedantic, pedantic = TRUE)
174-
Warning in '/tmp/RtmpM8Rch6/model-382c687e72da.stan', line 8, column 2 to column 14:
174+
Warning in '/tmp/RtmpZ0UojA/model-388b62da9ab7.stan', line 8, column 2 to column 14:
175175
The parameter lambda has no priors. This means either no prior is
176176
provided, or the prior(s) depend on data variables. In the later case,
177177
this may be a false positive.
178-
Warning in '/tmp/RtmpM8Rch6/model-382c687e72da.stan', line 11, column 14 to column 20:
178+
Warning in '/tmp/RtmpZ0UojA/model-388b62da9ab7.stan', line 11, column 14 to column 20:
179179
A poisson distribution is given parameter lambda as a rate parameter
180180
(argument 1), but lambda was not constrained to be strictly positive.
181181
```
@@ -185,11 +185,11 @@ argument to the `$check_syntax()` method.
185185

186186
``` r
187187
mod_pedantic$check_syntax(pedantic = TRUE)
188-
Warning in '/tmp/RtmpM8Rch6/model_287cd4f50e093cb87805d29fd774bdf8.stan', line 8, column 2 to column 14:
188+
Warning in '/tmp/RtmpZ0UojA/model_287cd4f50e093cb87805d29fd774bdf8.stan', line 8, column 2 to column 14:
189189
The parameter lambda has no priors. This means either no prior is
190190
provided, or the prior(s) depend on data variables. In the later case,
191191
this may be a false positive.
192-
Warning in '/tmp/RtmpM8Rch6/model_287cd4f50e093cb87805d29fd774bdf8.stan', line 11, column 14 to column 20:
192+
Warning in '/tmp/RtmpZ0UojA/model_287cd4f50e093cb87805d29fd774bdf8.stan', line 11, column 14 to column 20:
193193
A poisson distribution is given parameter lambda as a rate parameter
194194
(argument 1), but lambda was not constrained to be strictly positive.
195195
Stan program is syntactically correct
@@ -207,11 +207,11 @@ rm(mod_pedantic)
207207

208208
mod_pedantic <- cmdstan_model(stan_file_pedantic, compile = FALSE)
209209
mod_pedantic$check_syntax(pedantic = TRUE)
210-
Warning in '/tmp/RtmpM8Rch6/model_287cd4f50e093cb87805d29fd774bdf8.stan', line 8, column 2 to column 14:
210+
Warning in '/tmp/RtmpZ0UojA/model_287cd4f50e093cb87805d29fd774bdf8.stan', line 8, column 2 to column 14:
211211
The parameter lambda has no priors. This means either no prior is
212212
provided, or the prior(s) depend on data variables. In the later case,
213213
this may be a false positive.
214-
Warning in '/tmp/RtmpM8Rch6/model_287cd4f50e093cb87805d29fd774bdf8.stan', line 11, column 14 to column 20:
214+
Warning in '/tmp/RtmpZ0UojA/model_287cd4f50e093cb87805d29fd774bdf8.stan', line 11, column 14 to column 20:
215215
A poisson distribution is given parameter lambda as a rate parameter
216216
(argument 1), but lambda was not constrained to be strictly positive.
217217
Stan program is syntactically correct
@@ -454,10 +454,10 @@ CmdStan to CSV files in a temporary directory.
454454
fit$output_files()
455455
```
456456

457-
[1] "/tmp/RtmpM8Rch6/bernoulli-202607202221-1-5be364.csv"
458-
[2] "/tmp/RtmpM8Rch6/bernoulli-202607202221-2-5be364.csv"
459-
[3] "/tmp/RtmpM8Rch6/bernoulli-202607202221-3-5be364.csv"
460-
[4] "/tmp/RtmpM8Rch6/bernoulli-202607202221-4-5be364.csv"
457+
[1] "/tmp/RtmpZ0UojA/bernoulli-202607212041-1-5be3c3.csv"
458+
[2] "/tmp/RtmpZ0UojA/bernoulli-202607212041-2-5be3c3.csv"
459+
[3] "/tmp/RtmpZ0UojA/bernoulli-202607212041-3-5be3c3.csv"
460+
[4] "/tmp/RtmpZ0UojA/bernoulli-202607212041-4-5be3c3.csv"
461461

462462
These files will be lost if you end your R session or if you remove the
463463
`fit` object and force (or wait for) garbage collection.
@@ -477,8 +477,8 @@ gc()
477477
```
478478

479479
used (Mb) gc trigger (Mb) max used (Mb)
480-
Ncells 1248492 66.7 2560485 136.8 1652704 88.3
481-
Vcells 2164726 16.6 8388608 64.0 4950778 37.8
480+
Ncells 1248486 66.7 2560468 136.8 1652704 88.3
481+
Vcells 2164710 16.6 8388608 64.0 4950899 37.8
482482

483483
``` r
484484

@@ -682,7 +682,7 @@ str(csv_contents)
682682
..$ stan_version_major : num 2
683683
..$ stan_version_minor : num 39
684684
..$ stan_version_patch : num 0
685-
..$ start_datetime : chr "2026-07-20 22:21:33 UTC"
685+
..$ start_datetime : chr "2026-07-21 20:41:47 UTC"
686686
..$ method : chr "sample"
687687
..$ save_warmup : int 0
688688
..$ thin : num 1
@@ -703,7 +703,7 @@ str(csv_contents)
703703
..$ seed : num 31749990
704704
..$ refresh : num 100
705705
..$ sig_figs : num 8
706-
..$ profile_file : chr "/tmp/RtmpM8Rch6/bernoulli-profile-202607202221-1-2c6f34.csv"
706+
..$ profile_file : chr "/tmp/RtmpZ0UojA/bernoulli-profile-202607212041-1-2c6f93.csv"
707707
..$ save_cmdstan_config : int 0
708708
..$ stanc_version : chr "stanc3 v2.39.0"
709709
..$ sampler_diagnostics : chr [1:6] "accept_stat__" "stepsize__" "treedepth__" "n_leapfrog__" ...
@@ -720,8 +720,8 @@ str(csv_contents)
720720
..$ time :'data.frame': 4 obs. of 4 variables:
721721
.. ..$ chain_id: num [1:4] 1 2 3 4
722722
.. ..$ warmup : num [1:4] 0.002 0.002 0.002 0.002
723-
.. ..$ sampling: num [1:4] 0.005 0.005 0.004 0.005
724-
.. ..$ total : num [1:4] 0.007 0.007 0.006 0.007
723+
.. ..$ sampling: num [1:4] 0.005 0.005 0.005 0.005
724+
.. ..$ total : num [1:4] 0.007 0.007 0.007 0.007
725725
..$ stan_variable_sizes :List of 2
726726
.. ..$ lp__ : num 1
727727
.. ..$ theta: num 1
@@ -732,8 +732,8 @@ str(csv_contents)
732732
..$ chains:'data.frame': 4 obs. of 4 variables:
733733
.. ..$ chain_id: num [1:4] 1 2 3 4
734734
.. ..$ warmup : num [1:4] 0.002 0.002 0.002 0.002
735-
.. ..$ sampling: num [1:4] 0.005 0.005 0.004 0.005
736-
.. ..$ total : num [1:4] 0.007 0.007 0.006 0.007
735+
.. ..$ sampling: num [1:4] 0.005 0.005 0.005 0.005
736+
.. ..$ total : num [1:4] 0.007 0.007 0.007 0.007
737737
$ inv_metric :List of 4
738738
..$ 1: num 0.588
739739
..$ 2: num 0.545
@@ -793,10 +793,10 @@ fit <- mod$sample(data = data_list, save_latent_dynamics = TRUE)
793793
fit$latent_dynamics_files()
794794
```
795795

796-
[1] "/tmp/RtmpM8Rch6/bernoulli-diagnostic-202607202221-1-0571b9.csv"
797-
[2] "/tmp/RtmpM8Rch6/bernoulli-diagnostic-202607202221-2-0571b9.csv"
798-
[3] "/tmp/RtmpM8Rch6/bernoulli-diagnostic-202607202221-3-0571b9.csv"
799-
[4] "/tmp/RtmpM8Rch6/bernoulli-diagnostic-202607202221-4-0571b9.csv"
796+
[1] "/tmp/RtmpZ0UojA/bernoulli-diagnostic-202607212041-1-057218.csv"
797+
[2] "/tmp/RtmpZ0UojA/bernoulli-diagnostic-202607212041-2-057218.csv"
798+
[3] "/tmp/RtmpZ0UojA/bernoulli-diagnostic-202607212041-3-057218.csv"
799+
[4] "/tmp/RtmpZ0UojA/bernoulli-diagnostic-202607212041-4-057218.csv"
800800

801801
``` r
802802

@@ -885,18 +885,18 @@ options("cmdstanr_verbose"=TRUE)
885885
mod <- cmdstan_model(stan_file, force_recompile = TRUE)
886886
```
887887

888-
Running make /tmp/RtmpM8Rch6/model-382c61fcc19e \
888+
Running make /tmp/RtmpZ0UojA/model-388b2ceda99 \
889889
'STANCFLAGS += --name=bernoulli_model'
890890

891891
--- Translating Stan model to C++ code ---
892-
bin/stanc --name=bernoulli_model --o=/tmp/RtmpM8Rch6/model-382c61fcc19e.hpp /tmp/RtmpM8Rch6/model-382c61fcc19e.stan
892+
bin/stanc --name=bernoulli_model --o=/tmp/RtmpZ0UojA/model-388b2ceda99.hpp /tmp/RtmpZ0UojA/model-388b2ceda99.stan
893893

894894
--- Compiling C++ code ---
895-
g++ -Wno-deprecated-declarations -std=c++17 -pthread -D_REENTRANT -Wno-sign-compare -Wno-ignored-attributes -Wno-class-memaccess -I stan/lib/stan_math/lib/tbb_2020.3/include -O3 -I src -I stan/src -I stan/lib/rapidjson_1.1.0/ -I lib/CLI11-1.9.1/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.4.0 -I stan/lib/stan_math/lib/boost_1.87.0 -I stan/lib/stan_math/lib/sundials_6.1.1/include -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -DBOOST_DISABLE_ASSERTS -c -Wno-ignored-attributes -x c++ -o /tmp/RtmpM8Rch6/model-382c61fcc19e.o /tmp/RtmpM8Rch6/model-382c61fcc19e.hpp
895+
g++ -Wno-deprecated-declarations -std=c++17 -pthread -D_REENTRANT -Wno-sign-compare -Wno-ignored-attributes -Wno-class-memaccess -I stan/lib/stan_math/lib/tbb_2020.3/include -O3 -I src -I stan/src -I stan/lib/rapidjson_1.1.0/ -I lib/CLI11-1.9.1/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.4.0 -I stan/lib/stan_math/lib/boost_1.87.0 -I stan/lib/stan_math/lib/sundials_6.1.1/include -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -DBOOST_DISABLE_ASSERTS -c -Wno-ignored-attributes -x c++ -o /tmp/RtmpZ0UojA/model-388b2ceda99.o /tmp/RtmpZ0UojA/model-388b2ceda99.hpp
896896

897897
--- Linking model ---
898-
g++ -Wno-deprecated-declarations -std=c++17 -pthread -D_REENTRANT -Wno-sign-compare -Wno-ignored-attributes -Wno-class-memaccess -I stan/lib/stan_math/lib/tbb_2020.3/include -O3 -I src -I stan/src -I stan/lib/rapidjson_1.1.0/ -I lib/CLI11-1.9.1/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.4.0 -I stan/lib/stan_math/lib/boost_1.87.0 -I stan/lib/stan_math/lib/sundials_6.1.1/include -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -DBOOST_DISABLE_ASSERTS -Wl,-L,"/home/runner/.cmdstan/cmdstan-2.39.0/stan/lib/stan_math/lib/tbb" -Wl,-rpath,"/home/runner/.cmdstan/cmdstan-2.39.0/stan/lib/stan_math/lib/tbb" /tmp/RtmpM8Rch6/model-382c61fcc19e.o src/cmdstan/main.o -ltbb stan/lib/stan_math/lib/sundials_6.1.1/lib/libsundials_nvecserial.a stan/lib/stan_math/lib/sundials_6.1.1/lib/libsundials_cvodes.a stan/lib/stan_math/lib/sundials_6.1.1/lib/libsundials_idas.a stan/lib/stan_math/lib/sundials_6.1.1/lib/libsundials_kinsol.a stan/lib/stan_math/lib/tbb/libtbb.so.2 -o /tmp/RtmpM8Rch6/model-382c61fcc19e
899-
rm /tmp/RtmpM8Rch6/model-382c61fcc19e.hpp /tmp/RtmpM8Rch6/model-382c61fcc19e.o
898+
g++ -Wno-deprecated-declarations -std=c++17 -pthread -D_REENTRANT -Wno-sign-compare -Wno-ignored-attributes -Wno-class-memaccess -I stan/lib/stan_math/lib/tbb_2020.3/include -O3 -I src -I stan/src -I stan/lib/rapidjson_1.1.0/ -I lib/CLI11-1.9.1/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.4.0 -I stan/lib/stan_math/lib/boost_1.87.0 -I stan/lib/stan_math/lib/sundials_6.1.1/include -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -DBOOST_DISABLE_ASSERTS -Wl,-L,"/home/runner/.cmdstan/cmdstan-2.39.0/stan/lib/stan_math/lib/tbb" -Wl,-rpath,"/home/runner/.cmdstan/cmdstan-2.39.0/stan/lib/stan_math/lib/tbb" /tmp/RtmpZ0UojA/model-388b2ceda99.o src/cmdstan/main.o -ltbb stan/lib/stan_math/lib/sundials_6.1.1/lib/libsundials_nvecserial.a stan/lib/stan_math/lib/sundials_6.1.1/lib/libsundials_cvodes.a stan/lib/stan_math/lib/sundials_6.1.1/lib/libsundials_idas.a stan/lib/stan_math/lib/sundials_6.1.1/lib/libsundials_kinsol.a stan/lib/stan_math/lib/tbb/libtbb.so.2 -o /tmp/RtmpZ0UojA/model-388b2ceda99
899+
rm /tmp/RtmpZ0UojA/model-388b2ceda99.hpp /tmp/RtmpZ0UojA/model-388b2ceda99.o
900900
stan_version_major = 2
901901
stan_version_minor = 39
902902
stan_version_patch = 0
@@ -918,9 +918,9 @@ fit <- mod$sample(
918918
Running MCMC with 1 chain...
919919

920920
Running ./bernoulli 'id=1' random 'seed=1376020223' data \
921-
'file=/tmp/RtmpM8Rch6/standata-382c3046d1af.json' output \
922-
'file=/tmp/RtmpM8Rch6/bernoulli-202607202221-1-1e1386.csv' \
923-
'profile_file=/tmp/RtmpM8Rch6/bernoulli-profile-202607202221-1-3dcb61.csv' \
921+
'file=/tmp/RtmpZ0UojA/standata-388b7c77e1bf.json' output \
922+
'file=/tmp/RtmpZ0UojA/bernoulli-202607212041-1-1e13e5.csv' \
923+
'profile_file=/tmp/RtmpZ0UojA/bernoulli-profile-202607212041-1-3dcbc0.csv' \
924924
'save_cmdstan_config=0' 'method=sample' 'num_samples=100' 'num_warmup=100' \
925925
'save_warmup=0' 'algorithm=hmc' 'engine=nuts' adapt 'engaged=1' \
926926
'save_metric=0'
@@ -952,20 +952,20 @@ fit <- mod$sample(
952952
Chain 1 num_chains = 1 (Default)
953953
Chain 1 id = 1 (Default)
954954
Chain 1 data
955-
Chain 1 file = /tmp/RtmpM8Rch6/standata-382c3046d1af.json
955+
Chain 1 file = /tmp/RtmpZ0UojA/standata-388b7c77e1bf.json
956956
Chain 1 init = 2 (Default)
957957
Chain 1 random
958958
Chain 1 seed = 1376020223
959959
Chain 1 output
960-
Chain 1 file = /tmp/RtmpM8Rch6/bernoulli-202607202221-1-1e1386.csv
960+
Chain 1 file = /tmp/RtmpZ0UojA/bernoulli-202607212041-1-1e13e5.csv
961961
Chain 1 diagnostic_file = (Default)
962962
Chain 1 refresh = 100 (Default)
963963
Chain 1 sig_figs = 8 (Default)
964-
Chain 1 profile_file = /tmp/RtmpM8Rch6/bernoulli-profile-202607202221-1-3dcb61.csv
964+
Chain 1 profile_file = /tmp/RtmpZ0UojA/bernoulli-profile-202607212041-1-3dcbc0.csv
965965
Chain 1 save_cmdstan_config = false (Default)
966966
Chain 1 num_threads = 1 (Default)
967-
Chain 1 Gradient evaluation took 3e-06 seconds
968-
Chain 1 1000 transitions using 10 leapfrog steps per transition would take 0.03 seconds.
967+
Chain 1 Gradient evaluation took 2e-06 seconds
968+
Chain 1 1000 transitions using 10 leapfrog steps per transition would take 0.02 seconds.
969969
Chain 1 Adjust your expectations accordingly!
970970
Chain 1 WARNING: There aren't enough warmup iterations to fit the
971971
Chain 1 three stages of adaptation as currently configured.

dev/articles/profiling.html

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev/articles/profiling.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ fit$profiles()
122122

123123
[[1]]
124124
name thread_id total_time forward_time reverse_time chain_stack
125-
1 priors 140530089813824 0.003701584 0.002727988 0.000973596 34904
126-
2 likelihood 140530089813824 0.669475500 0.519368390 0.150107110 52356
125+
1 priors 140393822627648 0.004873938 0.003543106 0.001330832 34904
126+
2 likelihood 140393822627648 0.657475560 0.516735130 0.140740430 52356
127127
no_chain_stack autodiff_calls no_autodiff_calls
128128
1 34904 17452 1
129129
2 34921452 17452 1
@@ -181,11 +181,11 @@ fit_glm$profiles()
181181

182182
[[1]]
183183
name thread_id total_time forward_time reverse_time chain_stack
184-
1 priors 140244019083072 0.004049327 0.002968845 0.001080482 34214
185-
2 likelihood 140244019083072 0.430647400 0.429484670 0.001162726 51321
184+
1 likelihood 140241722214208 0.428915610 0.427951940 0.000963662 51321
185+
2 priors 140241722214208 0.003706441 0.002783516 0.000922925 34214
186186
no_chain_stack autodiff_calls no_autodiff_calls
187-
1 34214 17107 1
188-
2 17107 17107 1
187+
1 17107 17107 1
188+
2 34214 17107 1
189189

190190
We can see from the `total_time` column that the likelihood computation
191191
is faster than in the previous model.
@@ -214,7 +214,7 @@ per_gradient_timing <- profile_chain_1$total_time/profile_chain_1$autodiff_calls
214214
print(per_gradient_timing) # two elements for the two profile statements in the model
215215
```
216216

217-
[1] 2.121008e-07 3.836096e-05
217+
[1] 2.792768e-07 3.767336e-05
218218

219219
### Accessing and saving the profile files
220220

@@ -228,7 +228,7 @@ The paths of the profiling CSV files can be retrieved using
228228
fit$profile_files()
229229
```
230230

231-
[1] "/tmp/RtmpzguWGe/model_96c18d764c15ce710d63062fb5f15758-profile-202607202222-1-806858.csv"
231+
[1] "/tmp/RtmpXT8ORS/model_96c18d764c15ce710d63062fb5f15758-profile-202607212042-1-8068b3.csv"
232232

233233
These can be saved to a more permanent location with the
234234
`$save_profile_files()` method.

0 commit comments

Comments
 (0)