Open tuulam opened 4 weeks ago
And can you post the results of the same debugging steps from earlier (calling stanc
on the model code as a string and then on the file)?
Error in stanc(file = file, model_code = model_code, model_name = model_name, : 0 Internal compiler error: TypeError: a.charCodeAt is not a function
This should never happen. Please file a bug at https://github.com/stan-dev/stanc3/issues/new and include this message and the model that caused this issue.
From: Andrew Johnson @.> Sent: Friday, August 16, 2024 12:44 PM To: stan-dev/stanc3 @.> Cc: tuulam @.>; Author @.> Subject: Re: [stan-dev/stanc3] Internal compiler error: TypeError: a.charCodeAt is not a function (Issue #1446)
And can you post the results of the same debugging steps from earlier (calling stanc on the model code as a string and then on the file)?
— Reply to this email directly, view it on GitHubhttps://github.com/stan-dev/stanc3/issues/1446#issuecomment-2293187707, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALZZ4U23CPXHNZMIHWJSR6TZRXCY7AVCNFSM6AAAAABMTUEG2KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJTGE4DONZQG4. You are receiving this because you authored the thread.Message ID: @.***>
Can you show the full R code that you used? Just so I can be running the same thing
Get Outlook for Androidhttps://aka.ms/AAb9ysg
From: tuulam @.> Sent: Friday, August 16, 2024 12:55:04 PM To: stan-dev/stanc3 @.> Cc: Andrew Johnson @.>; Comment @.> Subject: Re: [stan-dev/stanc3] Internal compiler error: TypeError: a.charCodeAt is not a function (Issue #1446)
Error in stanc(file = file, model_code = model_code, model_name = model_name, : 0 Internal compiler error: TypeError: a.charCodeAt is not a function
This should never happen. Please file a bug at https://github.com/stan-dev/stanc3/issues/new and include this message and the model that caused this issue.
From: Andrew Johnson @.> Sent: Friday, August 16, 2024 12:44 PM To: stan-dev/stanc3 @.> Cc: tuulam @.>; Author @.> Subject: Re: [stan-dev/stanc3] Internal compiler error: TypeError: a.charCodeAt is not a function (Issue #1446)
And can you post the results of the same debugging steps from earlier (calling stanc on the model code as a string and then on the file)?
— Reply to this email directly, view it on GitHubhttps://github.com/stan-dev/stanc3/issues/1446#issuecomment-2293187707, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALZZ4U23CPXHNZMIHWJSR6TZRXCY7AVCNFSM6AAAAABMTUEG2KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJTGE4DONZQG4. You are receiving this because you authored the thread.Message ID: @.***>
— Reply to this email directly, view it on GitHubhttps://github.com/stan-dev/stanc3/issues/1446#issuecomment-2293202724, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGTPCCBOTCXHVCCPBODHJJTZRXD7RAVCNFSM6AAAAABMTUEG2KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJTGIYDENZSGQ. You are receiving this because you commented.Message ID: @.***>
lambda_true = 3 N = 5 set.seed(111111) (y = rpois(N, lambda_true)) poisson_dat = list(y = y, N = N) alpha = beta = 1
fit2 <- stan('poisson_lognormal.stan', poisson_dat, iter = 20000, chains = 4)
The stan file is the following
data {
int
parameters {
real
From: Andrew Johnson @.> Sent: Friday, August 16, 2024 12:56 PM To: stan-dev/stanc3 @.> Cc: tuulam @.>; Author @.> Subject: Re: [stan-dev/stanc3] Internal compiler error: TypeError: a.charCodeAt is not a function (Issue #1446)
Can you show the full R code that you used? Just so I can be running the same thing
Get Outlook for Androidhttps://aka.ms/AAb9ysg
From: tuulam @.> Sent: Friday, August 16, 2024 12:55:04 PM To: stan-dev/stanc3 @.> Cc: Andrew Johnson @.>; Comment @.> Subject: Re: [stan-dev/stanc3] Internal compiler error: TypeError: a.charCodeAt is not a function (Issue #1446)
Error in stanc(file = file, model_code = model_code, model_name = model_name, : 0 Internal compiler error: TypeError: a.charCodeAt is not a function
This should never happen. Please file a bug at https://github.com/stan-dev/stanc3/issues/new and include this message and the model that caused this issue.
From: Andrew Johnson @.> Sent: Friday, August 16, 2024 12:44 PM To: stan-dev/stanc3 @.> Cc: tuulam @.>; Author @.> Subject: Re: [stan-dev/stanc3] Internal compiler error: TypeError: a.charCodeAt is not a function (Issue #1446)
And can you post the results of the same debugging steps from earlier (calling stanc on the model code as a string and then on the file)?
— Reply to this email directly, view it on GitHubhttps://github.com/stan-dev/stanc3/issues/1446#issuecomment-2293187707, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALZZ4U23CPXHNZMIHWJSR6TZRXCY7AVCNFSM6AAAAABMTUEG2KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJTGE4DONZQG4. You are receiving this because you authored the thread.Message ID: @.***>
— Reply to this email directly, view it on GitHubhttps://github.com/stan-dev/stanc3/issues/1446#issuecomment-2293202724, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGTPCCBOTCXHVCCPBODHJJTZRXD7RAVCNFSM6AAAAABMTUEG2KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJTGIYDENZSGQ. You are receiving this because you commented.Message ID: @.***>
— Reply to this email directly, view it on GitHubhttps://github.com/stan-dev/stanc3/issues/1446#issuecomment-2293205457, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALZZ4U35OX4475CSCSELQ7DZRXEFXAVCNFSM6AAAAABMTUEG2KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJTGIYDKNBVG4. You are receiving this because you authored the thread.Message ID: @.***>
lambda_true = 3 N = 5 set.seed(111111) (y = rpois(N, lambda_true)) poisson_dat = list(y = y, N = N) alpha = beta = 1
fit2 <- stan('poisson_lognormal.stan', poisson_dat, iter = 20000, chains = 4)
The stan file is the following
data { int
N; array[N] int y; } parameters { real
lambda; } model { lambda ~ lognormal(0,1); y ~ poisson(lambda); }
From: Andrew Johnson @.> Sent: Friday, August 16, 2024 12:56 PM To: stan-dev/stanc3 @.> Cc: tuulam @.>; Author @.> Subject: Re: [stan-dev/stanc3] Internal compiler error: TypeError: a.charCodeAt is not a function (Issue #1446)
Can you show the full R code that you used? Just so I can be running the same thing
Get Outlook for Androidhttps://aka.ms/AAb9ysg
From: tuulam @.> Sent: Friday, August 16, 2024 12:55:04 PM To: stan-dev/stanc3 @.> Cc: Andrew Johnson @.>; Comment @.> Subject: Re: [stan-dev/stanc3] Internal compiler error: TypeError: a.charCodeAt is not a function (Issue #1446)
Error in stanc(file = file, model_code = model_code, model_name = model_name, : 0 Internal compiler error: TypeError: a.charCodeAt is not a function
This should never happen. Please file a bug at https://github.com/stan-dev/stanc3/issues/new and include this message and the model that caused this issue.
From: Andrew Johnson @.> Sent: Friday, August 16, 2024 12:44 PM To: stan-dev/stanc3 @.> Cc: tuulam @.>; Author @.> Subject: Re: [stan-dev/stanc3] Internal compiler error: TypeError: a.charCodeAt is not a function (Issue #1446)
And can you post the results of the same debugging steps from earlier (calling stanc on the model code as a string and then on the file)?
— Reply to this email directly, view it on GitHubhttps://github.com/stan-dev/stanc3/issues/1446#issuecomment-2293187707, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALZZ4U23CPXHNZMIHWJSR6TZRXCY7AVCNFSM6AAAAABMTUEG2KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJTGE4DONZQG4. You are receiving this because you authored the thread.Message ID: @.***>
— Reply to this email directly, view it on GitHubhttps://github.com/stan-dev/stanc3/issues/1446#issuecomment-2293202724, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGTPCCBOTCXHVCCPBODHJJTZRXD7RAVCNFSM6AAAAABMTUEG2KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJTGIYDENZSGQ. You are receiving this because you commented.Message ID: @.***>
— Reply to this email directly, view it on GitHubhttps://github.com/stan-dev/stanc3/issues/1446#issuecomment-2293205457, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALZZ4U35OX4475CSCSELQ7DZRXEFXAVCNFSM6AAAAABMTUEG2KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJTGIYDKNBVG4. You are receiving this because you authored the thread.Message ID: @.***>
And can you do the same for running stanc on the model as a string? (The full R code and the results)
I am not sure what I am supposed to do. I created a string
m = str('{data {
and ran
stanc(fit2 <- stan('poisson_lognormal.stan', m, iter = 20000, chains = 4))
I got an error message:
Error : Exception: variable does not exist; processing stage=data initialization; variable name=N; base type=int (in 'string', line 2, column 1 to column 16) failed to create the sampler; sampling not done Error in isTRUE(!nzchar(file)) : no method for coercing this S4 class to a vector
From: Andrew Johnson @.> Sent: Friday, August 16, 2024 1:02 PM To: stan-dev/stanc3 @.> Cc: tuulam @.>; Author @.> Subject: Re: [stan-dev/stanc3] Internal compiler error: TypeError: a.charCodeAt is not a function (Issue #1446)
lambda_true = 3 N = 5 set.seed(111111) (y = rpois(N, lambda_true)) poisson_dat = list(y = y, N = N) alpha = beta = 1
fit2 <- stan('poisson_lognormal.stan', poisson_dat, iter = 20000, chains = 4)
The stan file is the following
data {
int
parameters {
real
From: Andrew Johnson @.> Sent: Friday, August 16, 2024 12:56 PM To: stan-dev/stanc3 @.> Cc: tuulam @.>; Author @.> Subject: Re: [stan-dev/stanc3] Internal compiler error: TypeError: a.charCodeAt is not a function (Issue #1446https://github.com/stan-dev/stanc3/issues/1446)
Can you show the full R code that you used? Just so I can be running the same thing
Get Outlook for Androidhttps://aka.ms/AAb9ysg
From: tuulam @.> Sent: Friday, August 16, 2024 12:55:04 PM To: stan-dev/stanc3 @.> Cc: Andrew Johnson @.>; Comment @.> Subject: Re: [stan-dev/stanc3] Internal compiler error: TypeError: a.charCodeAt is not a function (Issue #1446https://github.com/stan-dev/stanc3/issues/1446)
Error in stanc(file = file, model_code = model_code, model_name = model_name, : 0 Internal compiler error: TypeError: a.charCodeAt is not a function
This should never happen. Please file a bug at https://github.com/stan-dev/stanc3/issues/new and include this message and the model that caused this issue.
From: Andrew Johnson @.> Sent: Friday, August 16, 2024 12:44 PM To: stan-dev/stanc3 @.> Cc: tuulam @.>; Author @.> Subject: Re: [stan-dev/stanc3] Internal compiler error: TypeError: a.charCodeAt is not a function (Issue #1446https://github.com/stan-dev/stanc3/issues/1446)
And can you post the results of the same debugging steps from earlier (calling stanc on the model code as a string and then on the file)?
— Reply to this email directly, view it on GitHub#1446 (comment)https://github.com/stan-dev/stanc3/issues/1446#issuecomment-2293187707, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALZZ4U23CPXHNZMIHWJSR6TZRXCY7AVCNFSM6AAAAABMTUEG2KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJTGE4DONZQG4. You are receiving this because you authored the thread.Message ID: @.***>
— Reply to this email directly, view it on GitHub#1446 (comment)https://github.com/stan-dev/stanc3/issues/1446#issuecomment-2293202724, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGTPCCBOTCXHVCCPBODHJJTZRXD7RAVCNFSM6AAAAABMTUEG2KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJTGIYDENZSGQ. You are receiving this because you commented.Message ID: @.***>
— Reply to this email directly, view it on GitHub#1446 (comment)https://github.com/stan-dev/stanc3/issues/1446#issuecomment-2293205457, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALZZ4U35OX4475CSCSELQ7DZRXEFXAVCNFSM6AAAAABMTUEG2KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJTGIYDKNBVG4. You are receiving this because you authored the thread.Message ID: @.***>
And can you do the same for running stanc on the model as a string? (The full R code and the results)
— Reply to this email directly, view it on GitHubhttps://github.com/stan-dev/stanc3/issues/1446#issuecomment-2293216324, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALZZ4U47TTLXYB2KLUN7H6TZRXE25AVCNFSM6AAAAABMTUEG2KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJTGIYTMMZSGQ. You are receiving this because you authored the thread.Message ID: @.***>
I am not sure what I am supposed to do.
Like the following:
stancode <- "YOUR MODEL CODE"
rstan::stanc(model_code=stancode)
What do you mean by model code, the stan-file, or fit-function?
On Fri, 16 Aug 2024 at 13:15, Andrew Johnson @.***> wrote:
I am not sure what I am supposed to do.
Like the following:
stancode <- "YOUR MODEL CODE"rstan::stanc(model_code=stanc)
— Reply to this email directly, view it on GitHub https://github.com/stan-dev/stanc3/issues/1446#issuecomment-2293236501, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALZZ4U6PNX57EMS6ZXW43K3ZRXGK3AVCNFSM6AAAAABMTUEG2KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJTGIZTMNJQGE . You are receiving this because you authored the thread.Message ID: @.***>
If your model is:
data {
int<lower=0> N;
array[N] int<lower=0> y;
}
parameters {
real<lower=0> lambda;
}
model {
lambda ~ lognormal(0,1);
y ~ poisson(lambda);
}
Then run:
stancode <- "
data {
int<lower=0> N;
array[N] int<lower=0> y;
}
parameters {
real<lower=0> lambda;
}
model {
lambda ~ lognormal(0,1);
y ~ poisson(lambda);
}
"
rstan::stanc(model_code=stancode)
And post the R code you used and the result
From: Andrew Johnson @.> Sent: Friday, August 16, 2024 2:33 PM To: stan-dev/stanc3 @.> Cc: tuulam @.>; Author @.> Subject: Re: [stan-dev/stanc3] Internal compiler error: TypeError: a.charCodeAt is not a function (Issue #1446)
If your model is:
data {
int
parameters {
real
Then run:
stancode <- "
data {
int
parameters {
real
rstan::stanc(model_code=stancode)
And post the R code you used and the result
— Reply to this email directly, view it on GitHubhttps://github.com/stan-dev/stanc3/issues/1446#issuecomment-2293340034, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALZZ4U7ZZHTIN7QE4XR7F2LZRXPPNAVCNFSM6AAAAABMTUEG2KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJTGM2DAMBTGQ. You are receiving this because you authored the thread.Message ID: @.***>
Hi @tuulam -- your last reply seems to be blank. Could you send the output again?
On Fri, 16 Aug 2024 at 17:36, Brian Ward @.***> wrote:
Hi @tuulam https://github.com/tuulam -- your last reply seems to be blank. Could you send the output again?
— Reply to this email directly, view it on GitHub https://github.com/stan-dev/stanc3/issues/1446#issuecomment-2293628848, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALZZ4U4JDDHJBR7YFE5WMVTZRYE6VAVCNFSM6AAAAABMTUEG2KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJTGYZDQOBUHA . You are receiving this because you were mentioned.Message ID: @.***>
stancode <- "
- data {
- int
N; - array[N] int
y; - }
- parameters {
- real
lambda; - }
- model {
- lambda ~ lognormal(0,1);
- y ~ poisson(lambda);
- }
- "
rstan::stanc(model_code=stancode) $status [1] TRUE
$model_cppname [1] "model38d83c842f2_file38d8327b67a4"
$cppcode
[1] "#ifndef USE_STANC3\n#define USE_STANC3\n#endif\n// Code generated by stanc v2.35.0\n#include <stan/model/model_header.hpp>\nnamespace model38d83c842f2_file38d8327b67a4_namespace {\nusing stan::model::model_base_crtp;\nusing namespace stan::math;\nstan::math::profile_map profiles;\nstatic constexpr std::array<const char*, 7> locations_array__ =\n {\" (found before start of program)\",\n \" (in 'string', line 6, column 0 to column 21)\",\n \" (in 'string', line 9, column 0 to column 24)\",\n \" (in 'string', line 10, column 0 to column 20)\",\n \" (in 'string', line 2, column 0 to column 15)\",\n \" (in 'string', line 3, column 6 to column 7)\",\n \" (in 'string', line 3, column 0 to column 24)\"};\nclass model38d83c842f2_file38d8327b67a4 final : public model_base_crtp
$model_name [1] "file38d8327b67a4"
$model_code
[1] "data {\nint
That indicates no error, are you still getting the error with your Stan file?
Unfortunately, yes I do.
From: Andrew Johnson @.> Sent: Friday, August 16, 2024 8:57 PM To: stan-dev/stanc3 @.> Cc: tuulam @.>; Mention @.> Subject: Re: [stan-dev/stanc3] Internal compiler error: TypeError: a.charCodeAt is not a function (Issue #1446)
That indicates no error, are you still getting the error with your Stan file?
— Reply to this email directly, view it on GitHubhttps://github.com/stan-dev/stanc3/issues/1446#issuecomment-2293924973, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALZZ4U4V4ULENJMOJ2ZZ6S3ZRY4PNAVCNFSM6AAAAABMTUEG2KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJTHEZDIOJXGM. You are receiving this because you were mentioned.Message ID: @.***>
Interesting!
Can you run:
cat("poisson_lognormal.stan", sep="\n")
rstan::stanc(file="poisson_lognormal.stan")
cat("poisson_lognormal.stan", sep="\n")
Oops, that should be: readLines("poisson_lognormal.stan")
instead
On Fri, 16 Aug 2024 at 21:08, Andrew Johnson @.***> wrote:
cat("poisson_lognormal.stan", sep="\n")
Oops, that should be: readLines("poisson_lognormal.stan") instead
— Reply to this email directly, view it on GitHub https://github.com/stan-dev/stanc3/issues/1446#issuecomment-2293939562, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALZZ4U3BLBF3ICHKCOIS2U3ZRY5ZXAVCNFSM6AAAAABMTUEG2KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJTHEZTSNJWGI . You are receiving this because you were mentioned.Message ID: @.***>
readLines("poisson_lognormal.stan") [1] "data {" "\tint
N;" "\tarray[N] int y;" [4] "}" "" "parameters {"
[7] "\treallambda;" "}" "model {"
[10] "\tlambda ~ lognormal(0,1);" "\ty ~ poisson(lambda);" "}"
rstan::stanc(file="poisson_lognormal.stan") $status [1] TRUE
$model_cppname [1] "model38d81c9023cf_poisson_lognormal"
$cppcode
[1] "#ifndef USE_STANC3\n#define USE_STANC3\n#endif\n// Code generated by stanc v2.35.0\n#include <stan/model/model_header.hpp>\nnamespace model38d81c9023cf_poisson_lognormal_namespace {\nusing stan::model::model_base_crtp;\nusing namespace stan::math;\nstan::math::profile_map profiles;\nstatic constexpr std::array<const char*, 7> locations_array__ =\n {\" (found before start of program)\",\n \" (in 'string', line 6, column 1 to column 22)\",\n \" (in 'string', line 9, column 1 to column 25)\",\n \" (in 'string', line 10, column 1 to column 21)\",\n \" (in 'string', line 2, column 1 to column 16)\",\n \" (in 'string', line 3, column 7 to column 8)\",\n \" (in 'string', line 3, column 1 to column 25)\"};\nclass model38d81c9023cf_poisson_lognormal final : public model_base_crtp
$model_name [1] "poisson_lognormal"
$model_code
[1] "data {\n\tint
Hmm also no error there, and if you run:
rstan::stan("poisson_lognormal.stan", data = list(N=1, y=1))
rstan::stan("poisson_lognormal.stan", data = list(N=1, y=1))Error : Exception: mismatch in number dimensions declared and found in context; processing stage=data initialization; variable name=y; dims declared=(1); dims found=() (in 'string', line 3, column 1 to column 25) failed to create the sampler; sampling not done
On Fri, 16 Aug 2024 at 21:23, Andrew Johnson @.***> wrote:
Hmm also no error there, and if you run:
rstan::stan("poisson_lognormal.stan", data = list(N=1, y=1))
— Reply to this email directly, view it on GitHub https://github.com/stan-dev/stanc3/issues/1446#issuecomment-2293960125, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALZZ4U7IDOJYWWBSQP4FNWTZRY7THAVCNFSM6AAAAABMTUEG2KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJTHE3DAMJSGU . You are receiving this because you were mentioned.Message ID: @.***>
Ah, try this instead:
rstan::stan("poisson_lognormal.stan", data = list(N=2, y=c(1, 2)))
On Fri, 16 Aug 2024 at 21:28, Andrew Johnson @.***> wrote:
Ah, try this instead:
rstan::stan("poisson_lognormal.stan", data = list(N=2, y=c(1, 2)))
— Reply to this email directly, view it on GitHub https://github.com/stan-dev/stanc3/issues/1446#issuecomment-2293965946, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALZZ4U63VKLV2XIE4RWF2BDZRZADDAVCNFSM6AAAAABMTUEG2KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJTHE3DKOJUGY . You are receiving this because you were mentioned.Message ID: @.***>
rstan::stan("poisson_lognormal.stan", data = list(N=2, y=c(1, 2)))
SAMPLING FOR MODEL 'anon_model' NOW (CHAIN 1). Chain 1: Chain 1: Gradient evaluation took 0.00046 seconds Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 4.6 seconds. Chain 1: Adjust your expectations accordingly! Chain 1: Chain 1: Chain 1: Iteration: 1 / 2000 [ 0%] (Warmup) Chain 1: Iteration: 200 / 2000 [ 10%] (Warmup) Chain 1: Iteration: 400 / 2000 [ 20%] (Warmup) Chain 1: Iteration: 600 / 2000 [ 30%] (Warmup) Chain 1: Iteration: 800 / 2000 [ 40%] (Warmup) Chain 1: Iteration: 1000 / 2000 [ 50%] (Warmup) Chain 1: Iteration: 1001 / 2000 [ 50%] (Sampling) Chain 1: Iteration: 1200 / 2000 [ 60%] (Sampling) Chain 1: Iteration: 1400 / 2000 [ 70%] (Sampling) Chain 1: Iteration: 1600 / 2000 [ 80%] (Sampling) Chain 1: Iteration: 1800 / 2000 [ 90%] (Sampling) Chain 1: Iteration: 2000 / 2000 [100%] (Sampling) Chain 1: Chain 1: Elapsed Time: 0.014 seconds (Warm-up) Chain 1: 0.014 seconds (Sampling) Chain 1: 0.028 seconds (Total) Chain 1:
SAMPLING FOR MODEL 'anon_model' NOW (CHAIN 2). Chain 2: Chain 2: Gradient evaluation took 6e-06 seconds Chain 2: 1000 transitions using 10 leapfrog steps per transition would take 0.06 seconds. Chain 2: Adjust your expectations accordingly! Chain 2: Chain 2: Chain 2: Iteration: 1 / 2000 [ 0%] (Warmup) Chain 2: Iteration: 200 / 2000 [ 10%] (Warmup) Chain 2: Iteration: 400 / 2000 [ 20%] (Warmup) Chain 2: Iteration: 600 / 2000 [ 30%] (Warmup) Chain 2: Iteration: 800 / 2000 [ 40%] (Warmup) Chain 2: Iteration: 1000 / 2000 [ 50%] (Warmup) Chain 2: Iteration: 1001 / 2000 [ 50%] (Sampling) Chain 2: Iteration: 1200 / 2000 [ 60%] (Sampling) Chain 2: Iteration: 1400 / 2000 [ 70%] (Sampling) Chain 2: Iteration: 1600 / 2000 [ 80%] (Sampling) Chain 2: Iteration: 1800 / 2000 [ 90%] (Sampling) Chain 2: Iteration: 2000 / 2000 [100%] (Sampling) Chain 2: Chain 2: Elapsed Time: 0.022 seconds (Warm-up) Chain 2: 0.017 seconds (Sampling) Chain 2: 0.039 seconds (Total) Chain 2:
SAMPLING FOR MODEL 'anon_model' NOW (CHAIN 3). Chain 3: Chain 3: Gradient evaluation took 5e-06 seconds Chain 3: 1000 transitions using 10 leapfrog steps per transition would take 0.05 seconds. Chain 3: Adjust your expectations accordingly! Chain 3: Chain 3: Chain 3: Iteration: 1 / 2000 [ 0%] (Warmup) Chain 3: Iteration: 200 / 2000 [ 10%] (Warmup) Chain 3: Iteration: 400 / 2000 [ 20%] (Warmup) Chain 3: Iteration: 600 / 2000 [ 30%] (Warmup) Chain 3: Iteration: 800 / 2000 [ 40%] (Warmup) Chain 3: Iteration: 1000 / 2000 [ 50%] (Warmup) Chain 3: Iteration: 1001 / 2000 [ 50%] (Sampling) Chain 3: Iteration: 1200 / 2000 [ 60%] (Sampling) Chain 3: Iteration: 1400 / 2000 [ 70%] (Sampling) Chain 3: Iteration: 1600 / 2000 [ 80%] (Sampling) Chain 3: Iteration: 1800 / 2000 [ 90%] (Sampling) Chain 3: Iteration: 2000 / 2000 [100%] (Sampling) Chain 3: Chain 3: Elapsed Time: 0.021 seconds (Warm-up) Chain 3: 0.012 seconds (Sampling) Chain 3: 0.033 seconds (Total) Chain 3:
SAMPLING FOR MODEL 'anon_model' NOW (CHAIN 4). Chain 4: Chain 4: Gradient evaluation took 5e-06 seconds Chain 4: 1000 transitions using 10 leapfrog steps per transition would take 0.05 seconds. Chain 4: Adjust your expectations accordingly! Chain 4: Chain 4: Chain 4: Iteration: 1 / 2000 [ 0%] (Warmup) Chain 4: Iteration: 200 / 2000 [ 10%] (Warmup) Chain 4: Iteration: 400 / 2000 [ 20%] (Warmup) Chain 4: Iteration: 600 / 2000 [ 30%] (Warmup) Chain 4: Iteration: 800 / 2000 [ 40%] (Warmup) Chain 4: Iteration: 1000 / 2000 [ 50%] (Warmup) Chain 4: Iteration: 1001 / 2000 [ 50%] (Sampling) Chain 4: Iteration: 1200 / 2000 [ 60%] (Sampling) Chain 4: Iteration: 1400 / 2000 [ 70%] (Sampling) Chain 4: Iteration: 1600 / 2000 [ 80%] (Sampling) Chain 4: Iteration: 1800 / 2000 [ 90%] (Sampling) Chain 4: Iteration: 2000 / 2000 [100%] (Sampling) Chain 4: Chain 4: Elapsed Time: 0.02 seconds (Warm-up) Chain 4: 0.017 seconds (Sampling) Chain 4: 0.037 seconds (Total) Chain 4: Inference for Stan model: anon_model. 4 chains, each with iter=2000; warmup=1000; thin=1; post-warmup draws per chain=1000, total post-warmup draws=4000.
mean se_mean sd 2.5% 25% 50% 75% 97.5% n_eff Rhat
lambda 1.45 0.02 0.72 0.44 0.93 1.31 1.82 3.24 1796 1 lp__ -3.23 0.02 0.69 -5.22 -3.35 -2.97 -2.81 -2.76 1524 1
Samples were drawn using NUTS(diag_e) at Fri Aug 16 21:29:01 2024. For each parameter, n_eff is a crude measure of effective sample size, and Rhat is the potential scale reduction factor on split chains (at convergence, Rhat=1).
So it looks like both parsing and sampling from your Stan model is working without issue. What R code are you running that is giving the error still?
RStudio 2024.04.2+764 "Chocolate Cosmos" Release (e4392fc9ddc21961fd1d0efd47484b43f07a4177, 2024-06-05) for windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) RStudio/2024.04.2+764 Chrome/120.0.6099.291 Electron/28.3.1 Safari/537.36, Quarto 1.4.555
From: Andrew Johnson @.> Sent: Friday, August 16, 2024 9:33 PM To: stan-dev/stanc3 @.> Cc: tuulam @.>; Mention @.> Subject: Re: [stan-dev/stanc3] Internal compiler error: TypeError: a.charCodeAt is not a function (Issue #1446)
So it looks like both parsing and sampling from your Stan model is working without issue. What R code are you running that is giving the error still?
— Reply to this email directly, view it on GitHubhttps://github.com/stan-dev/stanc3/issues/1446#issuecomment-2293973955, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALZZ4U5PZXJAVTSU6A53VFTZRZAZHAVCNFSM6AAAAABMTUEG2KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJTHE3TGOJVGU. You are receiving this because you were mentioned.Message ID: @.***>
This happened also a couple of days ago. Now I have the code that caused it:
Rstan 2.35.0.9000
This should never happen. Please file a bug at https://github.com/stan-dev/stanc3/issues/new and include this message and the model that caused this issue.
I removed the package V8 but it didn't change the situation.