python3Packages.clu: fix jax 0.10.0 compatibility
This commit is contained in:
@@ -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
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user