Merge pull request #153879 from ndl/submit/treex

python3Packages.treex: init at 0.6.7
This commit is contained in:
Samuel Ainsworth 2022-01-08 17:16:08 -08:00 committed by GitHub
commit ca51f4bbd4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 86 additions and 0 deletions

View file

@ -0,0 +1,71 @@
{ buildPythonPackage
, cloudpickle
, dm-haiku
, einops
, fetchFromGitHub
, flax
, hypothesis
, keras
, lib
, poetry-core
, pytestCheckHook
, pyyaml
, rich
, tensorflow
, treeo
}:
buildPythonPackage rec {
pname = "treex";
version = "0.6.7";
format = "pyproject";
src = fetchFromGitHub {
owner = "cgarciae";
repo = pname;
rev = version;
sha256 = "1hl3wj71c7cp7jzkhyjy7xgs2vc8c89icq0bgfr49y4pwv69n43m";
};
patches = [
./relax-deps.patch
];
nativeBuildInputs = [
poetry-core
];
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 ];
};
}

View file

@ -0,0 +1,13 @@
diff --git a/pyproject.toml b/pyproject.toml
index 7b9ef68..ec11f32 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -18,7 +18,7 @@ python = "^3.7"
flax = "^0.3.4"
PyYAML = "^5.4.1"
rich = "^10.7.0"
-optax = "^0.0.9"
+optax = ">=0.0.9"
einops = "^0.3.2"
treeo = "^0.0.9"
# treeo = { path = "../treeo", develop = true }

View file

@ -9812,6 +9812,8 @@ in {
treeo = callPackage ../development/python-modules/treeo { };
treex = callPackage ../development/python-modules/treex { };
treq = callPackage ../development/python-modules/treq { };
trezor_agent = callPackage ../development/python-modules/trezor_agent { };