MLGlobalHealth / phyloSI-RakaiAgeGender

Creative Commons Attribution 4.0 International
4 stars 2 forks source link

replace rstan with cmdstanr (?) #8

Open olli0601 opened 1 year ago

olli0601 commented 1 year ago

Hi @melodiemonod

I am failing to install rstan in a conda environment for the Apply M1 chip, while cmdstanr works just fine and also contains the latest NUTS sampler. How much work would it be to replace rstan with cmdstanr?

@ShozenD @abriz97 FYI

Huge thanks,

olli

melodiemonod commented 1 year ago

Hi Oliver,

Honestly, I don't know because I've never used cmdstanr. Is any one of you @ShozenD, @abriz97 , have time to look into this?

1/ write a new yml where rstan dependency replaced with cmdstanr 2/ In run_stan.R add a flag to either use rstan or cmdstanr. The sampling function will certainly need to be updated. 3/ Possibly have to replace the extract() function, The bayesplot fct should be fine? but to check..

abriz97 commented 1 year ago

Hi all,

In my personal experience, cmdstanr doesn’t have the same functionality of rstan. The fit object loaded in R has a different structure in the two cases, requiring slightly different post processing code.

The downside of cmdstanr is that packages that are “companions” to Rstan are not always utilizable. Eg: posterior, bayesplot, rstanarm

I also seem to remember that code for HSGP is a bit harder to implement in cmdstanr, but I’m sure Shozen is more experienced than me on this issue.

Best, Andrea

Inviato da iPhone

Il giorno 21 mag 2023, alle ore 15:16, Mélodie Monod @.***> ha scritto:



Hi Oliver,

Honestly, I don't know because I've never used cmdstanr. Is any one of you @ShozenDhttps://github.com/ShozenD, @abriz97https://github.com/abriz97 , have time to look into this?

1/ write a new yml where rstan dependency replaced with cmdstanr 2/ In run_stan.R add a flag to either use rstan or cmdstanr. The sampling function will certainly need to be updated. 3/ Possibly have to replace the extract() function, The bayesplot fct should be fine? but to check..

— Reply to this email directly, view it on GitHubhttps://github.com/MLGlobalHealth/phyloSI-RakaiAgeGender/issues/8#issuecomment-1556190937, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJXP55T6EL7G4375WLY6MX3XHIPSDANCNFSM6AAAAAAYGFWRZI. You are receiving this because you were mentioned.Message ID: @.***>

ShozenD commented 1 year ago

Let me take a quick look into this.

Quick question. How many files runs rstan for the phylo pipeline?

ShozenD commented 1 year ago

TODO

RCCS Surveillance Pipeline