File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -440,7 +440,10 @@ LaplaceArgs <- R6::R6Class(
440440 jacobian = TRUE ) {
441441 checkmate :: assert_r6(mode , classes = " CmdStanMLE" )
442442 self $ mode_object <- mode # keep the CmdStanMLE for later use (can be returned by CmdStanLaplace$mode())
443- self $ mode <- self $ mode_object $ output_files() # mode <- file path to pass to CmdStan
443+ # mode <- file path to pass to CmdStan
444+ # This needs to be a path that can be accessed within WSL
445+ # since the files are used by CmdStan, not R
446+ self $ mode <- wsl_safe_path(self $ mode_object $ output_files())
444447 self $ jacobian <- jacobian
445448 self $ draws <- draws
446449 invisible (self )
@@ -761,7 +764,7 @@ validate_optimize_args <- function(self) {
761764# ' @param self A `LaplaceArgs` object.
762765# ' @return `TRUE` invisibly unless an error is thrown.
763766validate_laplace_args <- function (self ) {
764- checkmate :: assert_file_exists(self $ mode , extension = " csv" )
767+ assert_file_exists(self $ mode , extension = " csv" )
765768 checkmate :: assert_integerish(self $ draws , lower = 1 , null.ok = TRUE , len = 1 )
766769 if (! is.null(self $ draws )) {
767770 self $ draws <- as.integer(self $ draws )
You can’t perform that action at this time.
0 commit comments