Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python312Packages.pyannote-audio: 3.1.1 -> 3.1.2; python312Packages.gpytorch: 1.13 -> 1.14; python312Packages.botorch: 0.12.0 -> 0.13.0: python312Packages.optuna: 4.1.0 -> 4.2.0 #380409

Merged
merged 7 commits into from
Feb 10, 2025
47 changes: 30 additions & 17 deletions pkgs/development/python-modules/ax-platform/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,19 @@
pyfakefs,
pyre-extensions,
pytestCheckHook,
pythonAtLeast,
pythonOlder,
setuptools-scm,
setuptools,
sqlalchemy,
tabulate,
typeguard,
yappi,
}:

buildPythonPackage rec {
pname = "ax-platform";
version = "0.4.3";
version = "0.5.0";
pyproject = true;

disabled = pythonOlder "3.10";
Expand All @@ -32,7 +34,7 @@ buildPythonPackage rec {
owner = "facebook";
repo = "ax";
tag = version;
hash = "sha256-jmBjrtxqg4Iu3Qr0HRqjVfwURXzbJaGm+DBFNHYk/vA=";
hash = "sha256-CMKdnPvzQ9tvU9/01mRaWi/Beuyo19CtaXNJCoiwLOw=";
};

env.ALLOW_BOTORCH_LATEST = "1";
Expand Down Expand Up @@ -62,16 +64,13 @@ buildPythonPackage rec {
mercurial
pyfakefs
pytestCheckHook
tabulate
yappi
] ++ lib.flatten (builtins.attrValues optional-dependencies);
] ++ lib.flatten (lib.attrValues optional-dependencies);

disabledTestPaths = [
"ax/benchmark"
"ax/runners/tests/test_torchx.py"
# requires pyre_extensions
"ax/telemetry/tests"
"ax/core/tests/test_utils.py"
"ax/early_stopping/tests/test_strategies.py"
# broken with sqlalchemy 2
"ax/core/tests/test_experiment.py"
"ax/service/tests/test_ax_client.py"
Expand All @@ -80,16 +79,30 @@ buildPythonPackage rec {
"ax/storage"
];

disabledTests = [
# exact comparison of floating points
"test_optimize_l0_homotopy"
# AssertionError: 5 != 2
"test_get_standard_plots_moo"
# AssertionError: Expected 'warning' to be called once. Called 3 times
"test_validate_kwarg_typing"
# uses torch.equal
"test_convert_observations"
];
disabledTests =
[
# exact comparison of floating points
"test_optimize_l0_homotopy"
# AssertionError: 5 != 2
"test_get_standard_plots_moo"
# AssertionError: Expected 'warning' to be called once. Called 3 times
"test_validate_kwarg_typing"
# uses torch.equal
"test_convert_observations"
# broken with sqlalchemy 2
"test_sql_storage"
]
++ lib.optionals (pythonAtLeast "3.13") [
# Both `metric_aggregation` and `criterion` must be `ReductionCriterion`
"test_SingleDiagnosticBestModelSelector_max_mean"
"test_SingleDiagnosticBestModelSelector_min_mean"
"test_SingleDiagnosticBestModelSelector_min_min"
"test_SingleDiagnosticBestModelSelector_model_cv_kwargs"
"test_init"
"test_gen"
# "use MIN or MAX" does not match "Both `metric_aggregation` and `criterion` must be `ReductionCriterion`
"test_user_input_error"
];

pythonImportsCheck = [ "ax" ];

Expand Down
20 changes: 13 additions & 7 deletions pkgs/development/python-modules/botorch/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,26 @@
gpytorch,
linear-operator,
multipledispatch,
pyre-extensions,
pyro-ppl,
setuptools,
setuptools-scm,
torch,
scipy,
pytestCheckHook,
pythonAtLeast,
}:

