File tree Expand file tree Collapse file tree 3 files changed +133
-0
lines changed
development/python-modules Expand file tree Collapse file tree 3 files changed +133
-0
lines changed Original file line number Diff line number Diff line change 1+ {
2+ lib ,
3+ buildPythonPackage ,
4+ fetchFromGitHub ,
5+
6+ # build-system
7+ hatchling ,
8+
9+ # dependencies
10+ equinox ,
11+ jax ,
12+ jaxtyping ,
13+ typing-extensions ,
14+
15+ # tests
16+ beartype ,
17+ pytest ,
18+ python ,
19+ } :
20+
21+ buildPythonPackage rec {
22+ pname = "lineax" ;
23+ version = "0.0.6" ;
24+ pyproject = true ;
25+
26+ src = fetchFromGitHub {
27+ owner = "patrick-kidger" ;
28+ repo = "lineax" ;
29+ rev = "refs/tags/v${ version } " ;
30+ hash = "sha256-rM3H+q75F98eEIJkEszWgxD5C5vGK5RlYtVv8GD/VC0=" ;
31+ } ;
32+
33+ build-system = [ hatchling ] ;
34+
35+ dependencies = [
36+ equinox
37+ jax
38+ jaxtyping
39+ typing-extensions
40+ ] ;
41+
42+ pythonImportsCheck = [ "lineax" ] ;
43+
44+ nativeCheckInputs = [
45+ beartype
46+ pytest
47+ ] ;
48+
49+ # Intentionaly not using pytest directly as it leads to JAX out-of-memory'ing
50+ # https://github.com/patrick-kidger/lineax/blob/1909d190c1963d5f2d991508c1b2714f2266048b/tests/README.md
51+ checkPhase = ''
52+ runHook preCheck
53+
54+ ${ python . interpreter } -m tests
55+
56+ runHook postCheck
57+ '' ;
58+
59+ meta = {
60+ description = "Linear solvers in JAX and Equinox" ;
61+ homepage = "https://github.com/patrick-kidger/lineax" ;
62+ changelog = "https://github.com/patrick-kidger/lineax/releases/tag/v${ version } " ;
63+ license = lib . licenses . asl20 ;
64+ maintainers = with lib . maintainers ; [ GaetanLepage ] ;
65+ } ;
66+ }
Original file line number Diff line number Diff line change 1+ {
2+ lib ,
3+ buildPythonPackage ,
4+ fetchFromGitHub ,
5+
6+ # build-system
7+ hatchling ,
8+
9+ # dependencies
10+ equinox ,
11+ jax ,
12+ jaxtyping ,
13+ lineax ,
14+ typing-extensions ,
15+
16+ # checks
17+ beartype ,
18+ jaxlib ,
19+ optax ,
20+ pytestCheckHook ,
21+ pytest-xdist ,
22+ } :
23+
24+ buildPythonPackage rec {
25+ pname = "optimistix" ;
26+ version = "0.0.8" ;
27+ pyproject = true ;
28+
29+ src = fetchFromGitHub {
30+ owner = "patrick-kidger" ;
31+ repo = "optimistix" ;
32+ rev = "refs/tags/v${ version } " ;
33+ hash = "sha256-0ehNApiBoiAb8LFBW81ZCRPsjTVQG8zRTVSAp7oHF8w=" ;
34+ } ;
35+
36+ build-system = [ hatchling ] ;
37+
38+ dependencies = [
39+ equinox
40+ jax
41+ jaxtyping
42+ lineax
43+ typing-extensions
44+ ] ;
45+
46+ pythonImportsCheck = [ "optimistix" ] ;
47+
48+ nativeCheckInputs = [
49+ beartype
50+ jaxlib
51+ optax
52+ pytestCheckHook
53+ pytest-xdist
54+ ] ;
55+
56+ meta = {
57+ description = "Nonlinear optimisation (root-finding, least squares, ...) in JAX+Equinox" ;
58+ homepage = "https://github.com/patrick-kidger/optimistix" ;
59+ changelog = "https://github.com/patrick-kidger/optimistix/releases/tag/v${ version } " ;
60+ license = lib . licenses . asl20 ;
61+ maintainers = with lib . maintainers ; [ GaetanLepage ] ;
62+ } ;
63+ }
Original file line number Diff line number Diff line change @@ -7230,6 +7230,8 @@ self: super: with self; {
72307230
72317231 linear-operator = callPackage ../development/python-modules/linear-operator { };
72327232
7233+ lineax = callPackage ../development/python-modules/lineax { };
7234+
72337235 linecache2 = callPackage ../development/python-modules/linecache2 { };
72347236
72357237 lineedit = callPackage ../development/python-modules/lineedit { };
@@ -9414,6 +9416,8 @@ self: super: with self; {
94149416
94159417 optax = callPackage ../development/python-modules/optax { };
94169418
9419+ optimistix = callPackage ../development/python-modules/optimistix { };
9420+
94179421 optimum = callPackage ../development/python-modules/optimum { };
94189422
94199423 optree = callPackage ../development/python-modules/optree { };
You can’t perform that action at this time.
0 commit comments