StanJulia / StanSample.jl

WIP: Wrapper package for the sample method in Stan's cmdstan executable.
MIT License
18 stars 4 forks source link

Example Bernoulli not working under Julia 1.7.1 #49

Closed pkroenert closed 2 years ago

pkroenert commented 2 years ago

Dear Mr. Goedman,

It seems that the current example bernoulli.jl is not working under Julia Version 1.7.1.

The error message in the log-file is:

num_chains=1 is either mistyped or misplaced. Failed to parse arguments, terminating Stan

Best regards, Philipp

goedman commented 2 years ago

Hi Philip,

Looks like this is part of a message coming from cmdstan itself. I expect (but can’t be 100% sure) that you might be using mismatched versions of StanSample.jl and the cmdstan executable.

Which version of StanSample are you using? StanSample v6 (currently v6.3.0) expects cmdstan-2.28.0+ (currently cmdstan-2.29.0 is the released version of Stan).

Do you mind checking which versions you have installed. With the introduction of support for C++ level threads in cmdstan-2.28.x and up I needed to make several updates to to StanSample.jl.

Best, Rob

Rob J Goedman @.***

On Feb 22, 2022, at 03:40, PToTheK @.***> wrote:

Dear Mr. Goedman,

It seems that the current example bernoulli.jl is not working under Julia Version 1.7.1.

The error message in the log-file is:

num_chains=1 is either mistyped or misplaced. Failed to parse arguments, terminating Stan

Best regards, Philipp

— Reply to this email directly, view it on GitHub https://github.com/StanJulia/StanSample.jl/issues/49, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAMX2BRXSKGQKOVTDH5LM3U4NRZZANCNFSM5PA7MPLA. You are receiving this because you are subscribed to this thread.

pkroenert commented 2 years ago

Hi Rob,

Very good guess! I use the newest version StanSample StanSample v6.3.0, but It seems I am using still cmdstan-2.26.1.

I will load the new version and report asap if that resolved the issue.

Thank you very much, for your qualified response.

goedman commented 2 years ago

Hi PToTheK,

Github remains down for me, so I’m using the mail side.

Simultaneously I’m helping someone else and I’m wondering if I can create a StanSample version that does not insert the num_chains=1 argument if using Julia level “threads” (spawning a process for each chain). If that would work on cmdstan versions < cmdstan-2.28.0 it might help many folks make the transition to newer versions. At least temporarily as the Stan Language itself is also changing a bit.

Best, Rob

Rob J Goedman @.***

On Feb 22, 2022, at 08:51, PToTheK @.***> wrote:

Hi Rob,

Very good guess! I use the newest version StanSample StanSample v6.3.0, but It seems I am using still cmdstan-2.26.1`.

I will load the new version and report asap if that resolved the issue.

Thank you very much, for your qualified response.

— Reply to this email directly, view it on GitHub https://github.com/StanJulia/StanSample.jl/issues/49#issuecomment-1047935913, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAMX2BWSA6AEJ3GKYAQL6TU4OWGJANCNFSM5PA7MPLA. You are receiving this because you commented.

goedman commented 2 years ago

Hi @PToTheK ,

A new version of StanSample.jl (v6.3.1) just got merged which I believe will, by default, be compatible with older versions of the cmdstan as long as the keyword argument use_cpp_chains=false (in the stan_sample() call). That is the default and multiple chains will execute on Julia level ( a process for each chain).

pkroenert commented 2 years ago

Hi @goedman,

I loaded cmdstan-2.29.0 and StanSample v6.3.0 works correctly now!

"A new version of StanSample.jl (v6.3.1)..."

That sounds good! Indeed, this will make the transition for many users much smoother.

Thank you very much!

goedman commented 2 years ago

Great, thanks for the update Philipp.