From cf5174b0ac2fe7e67bc1aad3445fe0fc62d31362 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Mon, 10 Oct 2022 19:57:54 -0400 Subject: [PATCH 1/4] python3Packages.linear_operator: init at 0.4.0 --- .../linear_operator/default.nix | 46 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 48 insertions(+) create mode 100644 pkgs/development/python-modules/linear_operator/default.nix diff --git a/pkgs/development/python-modules/linear_operator/default.nix b/pkgs/development/python-modules/linear_operator/default.nix new file mode 100644 index 000000000000..48fb004c14c4 --- /dev/null +++ b/pkgs/development/python-modules/linear_operator/default.nix @@ -0,0 +1,46 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, scipy +, torch +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "linear_operator"; + version = "0.4.0"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "cornellius-gp"; + repo = pname; + rev = "v${version}"; + hash = "sha256-0f3F3k3xJACbx42jtwsAmjZwPAOfLywZs8VOrwWicc4="; + }; + + postPatch = '' + substituteInPlace setup.py \ + --replace 'find_version("linear_operator", "version.py")' \"$version\" + ''; + + propagatedBuildInputs = [ + scipy + torch + ]; + + checkInputs = [ + pytestCheckHook + ]; + pythonImportsCheck = [ "linear_operator" ]; + disabledTests = [ + # flaky numerical tests + "test_svd" + ]; + + meta = with lib; { + description = "A LinearOperator implementation to wrap the numerical nuts and bolts of GPyTorch"; + homepage = "https://github.com/cornellius-gp/linear_operator/"; + license = licenses.mit; + maintainers = with maintainers; [ veprbl ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 98e53a2931ac..e62258be3240 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5672,6 +5672,8 @@ self: super: with self; { limnoria = callPackage ../development/python-modules/limnoria { }; + linear_operator = callPackage ../development/python-modules/linear_operator { }; + linecache2 = callPackage ../development/python-modules/linecache2 { }; lineedit = callPackage ../development/python-modules/lineedit { }; From 23de81b0b3e2804549e1b9d6d599c7250f0a964a Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Mon, 10 Oct 2022 19:58:42 -0400 Subject: [PATCH 2/4] python3Packages.gpytorch: init at 1.10.0 --- .../python-modules/gpytorch/default.nix | 51 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 53 insertions(+) create mode 100644 pkgs/development/python-modules/gpytorch/default.nix diff --git a/pkgs/development/python-modules/gpytorch/default.nix b/pkgs/development/python-modules/gpytorch/default.nix new file mode 100644 index 000000000000..f914bc326ba9 --- /dev/null +++ b/pkgs/development/python-modules/gpytorch/default.nix @@ -0,0 +1,51 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, linear_operator +, scikit-learn +, torch +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "gpytorch"; + version = "1.10"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "cornellius-gp"; + repo = pname; + rev = "v${version}"; + hash = "sha256-KY3ItkVjBfIYMkZAmD56EBGR9YN/MRN7b2K3zrK6Qmk="; + }; + + postPatch = '' + substituteInPlace setup.py \ + --replace 'find_version("gpytorch", "version.py")' \"$version\" + ''; + + propagatedBuildInputs = [ + linear_operator + scikit-learn + torch + ]; + + checkInputs = [ + pytestCheckHook + ]; + pythonImportsCheck = [ "gpytorch" ]; + disabledTests = [ + # AssertionError on number of warnings emitted + "test_deprecated_methods" + # flaky numerical tests + "test_classification_error" + "test_matmul_matrix_broadcast" + ]; + + meta = with lib; { + description = "A highly efficient and modular implementation of Gaussian Processes, with GPU acceleration"; + homepage = "https://gpytorch.ai"; + license = licenses.mit; + maintainers = with maintainers; [ veprbl ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e62258be3240..0ce85ba52563 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4197,6 +4197,8 @@ self: super: with self; { gpy = callPackage ../development/python-modules/gpy { }; + gpytorch = callPackage ../development/python-modules/gpytorch { }; + gpt-2-simple = callPackage ../development/python-modules/gpt-2-simple { }; gpyopt = callPackage ../development/python-modules/gpyopt { }; From 33be98c31de9e1a2c65cc839ccedffe722cb9aeb Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Mon, 10 Oct 2022 19:59:33 -0400 Subject: [PATCH 3/4] python3Packages.botorch: init at 0.8.5 --- .../python-modules/botorch/default.nix | 51 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 53 insertions(+) create mode 100644 pkgs/development/python-modules/botorch/default.nix diff --git a/pkgs/development/python-modules/botorch/default.nix b/pkgs/development/python-modules/botorch/default.nix new file mode 100644 index 000000000000..ac31c7fdd9a1 --- /dev/null +++ b/pkgs/development/python-modules/botorch/default.nix @@ -0,0 +1,51 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, gpytorch +, linear_operator +, multipledispatch +, pyro-ppl +, setuptools-scm +, torch +, scipy +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "botorch"; + version = "0.8.5"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "pytorch"; + repo = pname; + rev = "v${version}"; + hash = "sha256-VcNHgfk8OfLJseQxHksycWuCPCudCtOdcRV0XnxHSfU="; + }; + + buildInputs = [ + setuptools-scm + ]; + propagatedBuildInputs = [ + gpytorch + linear_operator + multipledispatch + pyro-ppl + scipy + torch + ]; + + SETUPTOOLS_SCM_PRETEND_VERSION = version; + + checkInputs = [ + pytestCheckHook + ]; + pythonImportsCheck = [ "botorch" ]; + + meta = with lib; { + description = "Bayesian Optimization in PyTorch"; + homepage = "https://botorch.org"; + license = licenses.mit; + maintainers = with maintainers; [ veprbl ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 0ce85ba52563..2a26bafde61b 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1435,6 +1435,8 @@ self: super: with self; { botocore = callPackage ../development/python-modules/botocore { }; + botorch = callPackage ../development/python-modules/botorch { }; + bottle = callPackage ../development/python-modules/bottle { }; bottleneck = callPackage ../development/python-modules/bottleneck { }; From 56206e7b9d5b6d52f2e2943621a818ca41e66901 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Mon, 10 Oct 2022 20:00:31 -0400 Subject: [PATCH 4/4] python3Packages.ax: init at 0.3.2 --- .../development/python-modules/ax/default.nix | 70 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 72 insertions(+) create mode 100644 pkgs/development/python-modules/ax/default.nix diff --git a/pkgs/development/python-modules/ax/default.nix b/pkgs/development/python-modules/ax/default.nix new file mode 100644 index 000000000000..5f87602064bf --- /dev/null +++ b/pkgs/development/python-modules/ax/default.nix @@ -0,0 +1,70 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, botorch +, ipywidgets +, jinja2 +, pandas +, plotly +, setuptools-scm +, typeguard +, hypothesis +, mercurial +, pyfakefs +, pytestCheckHook +, yappi +}: + +buildPythonPackage rec { + pname = "ax"; + version = "0.3.2"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "facebook"; + repo = pname; + rev = version; + hash = "sha256-1KLLjeUktXvIDOlTQzMmpbL/On8PTxZQ44Qi4BT3nPk="; + }; + + propagatedBuildInputs = [ + botorch + ipywidgets + jinja2 + pandas + plotly + setuptools-scm + typeguard + ]; + + SETUPTOOLS_SCM_PRETEND_VERSION = version; + + checkInputs = [ + hypothesis + mercurial + pyfakefs + pytestCheckHook + yappi + ]; + pytestFlagsArray = [ + "--ignore=ax/benchmark" + "--ignore=ax/runners/tests/test_torchx.py" + # requires pyre_extensions + "--ignore=ax/telemetry/tests" + "--ignore=ax/core/tests/test_utils.py" + "--ignore=ax/early_stopping/tests/test_strategies.py" + # broken with sqlalchemy 2 + "--ignore=ax/service/tests/test_ax_client.py" + "--ignore=ax/service/tests/test_scheduler.py" + "--ignore=ax/service/tests/test_with_db_settings_base.py" + "--ignore=ax/storage" + ]; + pythonImportsCheck = [ "ax" ]; + + meta = with lib; { + description = "Ax is an accessible, general-purpose platform for understanding, managing, deploying, and automating adaptive experiments"; + homepage = "https://ax.dev/"; + license = licenses.mit; + maintainers = with maintainers; [ veprbl ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 2a26bafde61b..2bbcdfede289 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -877,6 +877,8 @@ self: super: with self; { awswrangler = callPackage ../development/python-modules/awswrangler { }; + ax = callPackage ../development/python-modules/ax { }; + axis = callPackage ../development/python-modules/axis { }; azure-appconfiguration = callPackage ../development/python-modules/azure-appconfiguration { };