Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 888703c0264a
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: c881ca60ede6
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Nov 14, 2020

  1. python3Packages.pytorch-metric-learning: 0.9.81 -> 0.9.94

    bcdarwin authored and Jonathan Ringer committed Nov 14, 2020
    Copy the full SHA
    c881ca6 View commit details
Showing with 20 additions and 3 deletions.
  1. +20 −3 pkgs/development/python-modules/pytorch-metric-learning/default.nix
Original file line number Diff line number Diff line change
@@ -4,22 +4,23 @@
, isPy27
, numpy
, scikitlearn
, pytestCheckHook
, pytorch
, torchvision
, tqdm
}:

buildPythonPackage rec {
pname = "pytorch-metric-learning";
version = "0.9.81";
version = "0.9.94";

disabled = isPy27;

src = fetchFromGitHub {
owner = "KevinMusgrave";
repo = pname;
rev = "cb23328aba64f7f4658374cc2920ef5d56cda5c8"; # no version tag
sha256 = "0c2dyi4qi7clln43481xq66f6r4fadrz84jphjc5phz97bp33ds8";
rev = "v${version}";
sha256 = "1i2m651isa6xk3zj8dhzdbmd1bdzl51bh6rxifx6gg22hfa5dj9a";
};

propagatedBuildInputs = [
@@ -30,6 +31,22 @@ buildPythonPackage rec {
tqdm
];

preCheck = ''
export HOME=$TMP
export TEST_DEVICE=cpu
export TEST_DTYPES=float32,float64 # half-precision tests fail on CPU
'';
# package only requires `unittest`, but use `pytest` to exclude tests
checkInputs = [ pytestCheckHook ];
disabledTests = [
# requires FAISS (not in Nixpkgs)
"test_accuracy_calculator_and_faiss"
# require network access:
"test_get_nearest_neighbors"
"test_tuplestoweights_sampler"
"test_untrained_indexer"
];

meta = {
description = "Metric learning library for PyTorch";
homepage = "https://github.com/KevinMusgrave/pytorch-metric-learning";