Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at domenkozar-patch-1 54 lines 1.3 kB view raw
1{ lib 2, buildPythonPackage 3, fetchPypi 4, pytestCheckHook 5, flaky 6, numpy 7, pandas 8, torch 9, scikit-learn 10, scipy 11, tabulate 12, tqdm 13}: 14 15buildPythonPackage rec { 16 pname = "skorch"; 17 version = "0.12.1"; 18 19 src = fetchPypi { 20 inherit pname version; 21 hash = "sha256-fjNbNY/Dr7lgVGPrHJTvPGuhyPR6IVS7ohBQMI+J1+k="; 22 }; 23 24 propagatedBuildInputs = [ numpy torch scikit-learn scipy tabulate tqdm ]; 25 checkInputs = [ flaky pandas pytestCheckHook ]; 26 27 # patch out pytest-cov dep/invocation 28 postPatch = '' 29 substituteInPlace setup.cfg \ 30 --replace "--cov=skorch" "" \ 31 --replace "--cov-report=term-missing" "" \ 32 --replace "--cov-config .coveragerc" "" 33 ''; 34 35 disabledTests = [ 36 # on CPU, these expect artifacts from previous GPU run 37 "test_load_cuda_params_to_cpu" 38 # failing tests 39 "test_pickle_load" 40 ]; 41 42 # tries to import `transformers` and download HuggingFace data 43 disabledTestPaths = [ "skorch/tests/test_hf.py" ]; 44 45 pythonImportsCheck = [ "skorch" ]; 46 47 meta = with lib; { 48 description = "Scikit-learn compatible neural net library using Pytorch"; 49 homepage = "https://skorch.readthedocs.io"; 50 changelog = "https://github.com/skorch-dev/skorch/blob/master/CHANGES.md"; 51 license = licenses.bsd3; 52 maintainers = with maintainers; [ bcdarwin ]; 53 }; 54}