buildPythonPackage rec {
pname = "botorch";
version = "0.12.0";
version = "0.13.0";
pyproject = true;

src = fetchFromGitHub {
owner = "pytorch";
repo = "botorch";
tag = "v${version}";
hash = "sha256-CKlerCUadObpPq4jQAiFDBOZMHZ4QccAKQz30OFe64E=";
hash = "sha256-Hik0HPHFoN1+uIeVxG7UPKc1ADBoTTBkL2+LhHDrr+s=";
};

build-system = [
Expand All @@ -35,16 +37,12 @@ buildPythonPackage rec {
gpytorch
linear-operator
multipledispatch
pyre-extensions
pyro-ppl
scipy
torch
];

pythonRelaxDeps = [
"gpytorch"
"linear-operator"
];

nativeCheckInputs = [ pytestCheckHook ];

pytestFlagsArray = [
Expand All @@ -55,10 +53,18 @@ buildPythonPackage rec {

disabledTests =
[ "test_all_cases_covered" ]
++ lib.optionals (pythonAtLeast "3.13") [
# RuntimeError: Boolean value of Tensor with more than one value is ambiguous
"test_optimize_acqf_mixed_binary_only"
]
++ lib.optionals (stdenv.buildPlatform.system == "x86_64-linux") [
# stuck tests on hydra
"test_moo_predictive_entropy_search"
]
++ lib.optionals (stdenv.hostPlatform.isDarwin) [
# RuntimeError: required keyword attribute 'value' has the wrong type
"test_posterior_in_trace_mode"
]
++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [
# Numerical error slightly above threshold
# AssertionError: Tensor-likes are not close!
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/python-modules/gpytorch/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@

buildPythonPackage rec {
pname = "gpytorch";
version = "1.13";
version = "1.14";
pyproject = true;

src = fetchFromGitHub {
owner = "cornellius-gp";
repo = pname;
tag = "v${version}";
hash = "sha256-jdEJdUFIyM7TTKUHY8epjyZCGolH8nrr7FCyfw+x56s=";
hash = "sha256-whZjqAs3nyjKMzAGi+OnyBtboq0UuV8m11A4IzkWtec=";
};

build-system = [
Expand Down
63 changes: 20 additions & 43 deletions pkgs/development/python-modules/optuna/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,43 +6,34 @@
pythonOlder,
alembic,
boto3,
botorch,
catboost,
cma,
cmaes,
colorlog,
distributed,
fakeredis,
fvcore,
google-cloud-storage,
lightgbm,
grpcio,
kaleido,
matplotlib,
mlflow,
moto,
numpy,
packaging,
pandas,
plotly,
protobuf,
pytest-xdist,
pytorch-lightning,
pyyaml,
redis,
scikit-learn,
scipy,
setuptools,
shap,
sqlalchemy,
tensorflow,
torch,
torchaudio,
torchvision,
tqdm,
wandb,
xgboost,
}:

buildPythonPackage rec {
pname = "optuna";
version = "4.1.0";
version = "4.2.0";
pyproject = true;

disabled = pythonOlder "3.8";
Expand All @@ -51,7 +42,7 @@ buildPythonPackage rec {
owner = "optuna";
repo = "optuna";
tag = "v${version}";
hash = "sha256-wIgYExxJEWFxEadBuCsxEIcW2/J6EVybW1jp83gIMjY=";
hash = "sha256-NNlwrVrGg2WvkC42nmW7K/mRktE3B97GaL8GaSOKF1Y=";
};

build-system = [
Expand All @@ -69,60 +60,46 @@ buildPythonPackage rec {
];

optional-dependencies = {
integration = [
botorch
catboost
cma
distributed
lightgbm
mlflow
pandas
# pytorch-ignite
pytorch-lightning
scikit-learn
shap
tensorflow
torch
torchaudio
torchvision
wandb
xgboost
];
optional = [
boto3
botorch
cmaes
fvcore
google-cloud-storage
grpcio
matplotlib
pandas
plotly
protobuf
redis
scikit-learn
scipy
];
};

preCheck = ''
export PATH=$out/bin:$PATH

# grpc tests are racy
sed -i '/"grpc",/d' optuna/testing/storages.py
'';

nativeCheckInputs =
[
fakeredis
kaleido
moto
pytest-xdist
pytestCheckHook
scipy
torch
]
++ fakeredis.optional-dependencies.lua
++ optional-dependencies.optional;

pytestFlagsArray = [ "-m 'not integration'" ];

disabledTestPaths = [
# require unpackaged kaleido and building it is a bit difficult
"tests/visualization_tests"
# ImportError: cannot import name 'mock_s3' from 'moto'
"tests/artifacts_tests/test_boto3.py"
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"
];

pythonImportsCheck = [ "optuna" ];
Expand Down
4 changes: 2 additions & 2 deletions pkgs/development/python-modules/pyannote-audio/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

buildPythonPackage rec {
pname = "pyannote-audio";
version = "3.3.1";
version = "3.3.2";
pyproject = true;

disabled = pythonOlder "3.9";
Expand All @@ -40,7 +40,7 @@ buildPythonPackage rec {
owner = "pyannote";
repo = "pyannote-audio";
tag = version;
hash = "sha256-85whRoc3JoDSE4DqivY/3hfvLHcvgsubR/DLCPtLEP0=";
hash = "sha256-Qx7NDXkT3eQr9PZXlYuoJD01dzsVCvfq6HNPnyLzyAQ=";
fetchSubmodules = true;
};

Expand Down
26 changes: 17 additions & 9 deletions pkgs/development/python-modules/resampy/default.nix
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
{
lib,
stdenv,
buildPythonPackage,
cython,
fetchFromGitHub,
numba,
numpy,
optuna,
pytest-cov-stub,
pytestCheckHook,
pythonOlder,
setuptools,
scipy,
}:

buildPythonPackage rec {
pname = "resampy";
version = "0.4.3";
format = "setuptools";
pyproject = true;

disabled = pythonOlder "3.7";

Expand All @@ -24,21 +27,26 @@ buildPythonPackage rec {
hash = "sha256-LOWpOPAEK+ga7c3bR15QvnHmON6ARS1Qee/7U/VMlTY=";
};

propagatedBuildInputs = [
build-system = [ setuptools ];

dependencies = [
numpy
cython
numba
];

optional-dependencies.design = [ optuna ];

nativeCheckInputs = [
pytest-cov-stub
pytestCheckHook
scipy
];
] ++ optional-dependencies.design;

postPatch = ''
substituteInPlace setup.cfg \
--replace " --cov-report term-missing --cov resampy --cov-report=xml" ""
'';
disabledTests = lib.optionals (stdenv.hostPlatform.system == "aarch64-linux") [
# crashing the interpreter
"test_quality_sine_parallel"
"test_resample_nu_quality_sine_parallel"
];

pythonImportsCheck = [ "resampy" ];

Expand Down
Loading