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

Staging #2

Open
wants to merge 61 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
cf502e6
Bump r-lib/actions from 2.10.1 to 2.11.0
dependabot[bot] Nov 11, 2024
a9e2536
Merge pull request #1030 from stan-dev/dependabot/github_actions/r-li…
jgabry Nov 11, 2024
38a33ef
Informative error message for sampler_diagnostics() with fixed_param
jgabry Nov 13, 2024
b762c54
Merge pull request #1033 from stan-dev/error-message-fixed-param-diag…
jgabry Nov 14, 2024
3c840ef
Fix use of untar
jgabry Nov 14, 2024
bceb482
Merge pull request #1034 from stan-dev/fix-untar-install
jgabry Nov 18, 2024
29d388a
update usage of 'make' post CmdStan 2.35
jgabry Nov 18, 2024
9c7603e
don't check Sys.getenv("MAKE") first (debugging GHA)
jgabry Nov 18, 2024
bdb6042
For #1026. Update `repair_path()` to work with network paths, add test.
bschneidr Aug 31, 2024
19e7af8
Merge pull request #1038 from bschneidr/master
jgabry Nov 20, 2024
1a040bd
Mention vignette section on faster model saving for large models
jgabry Nov 20, 2024
4b80205
Merge pull request #1042 from stan-dev/save_object-doc-update
jgabry Nov 20, 2024
381be13
Revert "don't check Sys.getenv("MAKE") first (debugging GHA)"
jgabry Nov 20, 2024
73a1cb2
don't check CmdStan version when selecting `make` command
jgabry Nov 20, 2024
3af034b
use capture.output in more places
jgabry Nov 22, 2024
c681d32
Merge pull request #1036 from stan-dev/update-make-command
jgabry Nov 22, 2024
4be1269
a few more cases
jgabry Nov 22, 2024
6baf353
Bump r-lib/actions from 2.11.0 to 2.11.1
dependabot[bot] Nov 25, 2024
ec5d9b3
Allow models with no parameters without `fixed_param=TRUE` (in CmdSta…
jgabry Nov 25, 2024
c341a4b
suppress warnings from as.numeric(inv_metric) if no parameters
jgabry Nov 25, 2024
d34458e
add test for new behavior
jgabry Nov 25, 2024
038de9a
Update csv.R
jgabry Nov 25, 2024
5a6d780
Merge pull request #1045 from stan-dev/dependabot/github_actions/r-li…
jgabry Nov 25, 2024
5a9156d
Merge branch 'master' into no-fixed-param-error
jgabry Nov 25, 2024
491845a
Merge branch 'master' into reduce-test-output
jgabry Nov 25, 2024
2cd3a30
Merge pull request #1043 from stan-dev/reduce-test-output
jgabry Nov 26, 2024
591b4ab
Merge pull request #1046 from stan-dev/no-fixed-param-error
jgabry Nov 26, 2024
acc3577
suppress more output during tests to clean up logs
jgabry Nov 27, 2024
3ae9080
Merge pull request #1047 from stan-dev/suppress-more-test-output
jgabry Nov 27, 2024
14393e5
Bump Vampire/setup-wsl from 3 to 4
dependabot[bot] Dec 9, 2024
8710b1f
Merge pull request #1049 from stan-dev/dependabot/github_actions/Vamp…
jgabry Dec 14, 2024
ca3bc9f
Fix opencl tests
katrinabrock Aug 8, 2024
d17a5a7
Add testcases for Issue #765
katrinabrock Aug 5, 2024
acb109a
Fix Issue #765
katrinabrock Aug 8, 2024
469757c
Handle stan_threads cpp option consistent with cmdstan
katrinabrock Aug 21, 2024
0d5ffa2
Improve Docs and Warnings around cpp_options
katrinabrock Aug 21, 2024
c194935
WIP
katrinabrock Aug 23, 2024
0491e9d
Re-write cpp arg handling code
katrinabrock Aug 28, 2024
1f316d5
fixup remove browser call
katrinabrock Aug 28, 2024
964c7f6
fixup: with changes, make opencl tests pass
katrinabrock Aug 28, 2024
d7e7da6
WIP
katrinabrock Sep 9, 2024
81cbdd0
wip
katrinabrock Sep 9, 2024
c2fdcc5
WIP
katrinabrock Sep 10, 2024
55b13f9
Tests Passing?
katrinabrock Sep 10, 2024
c4f36cb
squash some bugs
katrinabrock Sep 11, 2024
3e7926d
...how about now?
katrinabrock Sep 11, 2024
c1382c5
fixup
katrinabrock Sep 11, 2024
252a4e7
fixup
katrinabrock Sep 11, 2024
496359e
fixup
katrinabrock Sep 11, 2024
9885a06
defaults list()-> NULL
katrinabrock Dec 17, 2024
e589db6
remove/rename exe_info variable
katrinabrock Dec 17, 2024
93401eb
Update R/model.R
katrinabrock Dec 17, 2024
d69675f
Update R/model.R
katrinabrock Dec 17, 2024
a327449
add tests of user_header prescidence
katrinabrock Dec 17, 2024
e2a2e5f
fix typo
katrinabrock Dec 17, 2024
454a351
add verbose arg to info call
katrinabrock Dec 17, 2024
40a0e01
Add commend detailing mock logic
katrinabrock Dec 17, 2024
9e071fe
move exe file path resolution to separate function
katrinabrock Dec 18, 2024
f993531
remove files removed in master
katrinabrock Dec 18, 2024
66aa1b4
lint
katrinabrock Dec 18, 2024
93bd277
fix incomplete method renaming
katrinabrock Dec 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/R-CMD-check-wsl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ jobs:

- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2.10.1
- uses: r-lib/actions/setup-pandoc@v2.10.1
- uses: r-lib/actions/setup-r@v2.11.1
- uses: r-lib/actions/setup-pandoc@v2.11.1

- uses: r-lib/actions/setup-r-dependencies@v2.10.1
- uses: r-lib/actions/setup-r-dependencies@v2.11.1
with:
extra-packages: any::rcmdcheck, local::.

- uses: Vampire/setup-wsl@v3
- uses: Vampire/setup-wsl@v4
with:
distribution: Ubuntu-22.04
use-cache: 'false'
Expand All @@ -71,7 +71,7 @@ jobs:
sessioninfo::session_info(pkgs, include_base = TRUE)
shell: Rscript {0}

- uses: r-lib/actions/check-r-package@v2.10.1
- uses: r-lib/actions/check-r-package@v2.11.1
env:
_R_CHECK_CRAN_INCOMING_: false

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@ jobs:

- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2.10.1
- uses: r-lib/actions/setup-r@v2.11.1
with:
r-version: ${{ matrix.config.r }}
rtools-version: ${{ matrix.config.rtools }}

- uses: r-lib/actions/setup-pandoc@v2.10.1
- uses: r-lib/actions/setup-pandoc@v2.11.1

- uses: r-lib/actions/setup-r-dependencies@v2.10.1
- uses: r-lib/actions/setup-r-dependencies@v2.11.1
with:
extra-packages: any::rcmdcheck, local::.

Expand All @@ -79,7 +79,7 @@ jobs:
sessioninfo::session_info(pkgs, include_base = TRUE)
shell: Rscript {0}

- uses: r-lib/actions/check-r-package@v2.10.1
- uses: r-lib/actions/check-r-package@v2.11.1
env:
_R_CHECK_CRAN_INCOMING_: false

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/Test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ jobs:
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'"
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2.10.1
- uses: r-lib/actions/setup-pandoc@v2.10.1
- uses: r-lib/actions/setup-r@v2.11.1
- uses: r-lib/actions/setup-pandoc@v2.11.1

- uses: r-lib/actions/setup-r-dependencies@v2.10.1
- uses: r-lib/actions/setup-r-dependencies@v2.11.1
with:
extra-packages: any::rcmdcheck, local::., any::covr, any::gridExtra

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cmdstan-tarball-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ jobs:
sudo apt-get install -y libcurl4-openssl-dev || true
sudo apt-get install -y openmpi-bin openmpi-common libopenmpi-dev || true

- uses: r-lib/actions/setup-r@v2.10.1
- uses: r-lib/actions/setup-r@v2.11.1
with:
r-version: ${{ matrix.config.r }}
rtools-version: ${{ matrix.config.rtools }}

- uses: r-lib/actions/setup-pandoc@v2.10.1
- uses: r-lib/actions/setup-pandoc@v2.11.1

- name: Query dependencies
run: |
Expand Down
6 changes: 0 additions & 6 deletions R/args.R
Original file line number Diff line number Diff line change
Expand Up @@ -715,12 +715,6 @@ validate_cmdstan_args <- function(self) {
}
validate_init(self$init, num_inits)
validate_seed(self$seed, num_procs)
if (!is.null(self$opencl_ids)) {
if (cmdstan_version() < "2.26") {
stop("Runtime selection of OpenCL devices is only supported with CmdStan version 2.26 or newer.", call. = FALSE)
}
checkmate::assert_vector(self$opencl_ids, len = 2)
}
invisible(TRUE)
}

