nixpkgs/pkgs/development/python-modules/optax/default.nix
Martin Weinelt 9f340b5bf1 treewide: remove redundant numprocesses pytest-xdist parameter
Including the pytest-xdist package automatically configures numprocesses
to $NIX_BUILD_CORES, so specifying these on a package level has become
redundant.
2022-04-15 01:39:54 +02:00

60 lines
1.1 KiB
Nix

{ absl-py
, buildPythonPackage
, chex
, dm-haiku
, fetchFromGitHub
, jaxlib
, lib
, numpy
, pytest-xdist
, pytestCheckHook
, tensorflow
, tensorflow-datasets
}:
buildPythonPackage rec {
pname = "optax";
version = "0.1.1";
src = fetchFromGitHub {
owner = "deepmind";
repo = pname;
rev = "v${version}";
hash = "sha256-s/BcqzhdfWzR61MStusUPQtuT4+t8NcC5gBGiGggFqw=";
};
buildInputs = [ jaxlib ];
propagatedBuildInputs = [
absl-py
chex
numpy
];
checkInputs = [
dm-haiku
pytest-xdist
pytestCheckHook
tensorflow
tensorflow-datasets
];
pythonImportsCheck = [
"optax"
];
disabledTestPaths = [
# Requires `flax` which depends on `optax` creating circular dependency.
"optax/_src/equivalence_test.py"
# See https://github.com/deepmind/optax/issues/323.
"examples/lookahead_mnist_test.py"
];
meta = with lib; {
description = "Optax is a gradient processing and optimization library for JAX.";
homepage = "https://github.com/deepmind/optax";
license = licenses.asl20;
maintainers = with maintainers; [ ndl ];
};
}