Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pkgs/development/python-modules/einops/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ buildPythonPackage rec {

checkPhase = ''
export HOME=$TMPDIR

# Prevent hangs on PyTorch-related tests, see
# https://discuss.pytorch.org/t/pytorch-cpu-hangs-on-nn-linear/17748/4
export OMP_NUM_THREADS=1

nosetests -v -w tests
'';

Expand Down
75 changes: 75 additions & 0 deletions pkgs/development/python-modules/elegy/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{ buildPythonPackage
, cloudpickle
, deepdish
, deepmerge
, dm-haiku
, fetchFromGitHub
, lib
, poetry
, pytestCheckHook
, pytorch
, pyyaml
, sh
, tables
, tabulate
, tensorboardx
, tensorflow
, toolz
, treex
, typing-extensions
}:

buildPythonPackage rec {
pname = "elegy";
version = "0.8.4";
format = "pyproject";

src = fetchFromGitHub {
owner = "poets-ai";
repo = pname;
rev = version;
sha256 = "11w8lgl31b52w2qri8j8cgzd30sn8i3769g8nkkshvgkjgca9r4g";
};

nativeBuildInputs = [
poetry
];

propagatedBuildInputs = [
cloudpickle
deepdish
deepmerge
dm-haiku
pyyaml
tables
tabulate
tensorboardx
toolz
treex
typing-extensions
];

pythonImportsCheck = [
"elegy"
];

checkInputs = [
pytestCheckHook
pytorch
sh
tensorflow
];

disabledTests = [
# Fails with `Could not find compiler for platform Host: NOT_FOUND: could not find registered compiler for platform Host -- check target linkage`.
# Runs fine in docker with Ubuntu 22.04. I suspect the issue is the sandboxing in `nixpkgs` but not sure.
Comment on lines +64 to +65
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"test_saved_model_poly"
];

meta = with lib; {
description = "Neural Networks framework based on Jax inspired by Keras and Haiku";
homepage = "https://github.com/poets-ai/elegy";
license = licenses.asl20;
maintainers = with maintainers; [ ndl ];
};
}
9 changes: 6 additions & 3 deletions pkgs/development/python-modules/treex/relax-deps.patch
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
diff --git a/pyproject.toml b/pyproject.toml
index 7b9ef68..ec11f32 100644
index f0ff8a0..56787ca 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -18,7 +18,7 @@ python = "^3.7"
@@ -16,9 +16,9 @@ secondary = true
[tool.poetry.dependencies]
python = "^3.7"
flax = "^0.3.4"
PyYAML = "^5.4.1"
-PyYAML = "^5.4.1"
+PyYAML = ">=5.4.1"
rich = "^10.7.0"
-optax = "^0.0.9"
+optax = ">=0.0.9"
Expand Down
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2520,6 +2520,8 @@ in {

elasticsearchdsl = self.elasticsearch-dsl;

elegy = callPackage ../development/python-modules/elegy { };

elementpath = callPackage ../development/python-modules/elementpath { };

elevate = callPackage ../development/python-modules/elevate { };
Expand Down