Something went wrong. Try again.
lol
Something went wrong. Try again.
2.0 kB · 105 lines
Nix
at master
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106{ lib, stdenv, buildPythonPackage, fetchFromGitHub,
# build-system setuptools, setuptools-scm,
# dependencies jax, jaxlib, numpy, optax, scipy, typing-extensions,
# optional-dependencies fastprogress,
# checks chex, pytest-xdist, pytestCheckHook,}:
buildPythonPackage (finalAttrs: { pname = "blackjax"; version = "1.5"; pyproject = true;
src = fetchFromGitHub { owner = "blackjax-devs"; repo = "blackjax"; tag = finalAttrs.version; hash = "sha256-tKJfukTqSiW2Xg3/8DakxtxlwGpJ14S/7qUE1OGM97I="; };
build-system = [ setuptools setuptools-scm ];
dependencies = [ jax jaxlib numpy optax scipy typing-extensions ];
optional-dependencies = { progress = [ fastprogress ]; };
nativeCheckInputs = [ chex pytestCheckHook pytest-xdist ] ++ finalAttrs.passthru.optional-dependencies.progress;
disabledTestPaths = [ "tests/test_benchmarks.py"
# Assertion errors on numerical values "tests/mcmc/test_integrators.py" ];
disabledTests = [ # too slow "test_adaptive_tempered_smc"
# AssertionError on numerical values "test_barker" "test_mclmc" "test_mcse4" "test_mean_and_std" "test_normal_univariate" "test_nuts__with_device" "test_nuts__with_jit" "test_nuts__without_device" "test_nuts__without_jit" "test_smc__with_jit" "test_smc_waste_free__with_jit" ] ++ lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) [ # AssertionError: Not equal to tolerance rtol=1e-07, atol=1e-05 "test_equal_matrices" ];
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/${finalAttrs.src.tag}"; license = lib.licenses.asl20; maintainers = with lib.maintainers; [ bcdarwin ]; };})