Skip to content

Commit

Permalink
Merge pull request #4 from onnela-lab/update
Browse files Browse the repository at this point in the history
Bump package versions.
  • Loading branch information
tillahoffmann authored Dec 13, 2024
2 parents da27770 + d91b3a8 commit 6b196fe
Show file tree
Hide file tree
Showing 5 changed files with 147 additions and 145 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ __pycache__
.DS_Store
.ipynb_checkpoints
.Rhistory
.vscode
*.hpp
*.html
*.o
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ RUN Rscript setup.R
# Install Python dependencies and compile cmdstan.
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
RUN python -m cmdstanpy.install_cmdstan --verbose --version 2.33.0
RUN python -m cmdstanpy.install_cmdstan --verbose --version 2.36.0
16 changes: 8 additions & 8 deletions getting_started/getting_started.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ rendering the Rmarkdown.
```{r}
install.packages(
"cmdstanr",
repos = c("https://mc-stan.org/r-packages/", "http://cran.us.r-project.org")
repos = c("https://stan-dev.r-universe.dev", "http://cran.us.r-project.org")
)
install.packages("gptoolsStan", repos=c("http://cran.us.r-project.org"))
install.packages("gptoolsStan", repos = c("http://cran.us.r-project.org"))
```

Compile and run the model.
Expand All @@ -16,14 +16,14 @@ library(cmdstanr)
library(gptoolsStan)
model <- cmdstan_model(
stan_file="getting_started.stan",
include_paths=gptools_include_path(),
stan_file = "getting_started.stan",
include_paths = gptools_include_path(),
)
fit <- model$sample(
data=list(n=100, sigma=1, length_scale=0.1, period=1),
chains=1,
iter_warmup=500,
iter_sampling=50
data = list(n = 100, sigma = 1, length_scale = 0.1, period = 1),
chains = 2,
iter_warmup = 500,
iter_sampling = 50
)
f <- fit$draws("f")
dim(f)
Expand Down
Loading

0 comments on commit 6b196fe

Please sign in to comment.