WSL - Run `cmdstan` and models under WSL filesystem
Submission Checklist
- [x] Run unit tests
- [x] Declare copyright holder and agree to license (see below)
Summary
This PR refactors the WSL functionality introduced in #677 so that cmdstan is built and stored within the WSL installation, and the model execution occurs exclusively within the WSL installation as well.
This is possible due to functionality for accessing the WSL filesystem from Windows via the //wsl$/ network path. This allows for cmdstanr to execute models through WSL, and then access the generated .csv files from the windows session. This is also reflected in the cmdstan path, for example:
> library(cmdstanr)
This is cmdstanr version 0.5.3
- CmdStanR documentation and vignettes: mc-stan.org/cmdstanr
- CmdStan path: //wsl$/Ubuntu-22.04/home/andrew/.cmdstan/cmdstan-2.30.1
- CmdStan version: 2.30.1
My anecdotal experience so far is a noticeable decrease in both cmdstan installation time, as well as model compilation time
Copyright and Licensing
Please list the copyright holder for the work you are submitting (this will be you or your assignee, such as a university or company): Andrew Johnson
By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses:
- Code: BSD 3-clause (https://opensource.org/licenses/BSD-3-Clause)
- Documentation: CC-BY 4.0 (https://creativecommons.org/licenses/by/4.0/)
Codecov Report
Merging #696 (71c0ea7) into master (53084da) will decrease coverage by
2.11%. The diff coverage is35.52%.
@@ Coverage Diff @@
## master #696 +/- ##
==========================================
- Coverage 90.56% 88.44% -2.12%
==========================================
Files 12 12
Lines 3890 4017 +127
==========================================
+ Hits 3523 3553 +30
- Misses 367 464 +97
| Impacted Files | Coverage Δ | |
|---|---|---|
| R/run.R | 94.54% <16.66%> (-0.74%) |
:arrow_down: |
| R/utils.R | 73.52% <18.33%> (-13.35%) |
:arrow_down: |
| R/model.R | 90.62% <43.75%> (-1.12%) |
:arrow_down: |
| R/fit.R | 97.43% <50.00%> (-0.75%) |
:arrow_down: |
| R/install.R | 62.01% <50.00%> (-0.93%) |
:arrow_down: |
| R/path.R | 76.82% <59.45%> (+5.77%) |
:arrow_up: |
| R/args.R | 97.92% <69.23%> (-0.75%) |
:arrow_down: |
| R/csv.R | 97.66% <100.00%> (ø) |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
Closing to run workflows in my own fork
Thanks Andrew! Will do another release this week, hopefully with some other minor features.
Great! I've just got one more PR to fix the WSL CI tests hanging, will have that in a couple days