1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pytest
5, mock
6, bokeh
7, plotly
8, chainer
9, xgboost
10, mpi4py
11, lightgbm
12, keras
13, mxnet
14, scikit-optimize
15, tensorflow
16, cma
17, sqlalchemy
18, numpy
19, scipy
20, six
21, cliff
22, colorlog
23, pandas
24, alembic
25, tqdm
26, typing
27, pythonOlder
28, isPy27
29}:
30
31buildPythonPackage rec {
32 pname = "optuna";
33 version = "2.10.1";
34 disabled = isPy27;
35
36 src = fetchFromGitHub {
37 owner = "optuna";
38 repo = pname;
39 rev = "refs/tags/v${version}";
40 sha256 = "sha256-HHVEoLCZtEJEfc4xYobQrzRcDDxxeQjgL2Rw2KeVbi0=";
41 };
42
43 checkInputs = [
44 pytest
45 mock
46 bokeh
47 plotly
48 chainer
49 xgboost
50 mpi4py
51 lightgbm
52 keras
53 mxnet
54 scikit-optimize
55 tensorflow
56 cma
57 ];
58
59 propagatedBuildInputs = [
60 sqlalchemy
61 numpy
62 scipy
63 six
64 cliff
65 colorlog
66 pandas
67 alembic
68 tqdm
69 ] ++ lib.optionals (pythonOlder "3.5") [
70 typing
71 ];
72
73 configurePhase = if !(pythonOlder "3.5") then ''
74 substituteInPlace setup.py \
75 --replace "'typing'," ""
76 '' else "";
77
78 checkPhase = ''
79 pytest --ignore tests/test_cli.py \
80 --ignore tests/integration_tests/test_chainermn.py \
81 --ignore tests/integration_tests/test_pytorch_lightning.py \
82 --ignore tests/integration_tests/test_pytorch_ignite.py \
83 --ignore tests/integration_tests/test_fastai.py
84 '';
85
86 meta = with lib; {
87 broken = true; # Dashboard broken, other build failures.
88 description = "A hyperparameter optimization framework";
89 homepage = "https://optuna.org/";
90 license = licenses.mit;
91 maintainers = [ maintainers.costrouc ];
92 };
93}