Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, isPy27 5, numpy 6, scikitlearn 7, pytorch 8, torchvision 9, tqdm 10}: 11 12buildPythonPackage rec { 13 pname = "pytorch-metric-learning"; 14 version = "0.9.81"; 15 16 disabled = isPy27; 17 18 src = fetchFromGitHub { 19 owner = "KevinMusgrave"; 20 repo = pname; 21 rev = "cb23328aba64f7f4658374cc2920ef5d56cda5c8"; # no version tag 22 sha256 = "0c2dyi4qi7clln43481xq66f6r4fadrz84jphjc5phz97bp33ds8"; 23 }; 24 25 propagatedBuildInputs = [ 26 numpy 27 pytorch 28 scikitlearn 29 torchvision 30 tqdm 31 ]; 32 33 meta = { 34 description = "Metric learning library for PyTorch"; 35 homepage = "https://github.com/KevinMusgrave/pytorch-metric-learning"; 36 changelog = "https://github.com/KevinMusgrave/pytorch-metric-learning/releases/tag/v${version}"; 37 license = lib.licenses.mit; 38 maintainers = with lib.maintainers; [ bcdarwin ]; 39 }; 40}