1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 setuptools, 6 numpy, 7 opencv4, 8 sotabenchapi, 9 torch, 10 torchvision, 11 tqdm, 12}: 13 14let 15 version = "0.0.31"; 16 pname = "torchbench"; 17in 18buildPythonPackage { 19 inherit pname version; 20 pyproject = true; 21 22 src = fetchPypi { 23 inherit pname version; 24 hash = "sha256-EBZzcnRT50KREIOPrr/OZTJ4639ZUEejcelh3QSBcZ8="; 25 }; 26 27 # requirements.txt is missing in the Pypi archive and this makes the setup.py script fails 28 postPatch = '' 29 touch requirements.txt 30 ''; 31 32 build-system = [ 33 setuptools 34 ]; 35 36 dependencies = [ 37 numpy 38 opencv4 39 sotabenchapi 40 torch 41 torchvision 42 tqdm 43 ]; 44 45 pythonImportsCheck = [ 46 "torchbench" 47 ]; 48 49 # No tests 50 doCheck = false; 51 52 meta = { 53 description = "Easily benchmark machine learning models in PyTorch"; 54 homepage = "https://github.com/paperswithcode/torchbench"; 55 license = lib.licenses.asl20; 56 maintainers = with lib.maintainers; [ ]; 57 }; 58}