Skip to content

Commit

Permalink
python310Packages.treex: Enable more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
onny committed Sep 1, 2022
1 parent 2da64a8 commit 29fe749
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions pkgs/development/python-modules/treex/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
, rich
, tensorflow
, treeo
, torchmetrics
, pythonRelaxDepsHook
, torch
}:

buildPythonPackage rec {
Expand All @@ -31,15 +34,16 @@ buildPythonPackage rec {
# 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 \
--replace 'rich = "^11.2.0"' 'rich = "*"' \
--replace 'treeo = "^0.0.10"' 'treeo = "*"' \
--replace 'certifi = "^2021.10.8"' 'certifi = "*"'
'';
pythonRelaxDeps = [
"certifi"
"flax"
"rich"
"treeo"
];

nativeBuildInputs = [
poetry-core
pythonRelaxDepsHook
];

buildInputs = [ jaxlib ];
Expand All @@ -50,6 +54,7 @@ buildPythonPackage rec {
pyyaml
rich
treeo
torch
];

checkInputs = [
Expand All @@ -59,17 +64,10 @@ buildPythonPackage rec {
keras
pytestCheckHook
tensorflow
torchmetrics
];

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"
];
pythonImportsCheck = [ "treex" ];

meta = with lib; {
description = "Pytree Module system for Deep Learning in JAX";
Expand Down

0 comments on commit 29fe749

Please sign in to comment.