New cmdstan_defaults() method for getting CmdStan's default argument values#1167
New cmdstan_defaults() method for getting CmdStan's default argument values#1167
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1167 +/- ##
==========================================
+ Coverage 90.85% 91.14% +0.29%
==========================================
Files 14 15 +1
Lines 5924 6065 +141
==========================================
+ Hits 5382 5528 +146
+ Misses 542 537 -5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Any idea what's up with the tests failing on some of the runs but not others? |
|
All windows tests and one macOS test failing, but couldn't yet figure out why. Will investigate tomorrow |
|
I think we can ignore the Mac failure, that’s unrelated. So yeah, it’s just the Windows tests. I don’t have Windows locally either, but maybe Claude will have some ideas. |
Pointing Claude twice to the github Windows test report helped. The model call was missing tbb path, and the solution did already exist in |
jgabry
left a comment
There was a problem hiding this comment.
Here's a first round of comments. I might have more after I take another look, but these are the first things I noticed.
* remove redundant tests for type (we already use `identical` to test values so this covers types too) * combine default values into a nested list so I could simplify the code to test them with a single `expect_cmdstan_defaults()` helper
jgabry
left a comment
There was a problem hiding this comment.
I made a few small changes (nothing that affects user-facing behavior) to slightly simplify some of the code and make a few parts easier to read (for a human at least). I think this is ready except for one thing: the name chains (instead of num_chains) is now correct, but the default number of chains in cmdstanr (4) and cmdstan (1) are different. So technically the new method is correct that the cmdstanr default is 1, but that's not very useful for the cmdstanr user. So maybe we should remove chains from the returned argument list since the default is already explicit in the sample method in cmdstanr? What do you think?
|
I had removed |
|
Ok thanks, looks good to me. Merging now |
Closes #1133
Finding the CmdStan default arguments for different methods from the documentation is not easy, and many arguments are named differently in CmdStan and in CmdStanR. New model method
$cmdstan_defaults()gets the defaults calling CmdStan itself and maps the argument names to those used by CmdStanR,Copyright and Licensing
Please list the copyright holder for the work you are submitting
(this will be you or your assignee, such as a university or company):
Aki Vehtari
By submitting this pull request, the copyright holder is agreeing to
license the submitted work under the following licenses: