Skip to content

Commit 1cef622

Browse files
authored
python312Packages.optuna: 4.2.0 -> 4.2.1 (NixOS#382097)
2 parents fb55e3c + 4840ab7 commit 1cef622

File tree

2 files changed

+76
-34
lines changed

2 files changed

+76
-34
lines changed

pkgs/development/python-modules/librosa/default.nix

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
lib,
33
stdenv,
44
buildPythonPackage,
5+
pythonAtLeast,
56
fetchFromGitHub,
67
fetchpatch2,
78

@@ -32,12 +33,15 @@
3233
pytestCheckHook,
3334
resampy,
3435
samplerate,
36+
writableTmpDirAsHomeHook,
3537
}:
3638

3739
buildPythonPackage rec {
3840
pname = "librosa";
3941
version = "0.10.2.post1";
40-
format = "pyproject";
42+
pyproject = true;
43+
44+
disabled = pythonAtLeast "3.13";
4145

4246
src = fetchFromGitHub {
4347
owner = "librosa";
@@ -94,12 +98,9 @@ buildPythonPackage rec {
9498
pytestCheckHook
9599
resampy
96100
samplerate
101+
writableTmpDirAsHomeHook
97102
] ++ optional-dependencies.matplotlib;
98103

99-
preCheck = ''
100-
export HOME=$(mktemp -d)
101-
'';
102-
103104
disabledTests =
104105
[
105106
# requires network access
@@ -137,5 +138,10 @@ buildPythonPackage rec {
137138
changelog = "https://github.com/librosa/librosa/releases/tag/${version}";
138139
license = lib.licenses.isc;
139140
maintainers = with lib.maintainers; [ GuillaumeDesforges ];
141+
badPlatforms = [
142+
# Several non-deterministic occurances of "Fatal Python error: Segmentation fault", both in
143+
# numpy's and in this package's code.
144+
"aarch64-linux"
145+
];
140146
};
141147
}
Lines changed: 65 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,56 @@
11
{
22
lib,
3+
stdenv,
34
buildPythonPackage,
45
fetchFromGitHub,
5-
pytestCheckHook,
6-
pythonOlder,
6+
7+
# build-system
8+
setuptools,
9+
10+
# dependencies
711
alembic,
12+
colorlog,
13+
numpy,
14+
packaging,
15+
sqlalchemy,
16+
tqdm,
17+
pyyaml,
18+
19+
# optional-dependencies
820
boto3,
921
cmaes,
10-
colorlog,
11-
fakeredis,
1222
fvcore,
1323
google-cloud-storage,
1424
grpcio,
15-
kaleido,
1625
matplotlib,
17-
moto,
18-
numpy,
19-
packaging,
2026
pandas,
2127
plotly,
2228
protobuf,
23-
pytest-xdist,
24-
pyyaml,
2529
redis,
2630
scikit-learn,
2731
scipy,
28-
setuptools,
29-
sqlalchemy,
32+
33+
# tests
34+
addBinToPathHook,
35+
fakeredis,
36+
kaleido,
37+
moto,
38+
pytest-xdist,
39+
pytestCheckHook,
3040
torch,
31-
tqdm,
41+
versionCheckHook,
3242
}:
3343

3444
buildPythonPackage rec {
3545
pname = "optuna";
36-
version = "4.2.0";
46+
version = "4.2.1";
3747
pyproject = true;
3848

39-
disabled = pythonOlder "3.8";
40-
4149
src = fetchFromGitHub {
4250
owner = "optuna";
4351
repo = "optuna";
4452
tag = "v${version}";
45-
hash = "sha256-NNlwrVrGg2WvkC42nmW7K/mRktE3B97GaL8GaSOKF1Y=";
53+
hash = "sha256-WLrdHrdfCtCZMW2J375N8vmod7FcKCMwQPGKicRA878=";
4654
};
4755

4856
build-system = [
@@ -76,40 +84,68 @@ buildPythonPackage rec {
7684
];
7785
};
7886

87+
# grpc tests are racy
7988
preCheck = ''
80-
export PATH=$out/bin:$PATH
81-
82-
# grpc tests are racy
8389
sed -i '/"grpc",/d' optuna/testing/storages.py
8490
'';
8591

8692
nativeCheckInputs =
8793
[
94+
addBinToPathHook
8895
fakeredis
8996
kaleido
9097
moto
9198
pytest-xdist
9299
pytestCheckHook
93100
torch
101+
versionCheckHook
94102
]
95103
++ fakeredis.optional-dependencies.lua
96104
++ optional-dependencies.optional;
105+
versionCheckProgramArg = [ "--version" ];
97106

98-
disabledTests = [
99-
# ValueError: Transform failed with error code 525: error creating static canvas/context for image server
100-
"test_get_pareto_front_plot"
101-
# too narrow time limit
102-
"test_get_timeline_plot_with_killed_running_trials"
103-
];
107+
disabledTests =
108+
[
109+
# ValueError: Transform failed with error code 525: error creating static canvas/context for image server
110+
"test_get_pareto_front_plot"
111+
# too narrow time limit
112+
"test_get_timeline_plot_with_killed_running_trials"
113+
]
114+
++ lib.optionals stdenv.hostPlatform.isDarwin [
115+
# ValueError: Failed to start Kaleido subprocess. Error stream
116+
# kaleido/executable/kaleido: line 5: 5956 Illegal instruction: 4 ./bin/kaleido $@
117+
"test_get_optimization_history_plot"
118+
"test_plot_intermediate_values"
119+
"test_plot_rank"
120+
"test_plot_terminator_improvement"
121+
122+
# Fatal Python error: Aborted
123+
# matplotlib/backend_bases.py", line 2654 in create_with_canvas
124+
"test_edf_plot_no_trials"
125+
"test_get_timeline_plot"
126+
"test_plot_contour"
127+
"test_plot_contour_customized_target_name"
128+
"test_plot_edf_with_multiple_studies"
129+
"test_plot_edf_with_target"
130+
"test_plot_parallel_coordinate"
131+
"test_plot_parallel_coordinate_customized_target_name"
132+
"test_plot_param_importances"
133+
"test_plot_param_importances_customized_target_name"
134+
"test_plot_param_importances_multiobjective_all_objectives_displayed"
135+
"test_plot_slice"
136+
"test_plot_slice_customized_target_name"
137+
"test_target_is_none_and_study_is_multi_obj"
138+
"test_visualizations_with_single_objectives"
139+
];
104140

105141
pythonImportsCheck = [ "optuna" ];
106142

107-
meta = with lib; {
143+
meta = {
108144
description = "Hyperparameter optimization framework";
109145
homepage = "https://optuna.org/";
110146
changelog = "https://github.com/optuna/optuna/releases/tag/${version}";
111-
license = licenses.mit;
112-
maintainers = with maintainers; [ natsukium ];
147+
license = lib.licenses.mit;
148+
maintainers = with lib.maintainers; [ natsukium ];
113149
mainProgram = "optuna";
114150
};
115151
}

0 commit comments

Comments
 (0)