Expand Down
3 changes: 2 additions & 1 deletion R/csv.R
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ read_csv_metadata <- function(csv_file) {
dense_inv_metric <- TRUE
} else if (inv_metric_next) {
inv_metric_split <- strsplit(gsub("# ", "", line), ",")
numeric_inv_metric_split <- rapply(inv_metric_split, as.numeric)
numeric_inv_metric_split <- suppressWarnings(rapply(inv_metric_split, as.numeric))
if (inv_metric_rows == -1 && dense_inv_metric) {
inv_metric_rows <- length(inv_metric_split[[1]])
inv_metric_rows_to_read <- inv_metric_rows
Expand Down Expand Up @@ -786,6 +786,7 @@ read_csv_metadata <- function(csv_file) {
}
}
if (csv_file_info$method != "diagnose" &&
!isTRUE(csv_file_info$algorithm == "fixed_param") &&
length(csv_file_info$sampler_diagnostics) == 0 &&
length(csv_file_info$variables) == 0) {
stop("Supplied CSV file does not contain any variable names or data!", call. = FALSE)
Expand Down
7 changes: 7 additions & 0 deletions R/fit.R
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ CmdStanFit <- R6::R6Class(
#' read into R lazily (i.e., as needed), the `$save_object()` method is the
#' safest way to guarantee that everything has been read in before saving.
#'
#' See the "Saving fitted model objects" section of the
#' [_Getting started with CmdStanR_](https://mc-stan.org/cmdstanr/articles/cmdstanr.html)
#' vignette for some suggestions on faster model saving for large models.
#'
#' @param file (string) Path where the file should be saved.
#' @param ... Other arguments to pass to [base::saveRDS()] besides `object` and `file`.
#'
Expand Down Expand Up @@ -1616,6 +1620,9 @@ CmdStanMCMC$set("public", name = "loo", value = loo)
#' }
#'
sampler_diagnostics <- function(inc_warmup = FALSE, format = getOption("cmdstanr_draws_format", "draws_array")) {
if (isTRUE(private$metadata_$algorithm == "fixed_param")) {
stop("There are no sampler diagnostics when fixed_param = TRUE.", call. = FALSE)
}
if (is.null(private$sampler_diagnostics_) &&
!length(self$output_files(include_failed = FALSE))) {
stop("No chains finished successfully. Unable to retrieve the sampler diagnostics.", call. = FALSE)
Expand Down
3 changes: 1 addition & 2 deletions R/install.R
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,7 @@ install_cmdstan <- function(dir = NULL,
} else {
untar_rc <- utils::untar(
dest_file,
exdir = dir_cmdstan,
extras = "--strip-components 1"
exdir = dir
)
if (untar_rc != 0) {
stop("Problem extracting tarball. Exited with return code: ", untar_rc, call. = FALSE)
Expand Down
Loading
Loading