2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
2024-02-07 01:22:34 +00:00
|
|
|
, bokeh
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
2024-02-07 01:22:34 +00:00
|
|
|
, colorcet
|
|
|
|
, datashader
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchFromGitHub
|
2024-02-07 01:22:34 +00:00
|
|
|
, holoviews
|
|
|
|
, matplotlib
|
2022-06-16 17:23:12 +00:00
|
|
|
, numba
|
2020-04-24 23:36:52 +00:00
|
|
|
, numpy
|
2024-02-07 01:22:34 +00:00
|
|
|
, pandas
|
2022-06-16 17:23:12 +00:00
|
|
|
, pynndescent
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2024-02-07 01:22:34 +00:00
|
|
|
, scikit-image
|
2021-05-20 23:08:51 +00:00
|
|
|
, scikit-learn
|
2020-04-24 23:36:52 +00:00
|
|
|
, scipy
|
2024-02-07 01:22:34 +00:00
|
|
|
, seaborn
|
|
|
|
, tbb
|
2021-02-05 17:12:51 +00:00
|
|
|
, tensorflow
|
2024-02-07 01:22:34 +00:00
|
|
|
, tensorflow-probability
|
2021-12-19 01:06:50 +00:00
|
|
|
, tqdm
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "umap-learn";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.5.6";
|
2022-06-16 17:23:12 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lmcinnes";
|
|
|
|
repo = "umap";
|
2024-01-02 11:29:13 +00:00
|
|
|
rev = "refs/tags/release-${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-fqYl8T53BgCqsquY6RJHqpDFsdZA0Ihja69E/kG3YGU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2022-06-16 17:23:12 +00:00
|
|
|
numba
|
2020-04-24 23:36:52 +00:00
|
|
|
numpy
|
2022-06-16 17:23:12 +00:00
|
|
|
pynndescent
|
2021-05-20 23:08:51 +00:00
|
|
|
scikit-learn
|
2020-04-24 23:36:52 +00:00
|
|
|
scipy
|
2021-12-19 01:06:50 +00:00
|
|
|
tqdm
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-06-16 17:23:12 +00:00
|
|
|
pytestCheckHook
|
2021-05-03 20:48:10 +00:00
|
|
|
];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
preCheck = ''
|
|
|
|
export HOME=$TMPDIR
|
|
|
|
'';
|
|
|
|
|
2020-10-16 20:44:37 +00:00
|
|
|
disabledTests = [
|
|
|
|
# Plot functionality requires additional packages.
|
|
|
|
# These test also fail with 'RuntimeError: cannot cache function' error.
|
|
|
|
"test_plot_runs_at_all"
|
2024-02-07 01:22:34 +00:00
|
|
|
"test_umap_plot_testability"
|
|
|
|
"test_umap_update_large"
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-10-16 20:44:37 +00:00
|
|
|
# Flaky test. Fails with AssertionError sometimes.
|
|
|
|
"test_sparse_hellinger"
|
2022-06-16 17:23:12 +00:00
|
|
|
"test_densmap_trustworthiness_on_iris_supervised"
|
2022-01-13 20:06:32 +00:00
|
|
|
|
|
|
|
# tensorflow maybe incompatible? https://github.com/lmcinnes/umap/issues/821
|
|
|
|
"test_save_load"
|
2020-10-16 20:44:37 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Uniform Manifold Approximation and Projection";
|
|
|
|
homepage = "https://github.com/lmcinnes/umap";
|
|
|
|
license = licenses.bsd3;
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|