Skip to content

Commit 8929623

Browse files
committed
fix failure
1 parent 8ce4108 commit 8929623

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

R/model.R

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ CmdStanModel <- R6::R6Class(
234234
precompile_stanc_options_ = NULL,
235235
precompile_include_paths_ = NULL,
236236
variables_ = NULL,
237-
cmdstan_version_ = cmdstan_version()
237+
cmdstan_version_ = NULL
238238
),
239239
public = list(
240240
functions = NULL,
@@ -272,6 +272,12 @@ CmdStanModel <- R6::R6Class(
272272
if (!is.null(stan_file) && compile) {
273273
self$compile(...)
274274
}
275+
276+
# for now, set this based on current version
277+
# at initialize so its never null
278+
# in the future, will be set only if/when we have a binary
279+
# as the version the model was compiled with
280+
private$cmdstan_version_ <- cmdstan_version()
275281
if (length(self$exe_file()) > 0 && file.exists(self$exe_file())) {
276282
cpp_options <- model_compile_info(self$exe_file(), self$cmdstan_version())
277283
for (cpp_option_name in names(cpp_options)) {

0 commit comments

Comments
 (0)