From b20f22d4cdf71dcc704462dbc4596651af309b2b Mon Sep 17 00:00:00 2001 From: Ben Darwin Date: Tue, 18 Feb 2020 12:47:08 -0500 Subject: [PATCH] python3Packages.pytorch-metric-learning: init at 0.9.81 --- .../pytorch-metric-learning/default.nix | 40 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 42 insertions(+) create mode 100644 pkgs/development/python-modules/pytorch-metric-learning/default.nix diff --git a/pkgs/development/python-modules/pytorch-metric-learning/default.nix b/pkgs/development/python-modules/pytorch-metric-learning/default.nix new file mode 100644 index 000000000000..daf6accb8935 --- /dev/null +++ b/pkgs/development/python-modules/pytorch-metric-learning/default.nix @@ -0,0 +1,40 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, isPy27 +, numpy +, scikitlearn +, pytorch +, torchvision +, tqdm +}: + +buildPythonPackage rec { + pname = "pytorch-metric-learning"; + version = "0.9.81"; + + disabled = isPy27; + + src = fetchFromGitHub { + owner = "KevinMusgrave"; + repo = pname; + rev = "cb23328aba64f7f4658374cc2920ef5d56cda5c8"; # no version tag + sha256 = "0c2dyi4qi7clln43481xq66f6r4fadrz84jphjc5phz97bp33ds8"; + }; + + propagatedBuildInputs = [ + numpy + pytorch + scikitlearn + torchvision + tqdm + ]; + + meta = { + description = "Metric learning library for PyTorch"; + homepage = "https://github.com/KevinMusgrave/pytorch-metric-learning"; + changelog = "https://github.com/KevinMusgrave/pytorch-metric-learning/releases/tag/v${version}"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ bcdarwin ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 4fd9cd32ed3a..342c3c269bcc 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3810,6 +3810,8 @@ in { cudaSupport = false; }; + pytorch-metric-learning = callPackage ../development/python-modules/pytorch-metric-learning { }; + pythondialog = callPackage ../development/python-modules/pythondialog { }; python2-pythondialog = callPackage ../development/python-modules/python2-pythondialog { };