Merge pull request #153879 from ndl/submit/treex
python3Packages.treex: init at 0.6.7
This commit is contained in:
commit
ca51f4bbd4
3 changed files with 86 additions and 0 deletions
71
pkgs/development/python-modules/treex/default.nix
Normal file
71
pkgs/development/python-modules/treex/default.nix
Normal 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 ];
|
||||||
|
};
|
||||||
|
}
|
13
pkgs/development/python-modules/treex/relax-deps.patch
Normal file
13
pkgs/development/python-modules/treex/relax-deps.patch
Normal 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 }
|
|
@ -9812,6 +9812,8 @@ in {
|
||||||
|
|
||||||
treeo = callPackage ../development/python-modules/treeo { };
|
treeo = callPackage ../development/python-modules/treeo { };
|
||||||
|
|
||||||
|
treex = callPackage ../development/python-modules/treex { };
|
||||||
|
|
||||||
treq = callPackage ../development/python-modules/treq { };
|
treq = callPackage ../development/python-modules/treq { };
|
||||||
|
|
||||||
trezor_agent = callPackage ../development/python-modules/trezor_agent { };
|
trezor_agent = callPackage ../development/python-modules/trezor_agent { };
|
||||||
|
|
Loading…
Reference in a new issue