diff --git a/pkgs/development/python-modules/spacy/default.nix b/pkgs/development/python-modules/spacy/default.nix index 0e2f7e63e227..bebf00700a8d 100644 --- a/pkgs/development/python-modules/spacy/default.nix +++ b/pkgs/development/python-modules/spacy/default.nix @@ -135,6 +135,10 @@ buildPythonPackage (finalAttrs: { # assert eval["nel_macro_f"] > 0 # assert 0.0 > 0 "test_overfitting_IO_with_ner" + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + # AssertionError: assert 'V' == 'N' + "test_tok2vec_frozen_overfitting" ]; pythonImportsCheck = [ "spacy" ]; diff --git a/pkgs/development/python-modules/sweeps/default.nix b/pkgs/development/python-modules/sweeps/default.nix new file mode 100644 index 000000000000..5ceb3e7d2d06 --- /dev/null +++ b/pkgs/development/python-modules/sweeps/default.nix @@ -0,0 +1,93 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + + # build-system + setuptools, + + # dependencies + jsonref, + jsonschema, + numpy, + pydantic, + pyyaml, + scikit-learn, + scipy, + + # tests + pytest-xdist, + pytestCheckHook, + writableTmpDirAsHomeHook, +}: + +buildPythonPackage (finalAttrs: { + pname = "sweeps"; + version = "0.2.0"; + pyproject = true; + __structuredAttrs = true; + + src = fetchFromGitHub { + owner = "wandb"; + repo = "sweeps"; + tag = "v${finalAttrs.version}"; + hash = "sha256-QqtyYpPChPNFN+3Rlpp1x1H0FFgxHPO3zFGcY6Pl24A="; + }; + + # Requires unpackaged pytest-profiling + postPatch = '' + substituteInPlace pytest.ini \ + --replace-fail "--profile" "" + ''; + + build-system = [ + setuptools + ]; + + dependencies = [ + jsonref + jsonschema + numpy + pydantic + pyyaml + scikit-learn + scipy + ]; + + pythonImportsCheck = [ "sweeps" ]; + + nativeCheckInputs = [ + pytest-xdist + pytestCheckHook + writableTmpDirAsHomeHook + ]; + + disabledTests = [ + # AssertionError: assert [] == [SweepRun(nam...running=None)] + "test_5runs_band1_stop_2" + "test_5runs_band1_stop_2_1stnoband" + "test_eta_3" + "test_eta_3_max" + + # AssertionError: assert [] == [10, 6, 1] + "test_skipped_steps" + + # ValueError: Cannot extract metric loss from run + "test_runs_bayes_runs2" + + # KeyError: 'loss is not a summary metric of this run.' + "test_summary_metric_none" + + # AssertionError: Not equal to tolerance rtol=1e-07, atol=0.01 + "test_bayes_impute_best" + "test_bayes_impute_latest" + ]; + + meta = { + description = "W&B Hyperparameter Sweep Engine"; + homepage = "https://github.com/wandb/sweeps"; + changelog = "https://github.com/wandb/sweeps/releases/tag/${finalAttrs.src.tag}"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ GaetanLepage ]; + }; +}) diff --git a/pkgs/development/python-modules/wandb/default.nix b/pkgs/development/python-modules/wandb/default.nix index 0efde155c5cd..8296857bb556 100644 --- a/pkgs/development/python-modules/wandb/default.nix +++ b/pkgs/development/python-modules/wandb/default.nix @@ -25,13 +25,14 @@ # dependencies click, opentelemetry-api, + opentelemetry-exporter-otlp-proto-http, + opentelemetry-sdk, packaging, platformdirs, protobuf, pydantic, pyyaml, requests, - sentry-sdk, setproctitle, typing-extensions, xxhash, @@ -73,6 +74,7 @@ responses, scikit-learn, soundfile, + sweeps, tenacity, torch, torchvision, @@ -80,12 +82,12 @@ }: let - version = "0.29.0"; + version = "0.30.0"; src = fetchFromGitHub { owner = "wandb"; repo = "wandb"; tag = "v${version}"; - hash = "sha256-5YkJB5uS9GalNKL+MPf5GVQX/jgWM62nxMVmdnzOXGs="; + hash = "sha256-4ccIM8bXbz8IkZeMBdr5zqoG7IxwwW8lb/VKIOOJWeE="; }; wandb-xpu = rustPlatform.buildRustPackage { @@ -95,7 +97,7 @@ let sourceRoot = "${src.name}/xpu"; - cargoHash = "sha256-YKuXtttLam4NmJsJPQH8sFbj1Qs5Gc2uoFJEvTYxkew="; + cargoHash = "sha256-arb96ajbju/CeAglgvTjD5/omrEpigEORjXVAVSSV2Q="; checkFlags = [ # fails in sandbox @@ -239,13 +241,14 @@ buildPythonPackage (finalAttrs: { dependencies = [ click opentelemetry-api + opentelemetry-exporter-otlp-proto-http + opentelemetry-sdk packaging platformdirs protobuf pydantic pyyaml requests - sentry-sdk setproctitle typing-extensions xxhash @@ -291,11 +294,12 @@ buildPythonPackage (finalAttrs: { responses scikit-learn soundfile + sweeps tenacity - versionCheckHook torch torchvision tqdm + versionCheckHook writableTmpDirAsHomeHook ]; @@ -308,9 +312,6 @@ buildPythonPackage (finalAttrs: { # Require docker access "tests/system_tests" - # broke somewhere between sentry-sdk 2.15.0 and 2.22.0 - "tests/unit_tests/test_analytics/test_sentry.py" - # Server connection times out under load "tests/unit_tests/test_wandb_login.py" diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 9ffcc48a24dd..0f4ee1777c50 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -20156,6 +20156,8 @@ self: super: with self; { swcgeom = callPackage ../development/python-modules/swcgeom { }; + sweeps = callPackage ../development/python-modules/sweeps { }; + swh-auth = callPackage ../development/python-modules/swh-auth { }; swh-core = callPackage ../development/python-modules/swh-core { };