Closed yangchino1 closed 4 months ago
I confirm that I get the same error:
library(greta)
#>
#> Attaching package: 'greta'
#> The following objects are masked from 'package:stats':
#>
#> binomial, cov2cor, poisson
#> The following objects are masked from 'package:base':
#>
#> %*%, apply, backsolve, beta, chol2inv, colMeans, colSums, diag,
#> eigen, forwardsolve, gamma, identity, rowMeans, rowSums, sweep,
#> tapply
m <- model(normal(0,1))
#> ℹ Initialising python and checking dependencies, this may take a moment.
#> ✔ Initialising python and checking dependencies ... done!
#>
draws <- mcmc(m, n_samples = 10, warmup = 10)
#> running 4 chains simultaneously on up to 8 CPU cores
#> Error in eval(call("force", as.symbol(paste0("..", x)))): argument "..2" is missing, with no default
Created on 2024-03-10 with reprex v2.1.0
This is referenced in https://github.com/tidyverse/glue/issues/320 - it is because R 4.3.3 now errors when there are trailing commas. Previously glue had let you get away with this.
Searching for references to glue
I've found an example of a single trailing comma:
https://github.com/greta-dev/greta/blob/master/R/progress_bar.R#L31
Annoyingly, and thankfully so far, that seems to be the main cause of the error.
I'll push some changes this week and update greta on CRAN so we can resolve this error.
Thanks for taking the time to make this issue :)
tf2 branch now works, and so should github master branch:
library(greta)
#>
#> Attaching package: 'greta'
#> The following objects are masked from 'package:stats':
#>
#> binomial, cov2cor, poisson
#> The following objects are masked from 'package:base':
#>
#> %*%, apply, backsolve, beta, chol2inv, colMeans, colSums, diag,
#> eigen, forwardsolve, gamma, identity, rowMeans, rowSums, sweep,
#> tapply
m <- model(normal(0,1))
#> ℹ Initialising python and checking dependencies, this may take a moment.
#> ✔ Initialising python and checking dependencies ... done!
#>
draws <- mcmc(m, n_samples = 10, warmup = 10)
#> running 4 chains simultaneously on up to 8 CPU cores
#>
#> warmup 0/10 | eta: ?s warmup ========================================== 10/10 | eta: 0s
#> sampling 0/10 | eta: ?s sampling ========================================== 10/10 | eta: 0s
Created on 2024-03-10 with reprex v2.1.0
Hi,
mcmc()
failed simply after upgrading R to the lastest version, even if the conda environment and thegreta
package was also reinstalled. This occurred in both the TF1 and TF2 branches, on all the three platforms. E.g., TF1 branch on Windows 11,TF2 branch on Ubuntu 22.04:
TF2 branch on Mac M1 has the same result.