depot/third_party/nixpkgs/pkgs/development/python-modules/jaxopt/default.nix
Default email e7ec2969af Project import generated by Copybara.
GitOrigin-RevId: 9b19f5e77dd906cb52dade0b7bd280339d2a1f3d
2024-01-13 09:15:51 +01:00

64 lines
1.1 KiB
Nix

{ lib
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
, pytest-xdist
, pytestCheckHook
, absl-py
, cvxpy
, jax
, jaxlib
, matplotlib
, numpy
, optax
, scipy
, scikit-learn
}:
buildPythonPackage rec {
pname = "jaxopt";
version = "0.8.3";
format = "setuptools";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "google";
repo = "jaxopt";
rev = "refs/tags/jaxopt-v${version}";
hash = "sha256-T/BHSnuk3IRuLkBj3Hvb/tFIb7Au25jjQtvwL28OU1U=";
};
propagatedBuildInputs = [
absl-py
jax
jaxlib
matplotlib
numpy
scipy
];
nativeCheckInputs = [
pytest-xdist
pytestCheckHook
cvxpy
optax
scikit-learn
];
pythonImportsCheck = [
"jaxopt"
"jaxopt.implicit_diff"
"jaxopt.linear_solve"
"jaxopt.loss"
"jaxopt.tree_util"
];
meta = with lib; {
homepage = "https://jaxopt.github.io";
description = "Hardware accelerated, batchable and differentiable optimizers in JAX";
changelog = "https://github.com/google/jaxopt/releases/tag/jaxopt-v${version}";
license = licenses.asl20;
maintainers = with maintainers; [ bcdarwin ];
};
}