2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2023-10-09 19:29:22 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, alembic
|
|
|
|
, boto3
|
|
|
|
, botorch
|
|
|
|
, catboost
|
2020-04-24 23:36:52 +00:00
|
|
|
, cma
|
2023-10-09 19:29:22 +00:00
|
|
|
, cmaes
|
2020-04-24 23:36:52 +00:00
|
|
|
, colorlog
|
2023-10-09 19:29:22 +00:00
|
|
|
, distributed
|
|
|
|
, fakeredis
|
|
|
|
, fastai
|
2023-11-16 04:20:00 +00:00
|
|
|
, google-cloud-storage
|
2023-10-09 19:29:22 +00:00
|
|
|
, lightgbm
|
|
|
|
, matplotlib
|
|
|
|
, mlflow
|
|
|
|
, moto
|
|
|
|
, numpy
|
|
|
|
, packaging
|
2020-04-24 23:36:52 +00:00
|
|
|
, pandas
|
2023-10-09 19:29:22 +00:00
|
|
|
, plotly
|
|
|
|
, pytest-xdist
|
|
|
|
, pytorch-lightning
|
|
|
|
, pyyaml
|
|
|
|
, redis
|
|
|
|
, scikit-learn
|
|
|
|
, scikit-optimize
|
|
|
|
, scipy
|
|
|
|
, setuptools
|
|
|
|
, shap
|
|
|
|
, sqlalchemy
|
|
|
|
, tensorflow
|
|
|
|
, torch
|
|
|
|
, torchaudio
|
|
|
|
, torchvision
|
2020-04-24 23:36:52 +00:00
|
|
|
, tqdm
|
2023-10-09 19:29:22 +00:00
|
|
|
, wandb
|
|
|
|
, wheel
|
|
|
|
, xgboost
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "optuna";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "3.4.0";
|
2023-10-09 19:29:22 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "optuna";
|
2023-10-09 19:29:22 +00:00
|
|
|
repo = "optuna";
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-WUjO13NxX0FneOPS4nn6aHq48X95r+GJR/Oxir6n8Pk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
wheel
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
alembic
|
2023-10-09 19:29:22 +00:00
|
|
|
colorlog
|
|
|
|
numpy
|
|
|
|
packaging
|
|
|
|
sqlalchemy
|
2020-04-24 23:36:52 +00:00
|
|
|
tqdm
|
2023-10-09 19:29:22 +00:00
|
|
|
pyyaml
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
integration = [
|
|
|
|
botorch
|
|
|
|
catboost
|
|
|
|
cma
|
|
|
|
distributed
|
|
|
|
fastai
|
|
|
|
lightgbm
|
|
|
|
mlflow
|
|
|
|
pandas
|
|
|
|
# pytorch-ignite
|
|
|
|
pytorch-lightning
|
|
|
|
scikit-learn
|
|
|
|
scikit-optimize
|
|
|
|
shap
|
|
|
|
tensorflow
|
|
|
|
torch
|
|
|
|
torchaudio
|
|
|
|
torchvision
|
|
|
|
wandb
|
|
|
|
xgboost
|
|
|
|
];
|
|
|
|
optional = [
|
|
|
|
boto3
|
|
|
|
botorch
|
2023-11-16 04:20:00 +00:00
|
|
|
cmaes
|
|
|
|
google-cloud-storage
|
2023-10-09 19:29:22 +00:00
|
|
|
matplotlib
|
|
|
|
pandas
|
|
|
|
plotly
|
|
|
|
redis
|
|
|
|
scikit-learn
|
|
|
|
];
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
preCheck = ''
|
|
|
|
export PATH=$out/bin:$PATH
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
fakeredis
|
|
|
|
moto
|
|
|
|
pytest-xdist
|
|
|
|
pytestCheckHook
|
|
|
|
scipy
|
|
|
|
] ++ fakeredis.optional-dependencies.lua
|
|
|
|
++ passthru.optional-dependencies.optional;
|
|
|
|
|
|
|
|
pytestFlagsArray = [
|
|
|
|
"-m 'not integration'"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# require unpackaged kaleido and building it is a bit difficult
|
|
|
|
"tests/visualization_tests"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"optuna"
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A hyperparameter optimization framework";
|
|
|
|
homepage = "https://optuna.org/";
|
2023-10-09 19:29:22 +00:00
|
|
|
changelog = "https://github.com/optuna/optuna/releases/tag/${src.rev}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2023-10-09 19:29:22 +00:00
|
|
|
maintainers = with maintainers; [ natsukium ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|