20 buildPythonPackage rec {
25 src = fetchFromGitHub {
26 owner = "google-research";
28 rev = "refs/tags/v${version}";
29 hash = "sha256-D0p2tL/VvkouXrXfRhMuCq8wMtzeoBTppWEG5vM1qCo=";
33 substituteInPlace setup.py \
34 --replace "numpy==1.19.*" "numpy" \
35 --replace "scipy==1.5.*" "scipy"
38 nativeBuildInputs = [ setuptools ];
40 propagatedBuildInputs = [
48 pythonImportsCheck = [ "torchsde" ];
50 nativeCheckInputs = [ pytest7CheckHook ];
53 # RuntimeError: a view of a leaf Variable that requires grad is being used in an in-place operation.
58 changelog = "https://github.com/google-research/torchsde/releases/tag/v${version}";
59 description = "Differentiable SDE solvers with GPU support and efficient sensitivity analysis";
60 homepage = "https://github.com/google-research/torchsde";
61 license = licenses.asl20;
62 maintainers = teams.tts.members;