9c6ee729d6
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
66 lines
1.1 KiB
Nix
66 lines
1.1 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, pythonOlder
|
|
, fetchFromGitHub
|
|
, pytestCheckHook
|
|
, absl-py
|
|
, cvxpy
|
|
, jax
|
|
, jaxlib
|
|
, matplotlib
|
|
, numpy
|
|
, optax
|
|
, scipy
|
|
, scikit-learn
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "jaxopt";
|
|
version = "0.5.5";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "google";
|
|
repo = pname;
|
|
rev = "refs/tags/${pname}-v${version}";
|
|
hash = "sha256-WOsr/Dvguu9/qX6+LMlAKM3EANtYPtDu8Uo2157+bs0=";
|
|
};
|
|
|
|
propagatedBuildInputs = [
|
|
absl-py
|
|
jax
|
|
jaxlib
|
|
matplotlib
|
|
numpy
|
|
scipy
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
cvxpy
|
|
optax
|
|
scikit-learn
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"jaxopt"
|
|
"jaxopt.implicit_diff"
|
|
"jaxopt.linear_solve"
|
|
"jaxopt.loss"
|
|
"jaxopt.tree_util"
|
|
];
|
|
|
|
disabledTests = [
|
|
# Stack frame issue
|
|
"test_bisect"
|
|
];
|
|
|
|
meta = with lib; {
|
|
homepage = "https://jaxopt.github.io";
|
|
description = "Hardware accelerated, batchable and differentiable optimizers in JAX";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ bcdarwin ];
|
|
};
|
|
}
|