nixpkgs/pkgs/development/python-modules/optuna/default.nix

82 lines
1.3 KiB
Nix
Raw Normal View History

2019-07-11 20:47:57 +02:00
{ lib
, buildPythonPackage
, fetchPypi
, pytest
, mock
, bokeh
, plotly
, chainer
, xgboost
, mpi4py
, lightgbm
, Keras
, mxnet
, scikit-optimize
, tensorflow
, sqlalchemy
, numpy
, scipy
, six
, cliff
, colorlog
, pandas
, alembic
, typing
, pythonOlder
, isPy27
}:
buildPythonPackage rec {
pname = "optuna";
version = "0.13.0";
disabled = isPy27;
src = fetchPypi {
inherit pname version;
sha256 = "915b9d7b28f7f7cdf015d8617c689ca90eda7a5bbd59c5fc232c9eccc9a91585";
};
checkInputs = [
pytest
mock
bokeh
plotly
chainer
xgboost
mpi4py
lightgbm
Keras
mxnet
scikit-optimize
tensorflow
];
propagatedBuildInputs = [
sqlalchemy
numpy
scipy
six
cliff
colorlog
pandas
alembic
] ++ lib.optionals (pythonOlder "3.5") [ typing ];
configurePhase = if !(pythonOlder "3.5") then ''
substituteInPlace setup.py \
--replace "'typing'" ""
'' else "";
checkPhase = ''
pytest --ignore tests/test_cli.py \
--ignore tests/integration_tests/test_chainermn.py
'';
meta = with lib; {
description = "A hyperparameter optimization framework";
homepage = https://optuna.org/;
license = licenses.mit;
maintainers = [ maintainers.costrouc ];
};
}