stan-dev / stan-dev/rstan

Errors thrown from `config_argss` are eaten in `sampling`

Open
#986 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
R
Stars
1.1k
Forks
266
Avg merge
2h 56m
Merged PRs (30d)
1

Description

Summary:

If an error is thrown withing rstan::config_argss, it is reported simply as 'error in specifying arguments; sampling not done', without reproducing the error produced in rstan::config_argss

Description:

I had a weird edge case where after calling sampling I got a puzzling error message: 'error in specifying arguments; sampling not done'. I was able to trace it to https://github.com/stan-dev/rstan/blob/71ab1409531c2c5e412635482fee545c77e2a070/rstan/rstan/R/stanmodel-class.R#L738 where it is triggerred by an error in rstan::config_argss, but the error itself is not shown. When investigating this, I modified something and no longer get this error, so I don't have a reproducible example, but in any case, I suspect the original error should be displayed to the user.

Current Output:
error in specifying arguments; sampling not done
Expected Output:
More specific error message
error in specifying arguments; sampling not done
RStan Version:

2.21, but present also in the current develop

R Version:

4.1.0

Operating System:

Windows 10

Contributor guide

No contributing guide indexed for this repository

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

Read rstan/rstan/R/stanmodel-class.R around line 738, then trace how config_argss errors are handled during sampling. Confirm that the underlying error is retained or displayed before the generic sampling message, and verify the resulting output through the sampling error path.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.