1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, keras
5, numba
6, numpy
7, pynndescent
8, pytestCheckHook
9, pythonOlder
10, scikit-learn
11, scipy
12, tensorflow
13, tqdm
14}:
15
16buildPythonPackage rec {
17 pname = "umap-learn";
18 version = "0.5.3";
19 format = "setuptools";
20
21 disabled = pythonOlder "3.7";
22
23 src = fetchFromGitHub {
24 owner = "lmcinnes";
25 repo = "umap";
26 rev = version;
27 hash = "sha256-S2+k7Ec4AxsN6d0GUGnU81oLnBgmlZp8OmUFCNaUJYw=";
28 };
29
30 propagatedBuildInputs = [
31 numba
32 numpy
33 pynndescent
34 scikit-learn
35 scipy
36 tqdm
37 ];
38
39 checkInputs = [
40 keras
41 pytestCheckHook
42 tensorflow
43 ];
44
45 preCheck = ''
46 export HOME=$TMPDIR
47 '';
48
49 disabledTests = [
50 # Plot functionality requires additional packages.
51 # These test also fail with 'RuntimeError: cannot cache function' error.
52 "test_umap_plot_testability"
53 "test_plot_runs_at_all"
54
55 # Flaky test. Fails with AssertionError sometimes.
56 "test_sparse_hellinger"
57 "test_densmap_trustworthiness_on_iris_supervised"
58
59 # tensorflow maybe incompatible? https://github.com/lmcinnes/umap/issues/821
60 "test_save_load"
61 ];
62
63 meta = with lib; {
64 description = "Uniform Manifold Approximation and Projection";
65 homepage = "https://github.com/lmcinnes/umap";
66 license = licenses.bsd3;
67 maintainers = with maintainers; [ costrouc ];
68 };
69}