From 548207baea8887016655ce973e32d4cd925c1275 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Wed, 8 Jan 2025 13:02:23 +0100 Subject: [PATCH] python312Packages.numpyro: reduce number of pytest parallel workers to reduce RAM usage --- pkgs/development/python-modules/numpyro/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/python-modules/numpyro/default.nix b/pkgs/development/python-modules/numpyro/default.nix index f1f409d813c12..89d0c2e0d18bf 100644 --- a/pkgs/development/python-modules/numpyro/default.nix +++ b/pkgs/development/python-modules/numpyro/default.nix @@ -64,6 +64,9 @@ buildPythonPackage rec { pythonImportsCheck = [ "numpyro" ]; pytestFlagsArray = [ + # Tests memory consumption grows significantly with the number of parallel processes (reaches ~200GB with 80 jobs) + "--maxprocesses=8" + # A few tests fail with: # UserWarning: There are not enough devices to run parallel chains: expected 2 but got 1. # Chains will be drawn sequentially. If you are running MCMC in CPU, consider using `numpyro.set_host_device_count(2)` at the beginning of your program.