2023-08-10 07:59:29 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, hatchling
|
|
|
|
, jax
|
|
|
|
, jaxlib
|
|
|
|
, jaxtyping
|
|
|
|
, typing-extensions
|
|
|
|
, beartype
|
2023-10-19 13:55:26 +00:00
|
|
|
, optax
|
2023-08-10 07:59:29 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "equinox";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "0.11.2";
|
2023-10-19 13:55:26 +00:00
|
|
|
pyproject = true;
|
2023-08-10 07:59:29 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "patrick-kidger";
|
2023-10-19 13:55:26 +00:00
|
|
|
repo = "equinox";
|
2023-08-10 07:59:29 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-qFTKiY/t2LCCWJBOSfaX0hYQInrpXgfhTc+J4iuyVbM=";
|
2023-08-10 07:59:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
hatchling
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
jax
|
|
|
|
jaxlib
|
|
|
|
jaxtyping
|
|
|
|
typing-extensions
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
beartype
|
2023-10-19 13:55:26 +00:00
|
|
|
optax
|
2023-08-10 07:59:29 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "equinox" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A JAX library based around a simple idea: represent parameterised functions (such as neural networks) as PyTrees";
|
|
|
|
homepage = "https://github.com/patrick-kidger/equinox";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ GaetanLepage ];
|
|
|
|
};
|
|
|
|
}
|