From 58a0bf05e57dca02a403273d3655730765df92a9 Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Fri, 4 Apr 2025 22:58:13 -0400 Subject: [PATCH] python312Packages.webdataset: enable tests for torch.distributed torch.distributed module is now build on Darwin too, so we can enable the tests. test_wids.py failed with Permission denied because the test suite was using the same global path to write test shard files to for all test runs. If a previous test run created some shard files, consequent runs failed. This patch sets WIDS_CACHE variable for tests to use a unique path for these files for each build. Signed-off-by: Ihar Hrachyshka --- pkgs/development/python-modules/webdataset/default.nix | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/webdataset/default.nix b/pkgs/development/python-modules/webdataset/default.nix index 9a3a3cf63d07..77236a576649 100644 --- a/pkgs/development/python-modules/webdataset/default.nix +++ b/pkgs/development/python-modules/webdataset/default.nix @@ -53,6 +53,10 @@ buildPythonPackage rec { pythonImportsCheck = [ "webdataset" ]; + preCheck = '' + export WIDS_CACHE=$TMPDIR + ''; + disabledTests = [ # requires network @@ -77,8 +81,6 @@ buildPythonPackage rec { ] ++ lib.optionals (stdenv.hostPlatform.isx86_64 && stdenv.hostPlatform.isDarwin) [ "test_concurrent_access" - # fails to patch 'init_process_group' from torch.distributed - "TestDistributedChunkedSampler" ] ++ lib.optionals (stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isLinux) [ # segfaults on aarch64-linux @@ -89,9 +91,6 @@ buildPythonPackage rec { ]; disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [ - # AttributeError: