From 87e84b2c7fc07815ee95972a92ce0c984f6d8903 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Mon, 18 Sep 2023 14:41:57 +0200 Subject: [PATCH] python310Packages.pytensor: 2.11.3 -> 2.17.1 --- .../python-modules/pytensor/default.nix | 57 +++++++++++-------- 1 file changed, 34 insertions(+), 23 deletions(-) diff --git a/pkgs/development/python-modules/pytensor/default.nix b/pkgs/development/python-modules/pytensor/default.nix index a3257131ac1a..ad48c11a5def 100644 --- a/pkgs/development/python-modules/pytensor/default.nix +++ b/pkgs/development/python-modules/pytensor/default.nix @@ -1,40 +1,51 @@ -{ stdenv -, lib +{ lib , buildPythonPackage -, cons -, cython -, etuples , fetchFromGitHub +, cython +, versioneer +, cons +, etuples , filelock -, jax -, jaxlib , logical-unification , minikanren -, numba -, numba-scipy , numpy -, pytestCheckHook -, pythonOlder , scipy , typing-extensions +, jax +, jaxlib +, numba +, numba-scipy +, pytest-mock +, pytestCheckHook +, pythonOlder +# Tensorflow is currently (2023/10/04) broken. +# Thus, we don't provide this optional test dependency. +# , tensorflow-probability +, stdenv }: buildPythonPackage rec { pname = "pytensor"; - version = "2.11.3"; - format = "setuptools"; + version = "2.17.1"; + pyproject = true; - disabled = pythonOlder "3.7"; + disabled = pythonOlder "3.9"; src = fetchFromGitHub { owner = "pymc-devs"; - repo = pname; + repo = "pytensor"; rev = "refs/tags/rel-${version}"; - hash = "sha256-4GDur8S19i8pZkywKHZUelmd2e0jZmC5HzF7o2esDl4="; + hash = "sha256-OG7ZvXJOTQzSpMoj94K9JwG6ZQRQSSp+k2slkK6BJ9I="; }; + postPatch = '' + substituteInPlace pyproject.toml \ + --replace "versioneer[toml]==0.28" "versioneer[toml]" + ''; + nativeBuildInputs = [ cython + versioneer ]; propagatedBuildInputs = [ @@ -48,19 +59,18 @@ buildPythonPackage rec { typing-extensions ]; - checkInputs = [ + nativeCheckInputs = [ jax jaxlib numba numba-scipy + pytest-mock pytestCheckHook + # Tensorflow is currently (2023/10/04) broken. + # Thus, we don't provide this optional test dependency. + # tensorflow-probability ]; - postPatch = '' - substituteInPlace setup.cfg \ - --replace "--durations=50" "" - ''; - preBuild = '' export HOME=$(mktemp -d) ''; @@ -76,13 +86,14 @@ buildPythonPackage rec { "test_logsumexp_benchmark" "test_scan_multiple_output" "test_vector_taps_benchmark" + # Temporarily disabled because of broken tensorflow-probability + "test_tfp_ops" ]; disabledTestPaths = [ # Don't run the most compute-intense tests "tests/scan/" "tests/tensor/" - "tests/sandbox/" "tests/sparse/sandbox/" ];