2022-01-13 20:06:32 +00:00
|
|
|
{ buildPythonPackage
|
|
|
|
, cloudpickle
|
|
|
|
, dm-haiku
|
|
|
|
, einops
|
|
|
|
, fetchFromGitHub
|
|
|
|
, flax
|
|
|
|
, hypothesis
|
2022-02-10 20:34:41 +00:00
|
|
|
, jaxlib
|
2022-01-13 20:06:32 +00:00
|
|
|
, keras
|
|
|
|
, lib
|
|
|
|
, poetry-core
|
|
|
|
, pytestCheckHook
|
|
|
|
, pyyaml
|
|
|
|
, rich
|
|
|
|
, tensorflow
|
|
|
|
, treeo
|
2022-09-09 14:08:57 +00:00
|
|
|
, torchmetrics
|
|
|
|
, pythonRelaxDepsHook
|
|
|
|
, torch
|
2022-01-13 20:06:32 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "treex";
|
2022-04-03 18:54:34 +00:00
|
|
|
version = "0.6.10";
|
2022-01-13 20:06:32 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cgarciae";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-04-03 18:54:34 +00:00
|
|
|
hash = "sha256-ZHfgmRNbFh8DFZkmilY0pmRNQhJFqT689I7Lu8FuFm4=";
|
2022-01-13 20:06:32 +00:00
|
|
|
};
|
|
|
|
|
2022-04-03 18:54:34 +00:00
|
|
|
# At the time of writing (2022-03-29), rich is currently at version 11.0.0.
|
|
|
|
# The treeo dependency is compatible with a patch, but not marked as such in
|
|
|
|
# treex. See https://github.com/cgarciae/treex/issues/68.
|
2022-09-09 14:08:57 +00:00
|
|
|
pythonRelaxDeps = [
|
|
|
|
"certifi"
|
|
|
|
"flax"
|
|
|
|
"rich"
|
|
|
|
"treeo"
|
|
|
|
];
|
2022-01-13 20:06:32 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
2022-09-09 14:08:57 +00:00
|
|
|
pythonRelaxDepsHook
|
2022-01-13 20:06:32 +00:00
|
|
|
];
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
buildInputs = [ jaxlib ];
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
einops
|
|
|
|
flax
|
|
|
|
pyyaml
|
|
|
|
rich
|
|
|
|
treeo
|
2022-09-09 14:08:57 +00:00
|
|
|
torch
|
2022-01-13 20:06:32 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
cloudpickle
|
|
|
|
dm-haiku
|
|
|
|
hypothesis
|
|
|
|
keras
|
|
|
|
pytestCheckHook
|
|
|
|
tensorflow
|
2022-09-09 14:08:57 +00:00
|
|
|
torchmetrics
|
2022-01-13 20:06:32 +00:00
|
|
|
];
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
pythonImportsCheck = [ "treex" ];
|
2022-01-13 20:06:32 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Pytree Module system for Deep Learning in JAX";
|
|
|
|
homepage = "https://github.com/cgarciae/treex";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ ndl ];
|
|
|
|
};
|
|
|
|
}
|