Tracking STAN while its Running

is there a way to track what the STAN model is doing while its running? My RL model (modified from the above version) has been running for >48 hours and is definitely just stuck somewhere since its still not even started one of its chains.

Now, I generally know that its because I feed it very wide uniform prior for one of my parameters. But I do want to be able to explore those values as well.

I am attaching my initial command
f2X3 <- stan("Stan2decay.stan", data = dataList1, warmup = 500, iter = 10000, chains = 4, cores = 2, thin = 1, control = list(adapt_delta = 0.9))

and for each chain the values look like this

Chain 3:  Elapsed Time: 4355.4 seconds (Warm-up)
Chain 3:                25143.4 seconds (Sampling)
Chain 3:                29498.8 seconds (Total)
Chain 3: 

I am getting a rejection of initial value error

Chain 4: Rejecting initial value:
Chain 4:   Log probability evaluates to log(0), i.e. negative infinity.
Chain 4:   Stan can't start sampling from this initial value.
Chain 4: 

But i thought STAN could still run even if the initial value is rejected.


(n.b. you have a few different Qs in this thread; better to post them as different threads in future for clarity/efficiency)

I haven’t seen any tools to run checks/diagnostics while chains are running. The closest is possibly the ezStan::watch_stan() function in ezStan, which tracks progress and shows if any divergences have been encountered. It should be relatively straightforward to add more checks/diagnostics and it’s on my to-do, but feel free to fork or submit a pull request if you try your hand at it in the meantime.

Regarding your uniform prior, you should really consider at least a wide normal on that parameter as uniforms indeed fcan be terminal for samplers and are rarely philosophically/psychologically sensible.

1 Like