2019-07-11 18:47:57 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2019-12-31 16:27:36 +00:00
|
|
|
, fetchFromGitHub
|
2019-07-11 18:47:57 +00:00
|
|
|
, pytest
|
|
|
|
, mock
|
|
|
|
, bokeh
|
|
|
|
, plotly
|
|
|
|
, chainer
|
|
|
|
, xgboost
|
|
|
|
, mpi4py
|
|
|
|
, lightgbm
|
|
|
|
, Keras
|
|
|
|
, mxnet
|
|
|
|
, scikit-optimize
|
|
|
|
, tensorflow
|
2019-12-31 16:27:36 +00:00
|
|
|
, cma
|
2019-07-11 18:47:57 +00:00
|
|
|
, sqlalchemy
|
|
|
|
, numpy
|
|
|
|
, scipy
|
|
|
|
, six
|
|
|
|
, cliff
|
|
|
|
, colorlog
|
|
|
|
, pandas
|
|
|
|
, alembic
|
2019-12-31 16:27:36 +00:00
|
|
|
, tqdm
|
2019-07-11 18:47:57 +00:00
|
|
|
, typing
|
|
|
|
, pythonOlder
|
|
|
|
, isPy27
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "optuna";
|
2021-03-24 17:41:51 +00:00
|
|
|
version = "2.6.0";
|
2019-07-11 18:47:57 +00:00
|
|
|
disabled = isPy27;
|
|
|
|
|
2019-12-31 16:27:36 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "optuna";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-03-24 17:41:51 +00:00
|
|
|
sha256 = "11mskhb7i55i04cy0vkxi7kpaifbz8zc2m8x9s5y6yyyjinvly36";
|
2019-07-11 18:47:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytest
|
|
|
|
mock
|
|
|
|
bokeh
|
|
|
|
plotly
|
|
|
|
chainer
|
|
|
|
xgboost
|
|
|
|
mpi4py
|
|
|
|
lightgbm
|
|
|
|
Keras
|
|
|
|
mxnet
|
|
|
|
scikit-optimize
|
|
|
|
tensorflow
|
2019-12-31 16:27:36 +00:00
|
|
|
cma
|
2019-07-11 18:47:57 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
sqlalchemy
|
|
|
|
numpy
|
|
|
|
scipy
|
|
|
|
six
|
|
|
|
cliff
|
|
|
|
colorlog
|
|
|
|
pandas
|
|
|
|
alembic
|
2019-12-31 16:27:36 +00:00
|
|
|
tqdm
|
|
|
|
] ++ lib.optionals (pythonOlder "3.5") [
|
|
|
|
typing
|
|
|
|
];
|
2019-07-11 18:47:57 +00:00
|
|
|
|
|
|
|
configurePhase = if !(pythonOlder "3.5") then ''
|
|
|
|
substituteInPlace setup.py \
|
2019-12-31 16:27:36 +00:00
|
|
|
--replace "'typing'," ""
|
2019-07-11 18:47:57 +00:00
|
|
|
'' else "";
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
pytest --ignore tests/test_cli.py \
|
2019-12-31 16:27:36 +00:00
|
|
|
--ignore tests/integration_tests/test_chainermn.py \
|
|
|
|
--ignore tests/integration_tests/test_pytorch_lightning.py \
|
|
|
|
--ignore tests/integration_tests/test_pytorch_ignite.py \
|
|
|
|
--ignore tests/integration_tests/test_fastai.py
|
2019-07-11 18:47:57 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2021-01-10 20:58:24 +00:00
|
|
|
broken = true; # Dashboard broken, other build failures.
|
2019-07-11 18:47:57 +00:00
|
|
|
description = "A hyperparameter optimization framework";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://optuna.org/";
|
2019-07-11 18:47:57 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
};
|
|
|
|
}
|