From 2fe154dcb1137b9d1cb75e3fe31cbb887d96fa99 Mon Sep 17 00:00:00 2001 From: Seth Axen Date: Mon, 1 Dec 2025 10:28:52 +0100 Subject: [PATCH 01/11] chore: Remove DimensionalData v0.29.25 compat --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 530f9a2..4ab7d6d 100644 --- a/Project.toml +++ b/Project.toml @@ -18,7 +18,7 @@ Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" [compat] ArviZExampleData = "0.1.5" CondaPkg = "0.2" -DimensionalData = "0.23, 0.24, 0.25, 0.26, 0.27, 0.28, 0.29" +DimensionalData = "0.23, 0.24, 0.25, 0.26, 0.27, 0.28, 0.29.1-0.29.4, 0.29.6-0.29.24, 0.29.26-0.29" InferenceObjects = "0.4.13" Markdown = "1" OrderedCollections = "1" From ee33ba6e499d6f3ddc7fa912e4b4c395b1c5c219 Mon Sep 17 00:00:00 2001 From: Seth Axen Date: Mon, 1 Dec 2025 10:29:14 +0100 Subject: [PATCH 02/11] chore: Increment patch number for release --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 4ab7d6d..da32186 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "ArviZPythonPlots" uuid = "4a6e88f0-2c8e-11ee-0601-e94153f0eada" authors = ["Seth Axen "] -version = "0.1.12" +version = "0.1.13" [deps] CondaPkg = "992eb4ea-22a4-4c89-a5bb-47a3300528ab" From be3bf86ed9aee4e8bd1bb5c32e284dcc8fbc1095 Mon Sep 17 00:00:00 2001 From: Seth Axen Date: Mon, 1 Dec 2025 10:49:20 +0100 Subject: [PATCH 03/11] chore: Fix version specifiers --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index da32186..d7dc453 100644 --- a/Project.toml +++ b/Project.toml @@ -18,7 +18,7 @@ Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" [compat] ArviZExampleData = "0.1.5" CondaPkg = "0.2" -DimensionalData = "0.23, 0.24, 0.25, 0.26, 0.27, 0.28, 0.29.1-0.29.4, 0.29.6-0.29.24, 0.29.26-0.29" +DimensionalData = "0.23, 0.24, 0.25, 0.26, 0.27, 0.28, 0.29.1 - 0.29.4, 0.29.6 - 0.29.24, ~0.29.26" InferenceObjects = "0.4.13" Markdown = "1" OrderedCollections = "1" From d38a258ea8919106d4bc4c732e64bc6167c2942a Mon Sep 17 00:00:00 2001 From: Seth Axen Date: Mon, 1 Dec 2025 12:29:34 +0100 Subject: [PATCH 04/11] test: Only check that constructed ELPDData has at least all keys as arviz one --- test/test_conversions.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_conversions.jl b/test/test_conversions.jl index 9a7a308..4a08af0 100644 --- a/test/test_conversions.jl +++ b/test/test_conversions.jl @@ -10,9 +10,9 @@ using Test loo_result = loo(idata; reff=1) loo_py_result = ArviZPythonPlots.arviz.loo(idata; pointwise=true, reff=1) py_loo_result = Py(loo_result) - @test all( - pyconvert(Array{String}, py_loo_result.keys()) == + @test issubset( pyconvert(Array{String}, loo_py_result.keys()), + pyconvert(Array{String}, py_loo_result.keys()), ) @test pyconvert(Float64, py_loo_result.elpd_loo) ≈ pyconvert(Float64, loo_py_result.elpd_loo) rtol = 1e-3 From e3b3cf88b2ca796912525782d7636781354bf91d Mon Sep 17 00:00:00 2001 From: Seth Axen Date: Mon, 1 Dec 2025 12:30:01 +0100 Subject: [PATCH 05/11] feat: Add good_k field to constructed ELPDData --- src/conversions.jl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/conversions.jl b/src/conversions.jl index 185845f..66febda 100644 --- a/src/conversions.jl +++ b/src/conversions.jl @@ -4,6 +4,9 @@ function PythonCall.Py(d::PSISLOOResult) psis_result = d.psis_result ds = convert_to_dataset((loo_i=pointwise.elpd, pareto_shape=pointwise.pareto_shape)) pyds = PythonCall.Py(ds) + n_samples = d.psis_result.ndraws * d.psis_result.nchains + good_k = min(1 - inv(log10(n_samples)), 0.7) + entries = ( elpd_loo=estimates.elpd, se=estimates.se_elpd, @@ -14,6 +17,7 @@ function PythonCall.Py(d::PSISLOOResult) loo_i=pyds.loo_i, pareto_k=pyds.pareto_shape, scale="log", + good_k=good_k, ) data = pylist(values(entries)) index = pylist(map(pystr, keys(entries))) From 02cc2ab3b401d597b083e2cbf061c590cffffd47 Mon Sep 17 00:00:00 2001 From: Seth Axen Date: Mon, 1 Dec 2025 12:31:00 +0100 Subject: [PATCH 06/11] feat: Add support for arviz v0.19 --- CondaPkg.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CondaPkg.toml b/CondaPkg.toml index d485f00..6a45182 100644 --- a/CondaPkg.toml +++ b/CondaPkg.toml @@ -2,4 +2,4 @@ pandas = "" matplotlib = "" xarray = "" -arviz = ">=0.15.0,<=0.18" +arviz = ">=0.15.0,<0.20" From b9cbf6301fcf08736677f94f8a3ad396287cf0ac Mon Sep 17 00:00:00 2001 From: Seth Axen Date: Mon, 1 Dec 2025 12:47:06 +0100 Subject: [PATCH 07/11] feat: Add support for arviz v0.20 --- CondaPkg.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CondaPkg.toml b/CondaPkg.toml index 6a45182..f37196f 100644 --- a/CondaPkg.toml +++ b/CondaPkg.toml @@ -2,4 +2,4 @@ pandas = "" matplotlib = "" xarray = "" -arviz = ">=0.15.0,<0.20" +arviz = ">=0.15.0,<=0.20" From e5b62085289063ee08e82ce164843e69b5f7eaf5 Mon Sep 17 00:00:00 2001 From: Seth Axen Date: Mon, 1 Dec 2025 14:11:15 +0100 Subject: [PATCH 08/11] feat: Add support for arviz v0.21 --- CondaPkg.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CondaPkg.toml b/CondaPkg.toml index f37196f..a18c9f4 100644 --- a/CondaPkg.toml +++ b/CondaPkg.toml @@ -2,4 +2,4 @@ pandas = "" matplotlib = "" xarray = "" -arviz = ">=0.15.0,<=0.20" +arviz = ">=0.15.0,<=0.21" From a1955e71e99190ec68d6278f6bbea5db91037f20 Mon Sep 17 00:00:00 2001 From: Seth Axen Date: Mon, 1 Dec 2025 14:11:46 +0100 Subject: [PATCH 09/11] feat: Add support for arviz v0.22 --- CondaPkg.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CondaPkg.toml b/CondaPkg.toml index a18c9f4..3feb6b3 100644 --- a/CondaPkg.toml +++ b/CondaPkg.toml @@ -2,4 +2,4 @@ pandas = "" matplotlib = "" xarray = "" -arviz = ">=0.15.0,<=0.21" +arviz = ">=0.15.0,<=0.22" From c3bb7b4e071bdee5fd554ee01c424023ee9ec2ba Mon Sep 17 00:00:00 2001 From: Seth Axen Date: Mon, 1 Dec 2025 14:29:47 +0100 Subject: [PATCH 10/11] Revert "chore: Fix version specifiers" This reverts commit be3bf86ed9aee4e8bd1bb5c32e284dcc8fbc1095. --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index d7dc453..da32186 100644 --- a/Project.toml +++ b/Project.toml @@ -18,7 +18,7 @@ Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" [compat] ArviZExampleData = "0.1.5" CondaPkg = "0.2" -DimensionalData = "0.23, 0.24, 0.25, 0.26, 0.27, 0.28, 0.29.1 - 0.29.4, 0.29.6 - 0.29.24, ~0.29.26" +DimensionalData = "0.23, 0.24, 0.25, 0.26, 0.27, 0.28, 0.29.1-0.29.4, 0.29.6-0.29.24, 0.29.26-0.29" InferenceObjects = "0.4.13" Markdown = "1" OrderedCollections = "1" From e6664c9da492ecdfba53a0a449a3f841d2ac2293 Mon Sep 17 00:00:00 2001 From: Seth Axen Date: Mon, 1 Dec 2025 14:29:55 +0100 Subject: [PATCH 11/11] Revert "chore: Remove DimensionalData v0.29.25 compat" This reverts commit 2fe154dcb1137b9d1cb75e3fe31cbb887d96fa99. --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index da32186..bcfcd16 100644 --- a/Project.toml +++ b/Project.toml @@ -18,7 +18,7 @@ Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" [compat] ArviZExampleData = "0.1.5" CondaPkg = "0.2" -DimensionalData = "0.23, 0.24, 0.25, 0.26, 0.27, 0.28, 0.29.1-0.29.4, 0.29.6-0.29.24, 0.29.26-0.29" +DimensionalData = "0.23, 0.24, 0.25, 0.26, 0.27, 0.28, 0.29" InferenceObjects = "0.4.13" Markdown = "1" OrderedCollections = "1"