Loading pkgs/development/python-modules/optuna/default.nix +65 −29 Original line number Diff line number Diff line { lib, stdenv, buildPythonPackage, fetchFromGitHub, pytestCheckHook, pythonOlder, # build-system setuptools, # dependencies alembic, colorlog, numpy, packaging, sqlalchemy, tqdm, pyyaml, # optional-dependencies boto3, cmaes, colorlog, fakeredis, fvcore, google-cloud-storage, grpcio, kaleido, matplotlib, moto, numpy, packaging, pandas, plotly, protobuf, pytest-xdist, pyyaml, redis, scikit-learn, scipy, setuptools, sqlalchemy, # tests addBinToPathHook, fakeredis, kaleido, moto, pytest-xdist, pytestCheckHook, torch, tqdm, versionCheckHook, }: buildPythonPackage rec { pname = "optuna"; version = "4.2.0"; version = "4.2.1"; pyproject = true; disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "optuna"; repo = "optuna"; tag = "v${version}"; hash = "sha256-NNlwrVrGg2WvkC42nmW7K/mRktE3B97GaL8GaSOKF1Y="; hash = "sha256-WLrdHrdfCtCZMW2J375N8vmod7FcKCMwQPGKicRA878="; }; build-system = [ Loading Loading @@ -76,40 +84,68 @@ buildPythonPackage rec { ]; }; preCheck = '' export PATH=$out/bin:$PATH # grpc tests are racy preCheck = '' sed -i '/"grpc",/d' optuna/testing/storages.py ''; nativeCheckInputs = [ addBinToPathHook fakeredis kaleido moto pytest-xdist pytestCheckHook torch versionCheckHook ] ++ fakeredis.optional-dependencies.lua ++ optional-dependencies.optional; versionCheckProgramArg = [ "--version" ]; disabledTests = [ disabledTests = [ # ValueError: Transform failed with error code 525: error creating static canvas/context for image server "test_get_pareto_front_plot" # too narrow time limit "test_get_timeline_plot_with_killed_running_trials" ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # ValueError: Failed to start Kaleido subprocess. Error stream # kaleido/executable/kaleido: line 5: 5956 Illegal instruction: 4 ./bin/kaleido $@ "test_get_optimization_history_plot" "test_plot_intermediate_values" "test_plot_rank" "test_plot_terminator_improvement" # Fatal Python error: Aborted # matplotlib/backend_bases.py", line 2654 in create_with_canvas "test_edf_plot_no_trials" "test_get_timeline_plot" "test_plot_contour" "test_plot_contour_customized_target_name" "test_plot_edf_with_multiple_studies" "test_plot_edf_with_target" "test_plot_parallel_coordinate" "test_plot_parallel_coordinate_customized_target_name" "test_plot_param_importances" "test_plot_param_importances_customized_target_name" "test_plot_param_importances_multiobjective_all_objectives_displayed" "test_plot_slice" "test_plot_slice_customized_target_name" "test_target_is_none_and_study_is_multi_obj" "test_visualizations_with_single_objectives" ]; pythonImportsCheck = [ "optuna" ]; meta = with lib; { meta = { description = "Hyperparameter optimization framework"; homepage = "https://optuna.org/"; changelog = "https://github.com/optuna/optuna/releases/tag/${version}"; license = licenses.mit; maintainers = with maintainers; [ natsukium ]; license = lib.licenses.mit; maintainers = with lib.maintainers; [ natsukium ]; mainProgram = "optuna"; }; } Loading
pkgs/development/python-modules/optuna/default.nix +65 −29 Original line number Diff line number Diff line { lib, stdenv, buildPythonPackage, fetchFromGitHub, pytestCheckHook, pythonOlder, # build-system setuptools, # dependencies alembic, colorlog, numpy, packaging, sqlalchemy, tqdm, pyyaml, # optional-dependencies boto3, cmaes, colorlog, fakeredis, fvcore, google-cloud-storage, grpcio, kaleido, matplotlib, moto, numpy, packaging, pandas, plotly, protobuf, pytest-xdist, pyyaml, redis, scikit-learn, scipy, setuptools, sqlalchemy, # tests addBinToPathHook, fakeredis, kaleido, moto, pytest-xdist, pytestCheckHook, torch, tqdm, versionCheckHook, }: buildPythonPackage rec { pname = "optuna"; version = "4.2.0"; version = "4.2.1"; pyproject = true; disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "optuna"; repo = "optuna"; tag = "v${version}"; hash = "sha256-NNlwrVrGg2WvkC42nmW7K/mRktE3B97GaL8GaSOKF1Y="; hash = "sha256-WLrdHrdfCtCZMW2J375N8vmod7FcKCMwQPGKicRA878="; }; build-system = [ Loading Loading @@ -76,40 +84,68 @@ buildPythonPackage rec { ]; }; preCheck = '' export PATH=$out/bin:$PATH # grpc tests are racy preCheck = '' sed -i '/"grpc",/d' optuna/testing/storages.py ''; nativeCheckInputs = [ addBinToPathHook fakeredis kaleido moto pytest-xdist pytestCheckHook torch versionCheckHook ] ++ fakeredis.optional-dependencies.lua ++ optional-dependencies.optional; versionCheckProgramArg = [ "--version" ]; disabledTests = [ disabledTests = [ # ValueError: Transform failed with error code 525: error creating static canvas/context for image server "test_get_pareto_front_plot" # too narrow time limit "test_get_timeline_plot_with_killed_running_trials" ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ # ValueError: Failed to start Kaleido subprocess. Error stream # kaleido/executable/kaleido: line 5: 5956 Illegal instruction: 4 ./bin/kaleido $@ "test_get_optimization_history_plot" "test_plot_intermediate_values" "test_plot_rank" "test_plot_terminator_improvement" # Fatal Python error: Aborted # matplotlib/backend_bases.py", line 2654 in create_with_canvas "test_edf_plot_no_trials" "test_get_timeline_plot" "test_plot_contour" "test_plot_contour_customized_target_name" "test_plot_edf_with_multiple_studies" "test_plot_edf_with_target" "test_plot_parallel_coordinate" "test_plot_parallel_coordinate_customized_target_name" "test_plot_param_importances" "test_plot_param_importances_customized_target_name" "test_plot_param_importances_multiobjective_all_objectives_displayed" "test_plot_slice" "test_plot_slice_customized_target_name" "test_target_is_none_and_study_is_multi_obj" "test_visualizations_with_single_objectives" ]; pythonImportsCheck = [ "optuna" ]; meta = with lib; { meta = { description = "Hyperparameter optimization framework"; homepage = "https://optuna.org/"; changelog = "https://github.com/optuna/optuna/releases/tag/${version}"; license = licenses.mit; maintainers = with maintainers; [ natsukium ]; license = lib.licenses.mit; maintainers = with lib.maintainers; [ natsukium ]; mainProgram = "optuna"; }; }