Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / optuna / default.nix
blob97f065323c728fc9f6e916601870ed144337805d
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , pytestCheckHook
5 , pythonOlder
6 , alembic
7 , boto3
8 , botorch
9 , catboost
10 , cma
11 , cmaes
12 , colorlog
13 , distributed
14 , fakeredis
15 , google-cloud-storage
16 , lightgbm
17 , matplotlib
18 , mlflow
19 , moto
20 , numpy
21 , packaging
22 , pandas
23 , plotly
24 , pytest-xdist
25 , pytorch-lightning
26 , pyyaml
27 , redis
28 , scikit-learn
29 , scikit-optimize
30 , scipy
31 , setuptools
32 , shap
33 , sqlalchemy
34 , tensorflow
35 , torch
36 , torchaudio
37 , torchvision
38 , tqdm
39 , wandb
40 , wheel
41 , xgboost
44 buildPythonPackage rec {
45   pname = "optuna";
46   version = "3.6.1";
47   pyproject = true;
49   disabled = pythonOlder "3.7";
51   src = fetchFromGitHub {
52     owner = "optuna";
53     repo = "optuna";
54     rev = "refs/tags/v${version}";
55     hash = "sha256-+ZqMRIza4K5VWTUm7tC87S08SI+C8GKd2Uh3rGoHwd0=";
56   };
58   nativeBuildInputs = [
59     setuptools
60     wheel
61   ];
63   propagatedBuildInputs = [
64     alembic
65     colorlog
66     numpy
67     packaging
68     sqlalchemy
69     tqdm
70     pyyaml
71   ];
73   passthru.optional-dependencies = {
74     integration = [
75       botorch
76       catboost
77       cma
78       distributed
79       lightgbm
80       mlflow
81       pandas
82       # pytorch-ignite
83       pytorch-lightning
84       scikit-learn
85       scikit-optimize
86       shap
87       tensorflow
88       torch
89       torchaudio
90       torchvision
91       wandb
92       xgboost
93     ];
94     optional = [
95       boto3
96       botorch
97       cmaes
98       google-cloud-storage
99       matplotlib
100       pandas
101       plotly
102       redis
103       scikit-learn
104     ];
105   };
107   preCheck = ''
108     export PATH=$out/bin:$PATH
109   '';
111   nativeCheckInputs = [
112     fakeredis
113     moto
114     pytest-xdist
115     pytestCheckHook
116     scipy
117   ] ++ fakeredis.optional-dependencies.lua
118     ++ passthru.optional-dependencies.optional;
120   pytestFlagsArray = [
121     "-m 'not integration'"
122   ];
124   disabledTestPaths = [
125     # require unpackaged kaleido and building it is a bit difficult
126     "tests/visualization_tests"
127     # ImportError: cannot import name 'mock_s3' from 'moto'
128     "tests/artifacts_tests/test_boto3.py"
129   ];
131   pythonImportsCheck = [
132     "optuna"
133   ];
135   meta = with lib; {
136     description = "A hyperparameter optimization framework";
137     homepage = "https://optuna.org/";
138     changelog = "https://github.com/optuna/optuna/releases/tag/${version}";
139     license = licenses.mit;
140     maintainers = with maintainers; [ natsukium ];
141     mainProgram = "optuna";
142   };