Skip to content

Commit

Permalink
update docs and remove checks for possibly failed output files
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveBronder committed Mar 20, 2024
1 parent a078b18 commit 699480b
Show file tree
Hide file tree
Showing 14 changed files with 16 additions and 30 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ URL: https://mc-stan.org/cmdstanr/, https://discourse.mc-stan.org
BugReports: https://github.com/stan-dev/cmdstanr/issues
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.3.0
RoxygenNote: 7.3.1
Roxygen: list(markdown = TRUE, r6 = FALSE)
SystemRequirements: CmdStan (https://mc-stan.org/users/interfaces/cmdstan)
Depends:
Expand Down
1 change: 1 addition & 0 deletions R/args.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#' Returns the number of inner processes for a given method
#' @param args An args object
#' @noRd
get_num_inner_processes <- function(args) {
x <- NULL
if (inherits(args, "SampleArgs")) {
Expand Down
21 changes: 3 additions & 18 deletions R/run.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#' Parse a file from end to beginning looking for the elapsed time.
#' @param file A file path.
#' @return A list of numeric warmup, sampling, and total times.
#' @noRd
.sample_file_time = function(file) {
bufferSize <- 256
size <- file.info(file)$size
Expand Down Expand Up @@ -117,21 +118,10 @@ CmdStanRun <- R6::R6Class(
call. = FALSE
)
}
if (include_failed) {
private$latent_dynamics_files_
} else {
# FIXME: I'm not sure what to do when chains fail since they are all in one file?
# ok <- self$procs$is_finished() | self$procs$is_queued()
private$latent_dynamics_files_
}
private$latent_dynamics_files_
},
output_files = function(include_failed = FALSE) {
if (include_failed) {
private$output_files_
} else {
ok <- self$procs$is_finished() | self$procs$is_queued()
private$output_files_[ok]
}
},
profile_files = function(include_failed = FALSE) {
files <- private$profile_files_
Expand All @@ -142,12 +132,7 @@ CmdStanRun <- R6::R6Class(
call. = FALSE
)
}
if (include_failed) {
files
} else {
ok <- self$procs$is_finished() | self$procs$is_queued()
files[ok]
}
files
},
save_output_files = function(dir = ".",
basename = NULL,
Expand Down
2 changes: 1 addition & 1 deletion man/model-method-check_syntax.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/model-method-compile.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/model-method-diagnose.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/model-method-expose_functions.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/model-method-format.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/model-method-generate-quantities.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/model-method-laplace.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/model-method-optimize.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/model-method-pathfinder.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/model-method-variables.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/model-method-variational.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 699480b

Please sign in to comment.