Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ buildPythonPackage 2, fetchFromGitHub 3, lib 4, numpy 5, onnx 6, packaging 7, pytestCheckHook 8, torch 9, torchvision 10, typing-extensions 11}: 12 13buildPythonPackage rec { 14 pname = "pytorch-pfn-extras"; 15 version = "0.6.4"; 16 17 src = fetchFromGitHub { 18 owner = "pfnet"; 19 repo = pname; 20 rev = "refs/tags/v${version}"; 21 hash = "sha256-x1aE/55+2QwYG3Hhy35j26jLAj9O5orrU/c4KlTTOcc="; 22 }; 23 24 propagatedBuildInputs = [ numpy packaging torch typing-extensions ]; 25 26 nativeCheckInputs = [ onnx pytestCheckHook torchvision ]; 27 28 # ignore all pytest warnings 29 preCheck = '' 30 rm pytest.ini 31 ''; 32 33 pythonImportsCheck = [ "pytorch_pfn_extras" ]; 34 35 disabledTestPaths = [ 36 # Requires optuna which is currently (2022-02-16) marked as broken. 37 "tests/pytorch_pfn_extras_tests/test_config_types.py" 38 39 # requires onnxruntime which was removed because of poor maintainability 40 # See https://github.com/NixOS/nixpkgs/pull/105951 https://github.com/NixOS/nixpkgs/pull/155058 41 "tests/pytorch_pfn_extras_tests/onnx_tests/test_export.py" 42 "tests/pytorch_pfn_extras_tests/onnx_tests/test_torchvision.py" 43 "tests/pytorch_pfn_extras_tests/onnx_tests/utils.py" 44 45 # RuntimeError: No Op registered for Gradient with domain_version of 9 46 "tests/pytorch_pfn_extras_tests/onnx_tests/test_grad.py" 47 48 # Requires CUDA access which is not possible in the nix environment. 49 "tests/pytorch_pfn_extras_tests/cuda_tests/test_allocator.py" 50 "tests/pytorch_pfn_extras_tests/nn_tests/modules_tests/test_lazy_batchnorm.py" 51 "tests/pytorch_pfn_extras_tests/nn_tests/modules_tests/test_lazy_conv.py" 52 "tests/pytorch_pfn_extras_tests/nn_tests/modules_tests/test_lazy_linear.py" 53 "tests/pytorch_pfn_extras_tests/nn_tests/modules_tests/test_lazy.py" 54 "tests/pytorch_pfn_extras_tests/profiler_tests/test_record.py" 55 "tests/pytorch_pfn_extras_tests/runtime_tests/test_to.py" 56 "tests/pytorch_pfn_extras_tests/test_handler.py" 57 "tests/pytorch_pfn_extras_tests/test_logic.py" 58 "tests/pytorch_pfn_extras_tests/test_reporter.py" 59 "tests/pytorch_pfn_extras_tests/training_tests/test_trainer.py" 60 "tests/pytorch_pfn_extras_tests/utils_tests/test_checkpoint.py" 61 "tests/pytorch_pfn_extras_tests/utils_tests/test_comparer.py" 62 "tests/pytorch_pfn_extras_tests/utils_tests/test_new_comparer.py" 63 ]; 64 65 meta = with lib; { 66 description = "Supplementary components to accelerate research and development in PyTorch"; 67 homepage = "https://github.com/pfnet/pytorch-pfn-extras"; 68 license = licenses.mit; 69 maintainers = with maintainers; [ samuela ]; 70 }; 71}