Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cmdstanr option #537

Merged
merged 31 commits into from
Feb 14, 2024
Merged

Cmdstanr option #537

merged 31 commits into from
Feb 14, 2024

Conversation

sbfnk
Copy link
Contributor

@sbfnk sbfnk commented Feb 2, 2024

Closes #48 by implementing a backend = "cmdstanr" option.

This contains everything in #472 except the profiling bits (which don't seem supported by rstan).

This necessitated some (ultimately probably positive) streamlining of how the stan arguments are constructed for the different models.

@sbfnk sbfnk force-pushed the cmdstanr-option branch 5 times, most recently from 4374687 to 0d54c93 Compare February 2, 2024 13:18
@sbfnk sbfnk force-pushed the cmdstanr-option branch 2 times, most recently from 84455e6 to 5683d25 Compare February 5, 2024 09:26
@sbfnk sbfnk force-pushed the cmdstanr-option branch 3 times, most recently from 3e33ae9 to 0a32e57 Compare February 6, 2024 07:32
@sbfnk
Copy link
Contributor Author

sbfnk commented Feb 6, 2024

All checks now passing except windows one which looks unrelated.

@sbfnk sbfnk requested a review from seabbs February 6, 2024 09:36
@seabbs
Copy link
Contributor

seabbs commented Feb 6, 2024

All checks now passing except windows one which looks unrelated.

Agree, I see this in multiple places including the cmdstanr repo.

Copy link
Contributor

@seabbs seabbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks really great and I think its all in place. I've just done a read through and will play with the new functionality and then review again

.github/workflows/R-CMD-as-cran-check.yaml Show resolved Hide resolved
.gitignore Outdated Show resolved Hide resolved
R/estimate_infections.R Show resolved Hide resolved
R/extract.R Show resolved Hide resolved
@sbfnk sbfnk force-pushed the cmdstanr-option branch 12 times, most recently from d53ce57 to 113eb77 Compare February 13, 2024 08:07
@seabbs seabbs merged commit 44d360b into main Feb 14, 2024
11 checks passed
@seabbs seabbs deleted the cmdstanr-option branch February 14, 2024 16:28
@sbfnk sbfnk mentioned this pull request Apr 24, 2024
7 tasks
sbfnk added a commit that referenced this pull request May 3, 2024
* add cmdstan backend

* add cmdstanr model

* generalise extract functions

* create general fit_model function

* initial values for cmdstanr

* move stan model creation to create func

* make dist_fit cmdstanr ready

* make estimate_infections cmdstanr ready

* make estimate_secondary cmdstanr ready

* make estimate_truncation cmdstanr ready

* make simulate_infections cmdstanr ready

* gitignore for binaries

* add cmdstanr as suggest

* make forecast_secondary cmdstanr ready

* update stanargs test

* make simulations work with updated options

* add globals

* tests for cmdstanr backend

* update actions

* updates in response to lintr

* don't use future_lapply for cmdstanr

* backend-specific success criteria

* use epinowcast action for installing cmdstan

* improve .gitignore for compiled stan files

* deactivate testing on windows for now

* Revert "use epinowcast action for installing cmdstan"

This reverts commit e57ae76.

* Apply suggestions from code review

Co-authored-by: Sam Abbott <[email protected]>

* match arguments in `stan_model`

* don't match args$method but explictly stop instead

* put choices in argument

---------

Co-authored-by: Sam Abbott <[email protected]>
sbfnk added a commit that referenced this pull request May 3, 2024
* add cmdstan backend

* add cmdstanr model

* generalise extract functions

* create general fit_model function

* initial values for cmdstanr

* move stan model creation to create func

* make dist_fit cmdstanr ready

* make estimate_infections cmdstanr ready

* make estimate_secondary cmdstanr ready

* make estimate_truncation cmdstanr ready

* make simulate_infections cmdstanr ready

* gitignore for binaries

* add cmdstanr as suggest

* make forecast_secondary cmdstanr ready

* update stanargs test

* make simulations work with updated options

* add globals

* tests for cmdstanr backend

* update actions

* updates in response to lintr

* don't use future_lapply for cmdstanr

* backend-specific success criteria

* use epinowcast action for installing cmdstan

* improve .gitignore for compiled stan files

* deactivate testing on windows for now

* Revert "use epinowcast action for installing cmdstan"

This reverts commit e57ae76.

* Apply suggestions from code review

Co-authored-by: Sam Abbott <[email protected]>

* match arguments in `stan_model`

* don't match args$method but explictly stop instead

* put choices in argument

---------

Co-authored-by: Sam Abbott <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Option for cmdstanr?
2 participants