Hello.
I’m running cmdstanpy with the below model.
data {
int<lower=0> N; // number of records
int<lower=0> cl_pure_premium[N]; // pure premium
vector[N] old_auto_c_score_n; //alert flag
}
parameters {
real<lower=0> mu;
real beta;
}
model {
mu ~ normal(0,3);
beta ~ normal(0,1);
cl_pure_premium ~ poisson_log(mu + old_auto_c_score_n*beta);
}
generated quantities {
vector[N] eta = mu + old_auto_c_score * beta;
int y_rep[N];
if (max(eta) > 20) {
// avoid overflow in poisson_log_rng
print("max eta too big: ", max(eta));
for (n in 1:N)
y_rep[n] = -1;
} else {
for (n in 1:N)
y_rep[n] = poisson_log_rng(eta[n]);
}
}
There is an uninformative error given below and I’m not sure what to do. I’m running this on Windows through the pycharm IDE.
C:\Users\JORDAN.HOWELL.GITDIR\AppData\Local\Continuum\anaconda3\envs\cmdstan\python.exe C:/Users/JORDAN.HOWELL.GITDIR/PycharmProjects/motorcyclebayes/models/mc_coll_bayes_model_script.py
INFO:cmdstanpy:compiling stan file C:\Users\JORDAN.HOWELL.GITDIR\PycharmProjects\motorcyclebayes\models\mc_coll_bayes.stan to exe file C:\Users\JORDAN.HOWELL.GITDIR\PycharmProjects\motorcyclebayes\models\mc_coll_bayes.exe
Traceback (most recent call last):
File "C:\Users\JORDAN.HOWELL.GITDIR\PycharmProjects\motorcyclebayes\models\mc_coll_bayes_model_script.py", line 11, in <module>
proc_parallel_model = CmdStanModel(
File "c:\users\jordan.howell.gitdir\src\cmdstanpy\cmdstanpy\model.py", line 215, in __init__
raise ValueError(
ValueError: Unable to compile Stan model file: C:\Users\JORDAN.HOWELL.GITDIR\PycharmProjects\motorcyclebayes\models\mc_coll_bayes.stan.
INFO:cmdstanpy:deleting tmpfiles dir: C:\Users\JORDAN~1.GIT\AppData\Local\Temp\tmp49w2f7m3
INFO:cmdstanpy:done
Process finished with exit code 1
I’ve re-installed cmdstanpy already. Has anyone seen this before and know what to do?