Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global option for turning off warning for partial initial values #913

Merged
merged 3 commits into from
Feb 28, 2024

Conversation

jgabry
Copy link
Member

@jgabry jgabry commented Jan 31, 2024

closes #912

Submission Checklist

  • Run unit tests
  • Declare copyright holder and agree to license (see below)

Summary

Adds a global option to turn off warning about partial initial value specification. When options(cmdstanr_warn_inits=TRUE) (the default) the warning message now looks like this, with a new line about disabling the warning:

Init values were only set for a subset of parameters. 
Missing init values for the following parameters:
alpha, beta

To disable this message use options(cmdstanr_warn_inits = FALSE).

When options(cmdstanr_warn_inits=FALSE) there is now no message at all.

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):
Columbia University

By submitting this pull request, the copyright holder is agreeing to
license the submitted work under the following licenses:

@jgabry jgabry requested a review from rok-cesnovar January 31, 2024 20:52
@jgabry
Copy link
Member Author

jgabry commented Jan 31, 2024

@ben18785 I think this should give you what you were asking for in #912. Do you want to test this out before we merge it?

@jgabry jgabry changed the title Cmdstanr warn inits global option Global option for turning off warning for partial initial values Jan 31, 2024
@jgabry
Copy link
Member Author

jgabry commented Jan 31, 2024

Looks like the Windows failures are due to issues in the install_cmdstan step when it tries to run pacman:

Error in `processx::run("pacman", args = c("-Sy", install_pkgs, "--noconfirm"), …`:
16
! System command 'pacman' failed

https://github.com/stan-dev/cmdstanr/actions/runs/7732239038/job/21081730518?pr=913#step:11:16

@ben18785
Copy link

Thanks very much @jgabry -- works perfectly as described above.

@jgabry
Copy link
Member Author

jgabry commented Jan 31, 2024

Thanks very much @jgabry -- works perfectly as described above.

Great, thanks for testing.

@jgabry
Copy link
Member Author

jgabry commented Feb 1, 2024

Looks like the Windows failures are due to issues in the install_cmdstan step when it tries to run pacman:

Error in `processx::run("pacman", args = c("-Sy", install_pkgs, "--noconfirm"), …`:
16
! System command 'pacman' failed

https://github.com/stan-dev/cmdstanr/actions/runs/7732239038/job/21081730518?pr=913#step:11:16

@rok-cesnovar Any idea if this Windows issue is something we need to fix or just some temporary issue that will resolve itself (as is often the case with GitHub actions)?

@jgabry
Copy link
Member Author

jgabry commented Feb 2, 2024

@rok-cesnovar Any idea if this Windows issue is something we need to fix or just some temporary issue that will resolve itself (as is often the case with GitHub actions)?

Looks like this pacman issue is affecting users too: https://twitter.com/fusaroli/status/1753094135513493693

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.32%. Comparing base (4b94b11) to head (3c678d1).

❗ Current head 3c678d1 differs from pull request most recent head 6bf9b3d. Consider uploading reports for the commit 6bf9b3d to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #913   +/-   ##
=======================================
  Coverage   88.32%   88.32%           
=======================================
  Files          12       12           
  Lines        4548     4549    +1     
=======================================
+ Hits         4017     4018    +1     
  Misses        531      531           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jgabry
Copy link
Member Author

jgabry commented Feb 28, 2024

Finally got everything passing here. I think this is a small enough change I could just merge, but will leave open for a bit longer in case @rok-cesnovar or @andrjohns has any issue with this.

Copy link
Member

@rok-cesnovar rok-cesnovar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@jgabry
Copy link
Member Author

jgabry commented Feb 28, 2024

Ok cool will go ahead and merge

@jgabry jgabry merged commit 28329d7 into master Feb 28, 2024
12 checks passed
@jgabry jgabry deleted the cmdstanr_warn_inits-global-option branch February 28, 2024 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Be able to silence warning about init values being set only for subset of parameters
4 participants