2022-07-18 16:21:45 +00:00
|
|
|
{ lib
|
|
|
|
, fetchPypi
|
|
|
|
, buildPythonPackage
|
|
|
|
, numpy
|
|
|
|
, tensorflow-probability
|
|
|
|
, chex
|
|
|
|
, dm-haiku
|
|
|
|
, pytestCheckHook
|
2023-01-11 07:51:40 +00:00
|
|
|
, jaxlib
|
|
|
|
}:
|
2022-07-18 16:21:45 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "distrax";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "0.1.4";
|
2022-07-18 16:21:45 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-klXT5wfnWUGMrf5sQhYqz7Foc/Ou5y4GIFgtTff1ZFQ=";
|
2022-07-18 16:21:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
chex
|
|
|
|
jaxlib
|
|
|
|
numpy
|
|
|
|
tensorflow-probability
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-07-18 16:21:45 +00:00
|
|
|
dm-haiku
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"distrax"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# TypeErrors
|
|
|
|
"distrax/_src/bijectors/tfp_compatible_bijector_test.py"
|
|
|
|
"distrax/_src/distributions/distribution_from_tfp_test.py"
|
|
|
|
"distrax/_src/distributions/laplace_test.py"
|
|
|
|
"distrax/_src/distributions/multinomial_test.py"
|
|
|
|
"distrax/_src/distributions/mvn_diag_plus_low_rank_test.py"
|
|
|
|
"distrax/_src/distributions/mvn_kl_test.py"
|
|
|
|
"distrax/_src/distributions/straight_through_test.py"
|
|
|
|
"distrax/_src/distributions/tfp_compatible_distribution_test.py"
|
|
|
|
"distrax/_src/distributions/transformed_test.py"
|
|
|
|
"distrax/_src/distributions/uniform_test.py"
|
|
|
|
"distrax/_src/utils/transformations_test.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Probability distributions in JAX";
|
|
|
|
homepage = "https://github.com/deepmind/distrax";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ onny ];
|
2023-01-11 07:51:40 +00:00
|
|
|
# Broken on all platforms (starting 2022-07-27)
|
|
|
|
broken = true;
|
2022-07-18 16:21:45 +00:00
|
|
|
};
|
|
|
|
}
|