I want to run an IRT model on a relatively large dataset (8000 subjects, 130 questions). However, even after many experiments, it still takes 14 hrs for Rstan to run 1000 iterations on a subset of the data (1000 subjects, 80 questions). Then, it may take days to run the model on the whole dataset.
However, due to the time limit imposed by the computing cluster I run on, it is not feasible to let the model run for days. Hence, I wonder whether I can continue warmup/sampling after interruption. For example, is it possible to save the model as an R object after 1000 iterations and call the object later to continue warmup / sampling for another 1000 iterations?
I think it is not yet implemented (I think @bgoodri could have some help with this feature).
Also RStan would need some way to combine draws. I used ArviZ on purpose. I think I could wrap StanFit4Model on PyStan to combine fits, but it was easier to work xarray Dataset / InferenceData.
to continue warmup, specifying stepsize and metric will set the starting point for adaptation - see the section in the Stan manual on how warmup works -
after reading the post, it looks like the cmdstanr backend for brms would be recommended. Then the inv_metric parameter can be extracted, which looks like it is the hard one to get your hands on if you want to avoid a burn in process. cmdstanr backend for brms is relatively new, but maybe there is some example code that someone has that performs the restart process from where a previous brms sampling exercise left off?
@Cynon, with pure .R script you may get values of inv_matrix with cmdstanr functions, something like the following.
With given:
path is full path/to/your/csv files (stan output) folder is “some_folder” i is some chain number, i.e. 1 (if there are more chains you simply add a loop)