Something went wrong. Try again.
lol
Something went wrong. Try again.
3.6 kB · 152 lines
Nix
at master
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153{ lib, stdenv, buildPythonPackage, fetchFromGitHub,
# build-system setuptools, setuptools-scm,
# dependencies arviz-plots, formulae, graphviz, matplotlib, pandas, pymc, sparse,
# tests blackjax, numpyro, pytestCheckHook, writableTmpDirAsHomeHook,}:
buildPythonPackage (finalAttrs: { pname = "bambi"; version = "0.17.2"; pyproject = true;
src = fetchFromGitHub { owner = "bambinos"; repo = "bambi"; tag = finalAttrs.version; hash = "sha256-Vjv62cYDIuTLE7MxRt4Havy7DMOiMTyIixbs4LGFGGs="; };
# TypeError: NDArray.record() missing 1 required keyword-only argument: 'in_warmup' postPatch = '' substituteInPlace bambi/backend/pymc.py \ --replace-fail \ "strace.record(point=dict(zip(varnames, value)))" \ "strace.record(point=dict(zip(varnames, value)), in_warmup=False)" '';
build-system = [ setuptools setuptools-scm ];
pythonRelaxDeps = [ "sparse" ]; dependencies = [ arviz-plots formulae graphviz matplotlib pandas pymc sparse ];
optional-dependencies = { jax = [ # not (yet) available in nixpkgs (https://github.com/NixOS/nixpkgs/pull/345438) # bayeux-ml ]; };
nativeCheckInputs = [ # bayeux-ml blackjax numpyro pytestCheckHook writableTmpDirAsHomeHook ];
disabledTests = [ # ValueError: dtype attribute is not a valid dtype instance "test_vonmises_regression"
# AssertionError: assert (<xarray.DataArray 'yield' ()> Size: 1B\narray(False) & <xarray.DataArray 'yield' ()> Size: 1B\narray(False)) # https://github.com/bambinos/bambi/issues/888 "test_beta_regression"
# Failing since blackjax was updated to 1.4 # ValueError: cannot select an axis to squeeze out which has size not equal to one, # got shape=(4, 2) and dimensions=(0,) "test_blackjax_method" "test_legacy_nuts_blackjax_warning"
# Tests require network access "test_alias_equal_to_name" "test_average_by" "test_ax" "test_basic" "test_censored_response" "test_custom_prior" "test_data_is_copied" "test_distributional_model" "test_elasticity" "test_extra_namespace" "test_fig_kwargs" "test_gamma_with_splines" "test_group_effects" "test_hdi_prob" "test_legend" "test_model_with_group_specific_effects" "test_model_with_intercept" "test_model_without_intercept" "test_non_distributional_model" "test_normal_with_splines" "test_predict_new_groups" "test_predict_new_groups_fail" "test_predict_offset" "test_same_variable_conditional_and_group" "test_set_alias_warnings" "test_subplot_kwargs" "test_transforms" "test_use_hdi" "test_with_group_and_panel" "test_with_groups" "test_with_user_values" ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ # Python crash (in matplotlib) # Fatal Python error: Aborted "test_categorical_response" "test_multiple_hsgp_and_by" "test_multiple_outputs_with_alias" "test_plot_priors" "test_term_transformations" ];
disabledTestPaths = [ # Tests require network access "tests/test_interpret.py" "tests/test_interpret_messages.py" ];
pythonImportsCheck = [ "bambi" ];
meta = { description = "High-level Bayesian model-building interface"; homepage = "https://bambinos.github.io/bambi"; changelog = "https://github.com/bambinos/bambi/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ bcdarwin ]; };})