2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
2024-09-19 14:19:46 +00:00
|
|
|
|
|
|
|
# build-system
|
|
|
|
versioneer,
|
|
|
|
|
|
|
|
# dependencies
|
2024-06-05 15:53:02 +00:00
|
|
|
lightning-utilities,
|
|
|
|
numpy,
|
|
|
|
torch,
|
|
|
|
threadpoolctl,
|
|
|
|
tqdm,
|
2024-09-19 14:19:46 +00:00
|
|
|
|
|
|
|
# tests
|
|
|
|
dill,
|
|
|
|
pytestCheckHook,
|
|
|
|
|
|
|
|
stdenv,
|
2020-09-25 04:45:31 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "rising";
|
2023-02-02 18:25:31 +00:00
|
|
|
version = "0.3.0";
|
2024-09-19 14:19:46 +00:00
|
|
|
pyproject = true;
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "PhoenixDL";
|
2024-09-19 14:19:46 +00:00
|
|
|
repo = "rising";
|
2023-02-02 18:25:31 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-sBzVTst5Tp2oZZ+Xsg3M7uAMbucL6idlpYwHvib3EaY=";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
pythonRelaxDeps = [ "lightning-utilities" ];
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
# Remove vendorized versioneer (incompatible with python 3.12)
|
|
|
|
postPatch = ''
|
|
|
|
rm versioneer.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
build-system = [ versioneer ];
|
|
|
|
|
|
|
|
dependencies = [
|
2024-06-05 15:53:02 +00:00
|
|
|
lightning-utilities
|
|
|
|
numpy
|
|
|
|
torch
|
|
|
|
threadpoolctl
|
|
|
|
tqdm
|
|
|
|
];
|
2024-09-19 14:19:46 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
dill
|
|
|
|
pytestCheckHook
|
2023-02-02 18:25:31 +00:00
|
|
|
];
|
2024-09-19 14:19:46 +00:00
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
disabledTests = lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) [
|
2023-02-09 11:40:11 +00:00
|
|
|
# RuntimeError: DataLoader worker (pid(s) <...>) exited unexpectedly:
|
|
|
|
"test_progressive_resize_integration"
|
|
|
|
];
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"rising"
|
|
|
|
"rising.loading"
|
|
|
|
"rising.ops"
|
|
|
|
"rising.random"
|
|
|
|
"rising.transforms"
|
|
|
|
"rising.transforms.functional"
|
|
|
|
"rising.utils"
|
|
|
|
];
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "High-performance data loading and augmentation library in PyTorch";
|
|
|
|
homepage = "https://rising.rtfd.io";
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ bcdarwin ];
|
|
|
|
};
|
|
|
|
}
|