686ce24904
GitOrigin-RevId: ac1f5b72a9e95873d1de0233fddcb56f99884b37
93 lines
1.6 KiB
Nix
93 lines
1.6 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, pytest
|
|
, mock
|
|
, bokeh
|
|
, plotly
|
|
, chainer
|
|
, xgboost
|
|
, mpi4py
|
|
, lightgbm
|
|
, keras
|
|
, mxnet
|
|
, scikit-optimize
|
|
, tensorflow
|
|
, cma
|
|
, sqlalchemy
|
|
, numpy
|
|
, scipy
|
|
, six
|
|
, cliff
|
|
, colorlog
|
|
, pandas
|
|
, alembic
|
|
, tqdm
|
|
, typing
|
|
, pythonOlder
|
|
, isPy27
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "optuna";
|
|
version = "3.0.5";
|
|
disabled = isPy27;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "optuna";
|
|
repo = pname;
|
|
rev = "refs/tags/v${version}";
|
|
sha256 = "sha256-TfAWL81a7GIePkPm+2uXinBP5jwnhWCZPp5GJjXOC6g=";
|
|
};
|
|
|
|
nativeCheckInputs = [
|
|
pytest
|
|
mock
|
|
bokeh
|
|
plotly
|
|
chainer
|
|
xgboost
|
|
mpi4py
|
|
lightgbm
|
|
keras
|
|
mxnet
|
|
scikit-optimize
|
|
tensorflow
|
|
cma
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
sqlalchemy
|
|
numpy
|
|
scipy
|
|
six
|
|
cliff
|
|
colorlog
|
|
pandas
|
|
alembic
|
|
tqdm
|
|
] ++ lib.optionals (pythonOlder "3.5") [
|
|
typing
|
|
];
|
|
|
|
configurePhase = lib.optionalString (! pythonOlder "3.5") ''
|
|
substituteInPlace setup.py \
|
|
--replace "'typing'," ""
|
|
'';
|
|
|
|
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
|
|
'';
|
|
|
|
meta = with lib; {
|
|
broken = true; # Dashboard broken, other build failures.
|
|
description = "A hyperparameter optimization framework";
|
|
homepage = "https://optuna.org/";
|
|
license = licenses.mit;
|
|
maintainers = [ maintainers.costrouc ];
|
|
};
|
|
}
|