Something went wrong. Try again.
lol
Something went wrong. Try again.
1.9 kB · 90 lines
Nix
at master
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091{ lib, buildPythonPackage, fetchFromGitHub, pythonAtLeast,
# build system setuptools, setuptools-scm,
# dependencies numpy, scikit-image, torchvision, torch, runstats, pytorch-lightning, h5py, pyyaml, torchmetrics, pandas,
# tests pytestCheckHook,}:
buildPythonPackage (finalAttrs: { pname = "fastmri"; version = "0.3.0"; pyproject = true;
src = fetchFromGitHub { owner = "facebookresearch"; repo = "fastMRI"; tag = "v${finalAttrs.version}"; hash = "sha256-0IJV8OhY5kPWQwUYPKfmdI67TyYzDAPlwohdc0jWcV4="; };
# banding_removal folder also has a subfolder named "fastmri" # and np.product is substituted with np.prod in new numpy versions postPatch = '' substituteInPlace tests/test_math.py \ --replace-fail "np.product" "np.prod" substituteInPlace tests/conftest.py \ --replace-fail "np.product" "np.prod"
rm -rf banding_removal '';
build-system = [ setuptools setuptools-scm ];
dependencies = [ numpy scikit-image torchvision torch runstats pytorch-lightning h5py pyyaml torchmetrics pandas ];
nativeCheckInputs = [ pytestCheckHook ];
disabledTests = lib.optionals (pythonAtLeast "3.14") [ # AttributeError: '...' object has no attribute '__annotations__'. "test_unet_scripting" "test_varnet_scripting" ];
disabledTestPaths = [ # much older version of pytorch-lightning is used "tests/test_modules.py" ];
pythonImportsCheck = [ "fastmri" ];
meta = { description = "Pytorch-based MRI reconstruction tooling"; homepage = "https://github.com/facebookresearch/fastMRI"; changelog = "https://github.com/facebookresearch/fastMRI/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ osbm ]; };})