nixpkgs/pkgs/development/python-modules/pytorch-pfn-extras/default.nix
Sandro 293a5455f3
python310Packages.ffcv: fix build (#170158)
* python310Packages.ffcv: fix pkg-config usage

Package does not use the pkgconfig python packages but ships its own method
which execs pkg-config

* python310Packages.onnx: ignore failing test

* python310Packages.pytorch-pfn-extras: fix build

* python310Packages.pytorch-pfn-extras: move comment out of multi line string

Co-authored-by: Samuel Ainsworth <skainsworth@gmail.com>

* Update pkgs/development/python-modules/pytorch-pfn-extras/default.nix

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>

Co-authored-by: Samuel Ainsworth <skainsworth@gmail.com>
2022-04-25 18:48:36 -07:00

72 lines
2.5 KiB
Nix

{ buildPythonPackage
, fetchFromGitHub
, lib
, numpy
, onnx
, packaging
, pytestCheckHook
, pytorch
, torchvision
, typing-extensions
}:
buildPythonPackage rec {
pname = "pytorch-pfn-extras";
version = "0.5.7";
src = fetchFromGitHub {
owner = "pfnet";
repo = pname;
rev = "v${version}";
sha256 = "sha256-gB575ZKXZRAy5K5CkBtfG6KG1yQ9WDREIobsy43CEOc=";
};
propagatedBuildInputs = [ numpy packaging pytorch typing-extensions ];
checkInputs = [ onnx pytestCheckHook torchvision ];
# ignore all pytest warnings
preCheck = ''
rm pytest.ini
'';
pythonImportsCheck = [ "pytorch_pfn_extras" ];
disabledTestPaths = [
# Requires optuna which is currently (2022-02-16) marked as broken.
"tests/pytorch_pfn_extras_tests/test_config_types.py"
# requires onnxruntime which was removed because of poor maintainability
# See https://github.com/NixOS/nixpkgs/pull/105951 https://github.com/NixOS/nixpkgs/pull/155058
"tests/pytorch_pfn_extras_tests/onnx_tests/test_export.py"
"tests/pytorch_pfn_extras_tests/onnx_tests/test_torchvision.py"
"tests/pytorch_pfn_extras_tests/onnx_tests/utils.py"
# RuntimeError: No Op registered for Gradient with domain_version of 9
"tests/pytorch_pfn_extras_tests/onnx_tests/test_grad.py"
# Requires CUDA access which is not possible in the nix environment.
"tests/pytorch_pfn_extras_tests/cuda_tests/test_allocator.py"
"tests/pytorch_pfn_extras_tests/nn_tests/modules_tests/test_lazy_batchnorm.py"
"tests/pytorch_pfn_extras_tests/nn_tests/modules_tests/test_lazy_conv.py"
"tests/pytorch_pfn_extras_tests/nn_tests/modules_tests/test_lazy_linear.py"
"tests/pytorch_pfn_extras_tests/nn_tests/modules_tests/test_lazy.py"
"tests/pytorch_pfn_extras_tests/profiler_tests/test_record.py"
"tests/pytorch_pfn_extras_tests/runtime_tests/test_to.py"
"tests/pytorch_pfn_extras_tests/test_handler.py"
"tests/pytorch_pfn_extras_tests/test_logic.py"
"tests/pytorch_pfn_extras_tests/test_reporter.py"
"tests/pytorch_pfn_extras_tests/training_tests/test_trainer.py"
"tests/pytorch_pfn_extras_tests/utils_tests/test_checkpoint.py"
"tests/pytorch_pfn_extras_tests/utils_tests/test_comparer.py"
"tests/pytorch_pfn_extras_tests/utils_tests/test_new_comparer.py"
];
meta = with lib; {
description = "Supplementary components to accelerate research and development in PyTorch";
homepage = "https://github.com/pfnet/pytorch-pfn-extras";
license = licenses.mit;
maintainers = with maintainers; [ samuela ];
};
}