1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-06 10:39:29 +03:00
nixpkgs/pkgs/development/python-modules/treex/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

81 lines
1.6 KiB
Nix
Raw Normal View History

2021-12-30 18:17:35 +01:00
{ buildPythonPackage
, cloudpickle
, dm-haiku
, einops
, fetchFromGitHub
, flax
, hypothesis
, jaxlib
2021-12-30 18:17:35 +01:00
, keras
, lib
, poetry-core
, pytestCheckHook
, pyyaml
, rich
, tensorflow
, treeo
}:
buildPythonPackage rec {
pname = "treex";
2022-03-30 02:50:23 +00:00
version = "0.6.10";
2021-12-30 18:17:35 +01:00
format = "pyproject";
src = fetchFromGitHub {
owner = "cgarciae";
repo = pname;
rev = version;
2022-03-30 02:50:23 +00:00
hash = "sha256-ZHfgmRNbFh8DFZkmilY0pmRNQhJFqT689I7Lu8FuFm4=";
2021-12-30 18:17:35 +01:00
};
2022-03-30 02:50:23 +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.
postPatch = ''
substituteInPlace pyproject.toml \
2022-03-30 02:50:23 +00:00
--replace 'rich = "^11.2.0"' 'rich = "*"' \
2022-07-18 13:02:32 +02:00
--replace 'treeo = "^0.0.10"' 'treeo = "*"' \
--replace 'certifi = "^2021.10.8"' 'certifi = "*"'
'';
2021-12-30 18:17:35 +01:00
nativeBuildInputs = [
poetry-core
];
buildInputs = [ jaxlib ];
2021-12-30 18:17:35 +01:00
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 ];
};
}