depot/third_party/nixpkgs/pkgs/development/python-modules/umap-learn/default.nix
Default email 5ca88bfbb9 Project import generated by Copybara.
GitOrigin-RevId: 9f918d616c5321ad374ae6cb5ea89c9e04bf3e58
2024-07-31 10:19:44 +00:00

97 lines
1.8 KiB
Nix

{
lib,
bokeh,
buildPythonPackage,
colorcet,
datashader,
fetchFromGitHub,
holoviews,
matplotlib,
numba,
numpy,
pandas,
pynndescent,
pytestCheckHook,
pythonOlder,
scikit-image,
scikit-learn,
scipy,
seaborn,
tensorflow,
tensorflow-probability,
tqdm,
}:
buildPythonPackage rec {
pname = "umap-learn";
version = "0.5.6";
format = "setuptools";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "lmcinnes";
repo = "umap";
rev = "refs/tags/release-${version}";
hash = "sha256-fqYl8T53BgCqsquY6RJHqpDFsdZA0Ihja69E/kG3YGU=";
};
propagatedBuildInputs = [
numba
numpy
pynndescent
scikit-learn
scipy
tqdm
];
passthru.optional-dependencies = rec {
plot = [
bokeh
colorcet
datashader
holoviews
matplotlib
pandas
scikit-image
seaborn
];
parametric_umap = [
tensorflow
tensorflow-probability
];
tbb = [ tbb ];
all = plot ++ parametric_umap ++ tbb;
};
nativeCheckInputs = [ pytestCheckHook ];
preCheck = ''
export HOME=$TMPDIR
'';
disabledTests = [
# Plot functionality requires additional packages.
# These test also fail with 'RuntimeError: cannot cache function' error.
"test_plot_runs_at_all"
"test_umap_plot_testability"
"test_umap_update_large"
# Flaky test. Fails with AssertionError sometimes.
"test_sparse_hellinger"
"test_densmap_trustworthiness_on_iris_supervised"
# tensorflow maybe incompatible? https://github.com/lmcinnes/umap/issues/821
"test_save_load"
];
meta = with lib; {
description = "Uniform Manifold Approximation and Projection";
homepage = "https://github.com/lmcinnes/umap";
license = licenses.bsd3;
maintainers = [ ];
};
}