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>
This commit is contained in:
Sandro 2022-04-26 03:48:36 +02:00 committed by GitHub
parent b8bea2b489
commit 293a5455f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 4 deletions

View file

@ -5,7 +5,7 @@
, numba
, opencv4
, pandas
, pkgconfig
, pkg-config
, pytorch-pfn-extras
, terminaltables
, tqdm
@ -35,7 +35,7 @@ buildPythonPackage rec {
--replace "'webdataset'," ""
'';
nativeBuildInputs = [ pkgconfig ];
nativeBuildInputs = [ pkg-config ];
buildInputs = [ libjpeg ];
propagatedBuildInputs = [ opencv4 numba pandas pytorch-pfn-extras terminaltables tqdm ];

View file

@ -55,6 +55,11 @@ buildPythonPackage rec {
export MAX_JOBS=$NIX_BUILD_CORES
'';
disabledTestPaths = [
# Unexpected output fields from running code: {'stderr'}
"onnx/examples/np_array_tensorproto.ipynb"
];
# The executables are just utility scripts that aren't too important
postInstall = ''
rm -r $out/bin

View file

@ -3,8 +3,10 @@
, lib
, numpy
, onnx
, packaging
, pytestCheckHook
, pytorch
, torchvision
, typing-extensions
}:
@ -19,9 +21,14 @@ buildPythonPackage rec {
sha256 = "sha256-gB575ZKXZRAy5K5CkBtfG6KG1yQ9WDREIobsy43CEOc=";
};
propagatedBuildInputs = [ numpy pytorch typing-extensions ];
propagatedBuildInputs = [ numpy packaging pytorch typing-extensions ];
checkInputs = [ onnx pytestCheckHook ];
checkInputs = [ onnx pytestCheckHook torchvision ];
# ignore all pytest warnings
preCheck = ''
rm pytest.ini
'';
pythonImportsCheck = [ "pytorch_pfn_extras" ];
@ -29,6 +36,15 @@ buildPythonPackage rec {
# 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"