python3Packages.clu: fix jax 0.10.0 compatibility

This commit is contained in:
Gaetan Lepage
2026-04-23 22:57:30 +00:00
parent 5f5f0d6211
commit 05f96ae106
@@ -31,6 +31,7 @@ buildPythonPackage (finalAttrs: {
pname = "clu";
version = "0.0.12";
pyproject = true;
__structuredAttrs = true;
src = fetchFromGitHub {
owner = "google";
@@ -39,6 +40,15 @@ buildPythonPackage (finalAttrs: {
hash = "sha256-ntqRz3fCXMf0EDQsddT68Mdi105ECBVQpVsStzk2kvQ=";
};
# Fix Jax 0.10.0 compatibility
# TypeError: clip() got an unexpected keyword argument 'a_min'
postPatch = ''
substituteInPlace clu/metrics.py \
--replace-fail \
"variance = jnp.clip(variance, a_min=0.0)" \
"variance = jnp.clip(variance, min=0.0)"
'';
build-system = [
setuptools
];