-
-
Notifications
You must be signed in to change notification settings - Fork 268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rstan model run time too slow (while CPU and RAM are avaiable) #158
Comments
This is something that should be on the users list (which I'm cc-ing), http://mc-stan.org/groups.html not on the issue tracker, but we can discuss it here then close But you need to show us your full model and how you called it. Stan will only use as many cores as you have parallel chains running.
|
sure, we can move elsewhere, as you prefere. Sorry for writing in the wrong place here's the model
I have not modified any of the options |
I think the best thing you can do for speed is add priors for The form of your likelihood y[n] ~ bernoulli_logit( alpha[kk[n]] + beta[jj[n]] can also be problematic because you are going to get a strong correlation
|
First, let me thank you for your help, Bob. I really need it! actually, there should be the priors already in the inits (all normals should come from a N(0,1)). Anway, I have explicitely removed the variables from the model and put 0 and 1 instead computing that I had:
which is slightly better that what I had with the estimation of the whole thing (11 seconds). In terms or warmup and iter, do you think there's room to reduce some of those so to speed up? the model now goes like
btw I wonder how comes the authors claims to run the model in 18h only with his own dataset (which is in structure very similar to mine). Is it just a matter of having bigger better computers or there might be something wrong with my data? |
dear all,
I am a newbie of the Rstan world, but I really need it for my thesis. I am actually using the script and a similar dataset from a guy from NYU, who reports as an estimated time about 18 hours. However, when I try to run my model it won't do more than 10% in 18hours. Thus, I ask for some little help to understand what I am doing wrong and how to improve the efficiency.
I am running a 500 iter, 100 warmup 2 chains model with a Bernoulli_logit function over 4 parameters, trying to estimate 2 of them through a No U Turn MC procedure. My data is a 10.000x1004 matrix of 0s and 1s. To wrap it up, the data is a matrix about people following politicians on twitter and I want to estimate their political ideas given who they follow. I run the model on RStudio with R x64 3.1.1 on a Win8 Professional, 6bit, I7 quad core with 16 GB ram.
Checking the performances, rsession uses no more than 14% CPU and 6GB of ram, although 7 more GB are free. While trying to subsample to a 10.000x250 matrix, I have noticed that it will use below 1.5GB instead. However, I have tried the procedure with a 50x50 dataset and it worked just fine, so there is no mistake in the procedure.
Rsession opens 8 threads, i see activity on each core but none is fully occupied.
I wonder why is it the case that my PC does not work at the best of its possibilities and whether there might be some bottleneck, a cap or a setup that prevents it to do so.
this is what happens when i compile it
while when i run it it just works for hours but it never goes beyond the 10% of the first chain (mainly because I have interrupted it after my pc was about to melt down).
the model is estimating the following function
and has these parameters
(n being about 10mln)
please help me find what is slowing down the procedure (and if nothing wtong is happening, what can I manipulate to have still some reasonable result in shorter time?).
I thank you in advance,
ML
The text was updated successfully, but these errors were encountered: