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

93 lines
1.5 KiB
Nix
Raw Normal View History

2019-07-11 20:47:57 +02:00
{ lib
, buildPythonPackage
, fetchFromGitHub
2019-07-11 20:47:57 +02:00
, pytest
, mock
, bokeh
, plotly
, chainer
, xgboost
, mpi4py
, lightgbm
, Keras
, mxnet
, scikit-optimize
, tensorflow
, cma
2019-07-11 20:47:57 +02:00
, sqlalchemy
, numpy
, scipy
, six
, cliff
, colorlog
, pandas
, alembic
, tqdm
2019-07-11 20:47:57 +02:00
, typing
, pythonOlder
, isPy27
}:
buildPythonPackage rec {
pname = "optuna";
2019-12-19 20:31:16 +01:00
version = "0.19.0";
2019-07-11 20:47:57 +02:00
disabled = isPy27;
src = fetchFromGitHub {
owner = "optuna";
repo = pname;
rev = "v${version}";
sha256 = "179x2lsckpmkrkkdnvvbzky86g1ba882z677qwbayhsc835wbp0y";
2019-07-11 20:47:57 +02:00
};
checkInputs = [
pytest
mock
bokeh
plotly
chainer
xgboost
mpi4py
lightgbm
Keras
mxnet
scikit-optimize
tensorflow
cma
2019-07-11 20:47:57 +02:00
];
propagatedBuildInputs = [
sqlalchemy
numpy
scipy
six
cliff
colorlog
pandas
alembic
tqdm
] ++ lib.optionals (pythonOlder "3.5") [
typing
];
2019-07-11 20:47:57 +02:00
configurePhase = if !(pythonOlder "3.5") then ''
substituteInPlace setup.py \
--replace "'typing'," ""
2019-07-11 20:47:57 +02:00
'' else "";
checkPhase = ''
pytest --ignore tests/test_cli.py \
--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 20:47:57 +02:00
'';
meta = with lib; {
description = "A hyperparameter optimization framework";
homepage = "https://optuna.org/";
2019-07-11 20:47:57 +02:00
license = licenses.mit;
maintainers = [ maintainers.costrouc ];
};
}