StanJulia / CmdStan.jl

CmdStan.jl v6 provides an alternative, older Julia wrapper to Stan's `cmdstan` executable. CmdStan will be deprecated in 2022.
MIT License
30 stars 12 forks source link

add init_file within stan method #85

Closed ueliwechsler closed 4 years ago

ueliwechsler commented 4 years ago

This PR should enable the init kwarg to work properly. Code provided by @andrstef.

goedman commented 4 years ago

Thank you for the pull request. Do you have a MWE showing the problem? Or a description what's not working. Thanks.

ueliwechsler commented 4 years ago

I think there was a regression in the functionality of the kwarg init such that the Dict with the initialization values was not assigned to the stan model

init_dict = Dict("a"=>..., ...)
stan(;... init=init_dict )

The regresssion occurred around or after version 5.4.

andrstef commented 4 years ago

in the stan() function, the init file(s) get produced. However, the location of the file(s) needs to be stored in the init_file field of the Stanmodel. Otherwise, parsing the command will not include the init file's location. This somehow got lost with version 5.4. Currently, the init files are dumped but not picked up by Cmdstan.

goedman commented 4 years ago

In the merge queue, should be merged as CmdStan 6.0.2 within the next 30 mins or so. Thanks again!