2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
buildPythonPackage,
|
|
|
|
braceexpand,
|
|
|
|
imageio,
|
|
|
|
lmdb,
|
|
|
|
msgpack,
|
|
|
|
numpy,
|
|
|
|
pytestCheckHook,
|
|
|
|
pyyaml,
|
|
|
|
setuptools,
|
|
|
|
torch,
|
|
|
|
torchvision,
|
|
|
|
wheel,
|
|
|
|
fetchFromGitHub,
|
2024-01-02 11:29:13 +00:00
|
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "webdataset";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "0.2.100";
|
2024-01-02 11:29:13 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "webdataset";
|
|
|
|
repo = "webdataset";
|
|
|
|
rev = "refs/tags/${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-+Rvb4VY4qBcVKM1CUkLZTQdlZklpHcuiMO8r6VNInLc=";
|
2024-01-02 11:29:13 +00:00
|
|
|
};
|
|
|
|
|
2024-07-01 15:47:52 +00:00
|
|
|
build-system = [
|
2024-01-02 11:29:13 +00:00
|
|
|
setuptools
|
|
|
|
wheel
|
|
|
|
];
|
|
|
|
|
2024-07-01 15:47:52 +00:00
|
|
|
dependencies = [
|
2024-01-02 11:29:13 +00:00
|
|
|
braceexpand
|
|
|
|
numpy
|
|
|
|
pyyaml
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
imageio
|
|
|
|
torch
|
|
|
|
torchvision
|
|
|
|
msgpack
|
|
|
|
lmdb
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "webdataset" ];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
disabledTests =
|
|
|
|
[
|
|
|
|
# requires network
|
|
|
|
"test_batched"
|
|
|
|
"test_cache_dir"
|
|
|
|
"test_concurrent_download_and_open"
|
|
|
|
"test_dataloader"
|
|
|
|
"test_decode_handlers"
|
|
|
|
"test_decoder"
|
|
|
|
"test_download"
|
|
|
|
"test_handlers"
|
|
|
|
"test_pipe"
|
|
|
|
"test_remote_file"
|
|
|
|
"test_shard_syntax"
|
|
|
|
"test_torchvision"
|
|
|
|
"test_unbatched"
|
|
|
|
"test_yaml3"
|
|
|
|
]
|
|
|
|
++ lib.optionals stdenv.isDarwin [
|
|
|
|
# pickling error
|
|
|
|
"test_background_download"
|
|
|
|
]
|
|
|
|
++ lib.optionals (stdenv.isx86_64 && stdenv.isDarwin) [
|
|
|
|
"test_concurrent_access"
|
|
|
|
# fails to patch 'init_process_group' from torch.distributed
|
|
|
|
"TestDistributedChunkedSampler"
|
|
|
|
]
|
|
|
|
++ lib.optionals (stdenv.isAarch64 && stdenv.isLinux) [
|
|
|
|
# segfaults on aarch64-linux
|
|
|
|
"test_webloader"
|
|
|
|
"test_webloader2"
|
|
|
|
"test_webloader_repeat"
|
|
|
|
"test_webloader_unbatched"
|
|
|
|
];
|
2024-01-02 11:29:13 +00:00
|
|
|
|
2024-07-01 15:47:52 +00:00
|
|
|
disabledTestPaths = lib.optionals stdenv.isDarwin [
|
|
|
|
# AttributeError: <module 'torch.distributed' from /nix/store/...
|
|
|
|
"tests/test_wids.py"
|
|
|
|
|
|
|
|
# Issue with creating a temp file in the sandbox
|
|
|
|
"tests/test_wids_mmtar.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "High-performance Python-based I/O system for large (and small) deep learning problems, with strong support for PyTorch";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "widsindex";
|
2024-01-02 11:29:13 +00:00
|
|
|
homepage = "https://github.com/webdataset/webdataset";
|
2024-05-15 15:35:15 +00:00
|
|
|
changelog = "https://github.com/webdataset/webdataset/releases/tag/${version}";
|
2024-07-01 15:47:52 +00:00
|
|
|
license = lib.licenses.bsd3;
|
|
|
|
maintainers = with lib.maintainers; [ iynaix ];
|
2024-01-02 11:29:13 +00:00
|
|
|
};
|
|
|
|
}
|