mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-23 06:03:40 +00:00
78 lines
1.4 KiB
Nix
78 lines
1.4 KiB
Nix
{ buildPythonPackage
|
|
, cloudpickle
|
|
, dm-haiku
|
|
, einops
|
|
, fetchFromGitHub
|
|
, flax
|
|
, hypothesis
|
|
, jaxlib
|
|
, keras
|
|
, lib
|
|
, poetry-core
|
|
, pytestCheckHook
|
|
, pyyaml
|
|
, rich
|
|
, tensorflow
|
|
, treeo
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "treex";
|
|
version = "0.6.9";
|
|
format = "pyproject";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "cgarciae";
|
|
repo = pname;
|
|
rev = version;
|
|
sha256 = "1yvlldmhji12h249j14ba44hnb9x1fhrj7rh1cx2vn0vxj5wpg7x";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace pyproject.toml \
|
|
--replace 'rich = "^10.7.0"' 'rich = ">=10.7.0"' \
|
|
--replace 'PyYAML = "^5.4.1"' 'PyYAML = ">=5.4.1"' \
|
|
--replace 'optax = "^0.0.9"' 'optax = ">=0.0.9"'
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
poetry-core
|
|
];
|
|
|
|
buildInputs = [ jaxlib ];
|
|
|
|
propagatedBuildInputs = [
|
|
einops
|
|
flax
|
|
pyyaml
|
|
rich
|
|
treeo
|
|
];
|
|
|
|
checkInputs = [
|
|
cloudpickle
|
|
dm-haiku
|
|
hypothesis
|
|
keras
|
|
pytestCheckHook
|
|
tensorflow
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"treex"
|
|
];
|
|
|
|
disabledTestPaths = [
|
|
# Require `torchmetrics` which is not packaged in `nixpkgs`.
|
|
"tests/metrics/test_mean_absolute_error.py"
|
|
"tests/metrics/test_mean_square_error.py"
|
|
];
|
|
|
|
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 ];
|
|
};
|
|
}
|