Open JasonPekos opened 2 weeks ago
Converting this to a draft — just noticed that I need to change the corresponding info files as well, to add a turing model section, e.g.:
(for the folder:)
"model_implementations": {
"stan": {
"model_code": "models/stan/eight_schools_noncentered.stan",
"stan_version": ">=2.26.0"
},
"pymc3": {
"model_code": "models/pymc3/eight_schools_noncentered.py"
},
"turing": {
"model_code": "models/turing/eight_schools_noncentered"
}
},
(for the actual code file:)
"model_implementations": {
"stan": {
"model_code": "models/stan/eight_schools_noncentered.stan",
"stan_version": ">=2.26.0"
},
"pymc3": {
"model_code": "models/pymc3/eight_schools_noncentered.py"
},
"turing": {
"model_code": "models/turing/eight_schools_noncentered/eight_schools_noncentered.jl"
}
},
not sure what is ideal here.
Ok, updated the .jsons
to point at the actual julia files. will revisit if this is a problem. also unsure if adding new implementations for current models requires me to change anything else?
This looks good to me. I have two thoughts. 1) We should probably add a document explaining how to run the Turing models. Ie example code, I guess an md in docs? 2) hav you checked that these models give the same or proportional log density values as with stan?
Purpose
This PR adds a few Turing models:
eight_schools_noncentered
andeight_schools_centered
. (chosen because they're classic)earn_height
(chosen because the data needed for this model is a subset of the dataframe, re: https://github.com/stan-dev/posteriordb/issues/260))ness
(chosen because the model has multiple associated posteriors, for different data)Rationale
Eventually the rest of the Turing models are probably going to live here. For now, while I'm building out the Julia testing and benchmarking code, I'd like some models in the actual repository to test my code on.
These models cover some edge cases that I want to make sure my code covers.