stan-dev / stan-dev/cmdstanr

easy way to limit sampling to a maximum time duration

Open
#474 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
R
Stars
160
Forks
69
Avg merge
1d 19h
Merged PRs (30d)
15

Description

Is your feature request related to a problem? Please describe.
I have a model that often runs in a reasonable amount of time, but occasionally, when faced with unpleasant data, will continue to sample for 4+ hours. Rather than wait, I'd prefer just to record the failure and move on to the next dataset.

Describe the solution you'd like
I'd like to be able to bound the maximum time duration for sampling.

Describe alternatives you've considered
Maybe there is some R package that wrap cmdstanr's sampling API and offer this functionality? Oh, hm, I found withTimeout in the R.utils package.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading cmdstanr's sampling API and compare its behavior with the R.utils withTimeout alternative mentioned in the issue. Define done as allowing a configured maximum sampling duration, recording the run as a failure when the limit is reached, and permitting the next dataset to be processed; locate and update the relevant sampling tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
api
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.