1{
2 stdenv,
3 lib,
4 buildPythonPackage,
5 pythonOlder,
6 fetchFromGitHub,
7 pytestCheckHook,
8 dill,
9 lightning-utilities,
10 numpy,
11 torch,
12 threadpoolctl,
13 tqdm,
14}:
15
16buildPythonPackage rec {
17 pname = "rising";
18 version = "0.3.0";
19 format = "setuptools";
20 disabled = pythonOlder "3.8";
21
22 src = fetchFromGitHub {
23 owner = "PhoenixDL";
24 repo = pname;
25 rev = "refs/tags/v${version}";
26 hash = "sha256-sBzVTst5Tp2oZZ+Xsg3M7uAMbucL6idlpYwHvib3EaY=";
27 };
28
29
30 pythonRelaxDeps = [ "lightning-utilities" ];
31
32 propagatedBuildInputs = [
33 lightning-utilities
34 numpy
35 torch
36 threadpoolctl
37 tqdm
38 ];
39 nativeCheckInputs = [
40 dill
41 pytestCheckHook
42 ];
43 disabledTests = lib.optionals (stdenv.isLinux && stdenv.isAarch64) [
44 # RuntimeError: DataLoader worker (pid(s) <...>) exited unexpectedly:
45 "test_progressive_resize_integration"
46 ];
47
48 pythonImportsCheck = [
49 "rising"
50 "rising.loading"
51 "rising.ops"
52 "rising.random"
53 "rising.transforms"
54 "rising.transforms.functional"
55 "rising.utils"
56 ];
57
58 meta = {
59 description = "High-performance data loading and augmentation library in PyTorch";
60 homepage = "https://rising.rtfd.io";
61 license = lib.licenses.mit;
62 maintainers = with lib.maintainers; [ bcdarwin ];
63 };
64}