depot/third_party/nixpkgs/pkgs/development/python-modules/blackjax/default.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

75 lines
1.5 KiB
Nix

{
lib,
stdenv,
buildPythonPackage,
pythonOlder,
fetchFromGitHub,
pytest-xdist,
pytestCheckHook,
setuptools-scm,
fastprogress,
jax,
jaxlib,
jaxopt,
optax,
typing-extensions,
}:
buildPythonPackage rec {
pname = "blackjax";
version = "1.2.2";
pyproject = true;
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "blackjax-devs";
repo = "blackjax";
rev = "refs/tags/${version}";
hash = "sha256-W89L/3bpvecZdCpLCQOppev+fPc+SXd/T+zZLBH2wJs=";
};
build-system = [ setuptools-scm ];
dependencies = [
fastprogress
jax
jaxlib
jaxopt
optax
typing-extensions
];
nativeCheckInputs = [
pytestCheckHook
pytest-xdist
];
disabledTestPaths =
[ "tests/test_benchmarks.py" ]
++ lib.optionals (stdenv.isLinux && stdenv.isAarch64) [
# Assertion errors on numerical values
"tests/mcmc/test_integrators.py"
];
disabledTests =
[
# too slow
"test_adaptive_tempered_smc"
]
++ lib.optionals (stdenv.isLinux && stdenv.isAarch64) [
# Numerical test (AssertionError)
# https://github.com/blackjax-devs/blackjax/issues/668
"test_chees_adaptation"
];
pythonImportsCheck = [ "blackjax" ];
meta = {
homepage = "https://blackjax-devs.github.io/blackjax";
description = "Sampling library designed for ease of use, speed and modularity";
changelog = "https://github.com/blackjax-devs/blackjax/releases/tag/${version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ bcdarwin ];
};
}