2023-02-22 10:55:15 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pytestCheckHook
|
2023-10-19 13:55:26 +00:00
|
|
|
, setuptools-scm
|
2023-02-22 10:55:15 +00:00
|
|
|
, fastprogress
|
|
|
|
, jax
|
|
|
|
, jaxlib
|
|
|
|
, jaxopt
|
|
|
|
, optax
|
|
|
|
, typing-extensions
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "blackjax";
|
2023-10-19 13:55:26 +00:00
|
|
|
version = "1.0.0";
|
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.8";
|
2023-02-22 10:55:15 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "blackjax-devs";
|
|
|
|
repo = pname;
|
|
|
|
rev = "refs/tags/${version}";
|
2023-10-19 13:55:26 +00:00
|
|
|
hash = "sha256-hqOKSHyZ/BmOu6MJLeecD3H1BbLbZqywmlBzn3xjQRk=";
|
2023-02-22 10:55:15 +00:00
|
|
|
};
|
|
|
|
|
2023-10-19 13:55:26 +00:00
|
|
|
nativeBuildInputs = [ setuptools-scm ];
|
|
|
|
|
|
|
|
env.SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
2023-02-22 10:55:15 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
fastprogress
|
|
|
|
jax
|
|
|
|
jaxlib
|
|
|
|
jaxopt
|
|
|
|
optax
|
|
|
|
typing-extensions
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
|
|
|
disabledTestPaths = [ "tests/test_benchmarks.py" ];
|
|
|
|
disabledTests = [
|
|
|
|
# too slow
|
|
|
|
"test_adaptive_tempered_smc"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"blackjax"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://blackjax-devs.github.io/blackjax";
|
|
|
|
description = "Sampling library designed for ease of use, speed and modularity";
|
2023-10-19 13:55:26 +00:00
|
|
|
changelog = "https://github.com/blackjax-devs/blackjax/releases/tag/${version}";
|
2023-02-22 10:55:15 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ bcdarwin ];
|
|
|
|
};
|
|
|
|
}
|