Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python312Packages.bayeux-ml: init at 0.1.14 #345438

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft
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
67 changes: 67 additions & 0 deletions pkgs/development/python-modules/bayeux-ml/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,

# build-system
flit-core,

# dependencies
arviz,
blackjax,
flowmc,
jax,
jaxopt,
numpyro,
optax,
optimistix,
oryx,
pymc,
tensorflow-probability,

# tests
pytestCheckHook,
}:

buildPythonPackage rec {
pname = "bayeux-ml";
version = "0.1.14";
pyproject = true;

src = fetchFromGitHub {
owner = "jax-ml";
repo = "bayeux";
rev = "refs/tags/v${version}";
hash = "sha256-dnfs5AiKdoYeLmgWqbvrWrbp77kXiXUEIhUsrDYQXYE=";
};

build-system = [ flit-core ];

dependencies = [
arviz
blackjax
flowmc
jax
jaxopt
numpyro
optax
optimistix
oryx
pymc
tensorflow-probability
];

pythonImportsCheck = [ "bayeux_ml" ];

nativeCheckInputs = [
pytestCheckHook
];

meta = {
description = "State of the art inference for your bayesian models";
homepage = "https://github.com/jax-ml/bayeux";
changelog = "https://github.com/jax-ml/bayeux/blob/${src.rev}/CHANGELOG.md";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ GaetanLepage ];
};
}
32 changes: 32 additions & 0 deletions pkgs/development/python-modules/inference-gym/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
lib,
buildPythonPackage,
fetchPypi,
}:

buildPythonPackage rec {
pname = "inference-gym";
version = "0.0.4";
format = "wheel";

src = fetchPypi {
inherit format version;
pname = "inference_gym";
dist = "py3";
python = "py3";
hash = "sha256-bpi/IB8PuLPIKoTjmBeVl/4XGvE/yyG8WYxNqNcruvE=";
};

pythonImportsCheck = [ "inference_gym" ];

# The package does not ship any test.
doCheck = false;

meta = {
description = "Oryx is a library for probabilistic programming and deep learning built on top of Jax";
homepage = "https://github.com/jax-ml/oryx";
changelog = "https://github.com/jax-ml/oryx/releases/tag/v${version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ GaetanLepage ];
};
}
66 changes: 66 additions & 0 deletions pkgs/development/python-modules/lineax/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,

# build-system
hatchling,

# dependencies
equinox,
jax,
jaxtyping,
typing-extensions,

# tests
beartype,
pytest,
python,
}:

buildPythonPackage rec {
pname = "lineax";
version = "0.0.6";
pyproject = true;

src = fetchFromGitHub {
owner = "patrick-kidger";
repo = "lineax";
rev = "refs/tags/v${version}";
hash = "sha256-rM3H+q75F98eEIJkEszWgxD5C5vGK5RlYtVv8GD/VC0=";
};

build-system = [ hatchling ];

dependencies = [
equinox
jax
jaxtyping
typing-extensions
];

pythonImportsCheck = [ "lineax" ];

nativeCheckInputs = [
beartype
pytest
];

# Intentionaly not using pytest directly as it leads to JAX out-of-memory'ing
# https://github.com/patrick-kidger/lineax/blob/1909d190c1963d5f2d991508c1b2714f2266048b/tests/README.md
checkPhase = ''
runHook preCheck

${python.interpreter} -m tests

runHook postCheck
'';

meta = {
description = "Linear solvers in JAX and Equinox";
homepage = "https://github.com/patrick-kidger/lineax";
changelog = "https://github.com/patrick-kidger/lineax/releases/tag/v${version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ GaetanLepage ];
};
}
63 changes: 63 additions & 0 deletions pkgs/development/python-modules/optimistix/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,

# build-system
hatchling,

# dependencies
equinox,
jax,
jaxtyping,
lineax,
typing-extensions,

# checks
beartype,
jaxlib,
optax,
pytestCheckHook,
pytest-xdist,
}:

buildPythonPackage rec {
pname = "optimistix";
version = "0.0.8";
pyproject = true;

src = fetchFromGitHub {
owner = "patrick-kidger";
repo = "optimistix";
rev = "refs/tags/v${version}";
hash = "sha256-0ehNApiBoiAb8LFBW81ZCRPsjTVQG8zRTVSAp7oHF8w=";
};

build-system = [ hatchling ];

dependencies = [
equinox
jax
jaxtyping
lineax
typing-extensions
];

pythonImportsCheck = [ "optimistix" ];

nativeCheckInputs = [
beartype
jaxlib
optax
pytestCheckHook
pytest-xdist
];

meta = {
description = "Nonlinear optimisation (root-finding, least squares, ...) in JAX+Equinox";
homepage = "https://github.com/patrick-kidger/optimistix";
changelog = "https://github.com/patrick-kidger/optimistix/releases/tag/v${version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ GaetanLepage ];
};
}
53 changes: 53 additions & 0 deletions pkgs/development/python-modules/oryx/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,

# build-system
poetry-core,

# dependencies
jax,
jaxlib,
tensorflow-probability,

# tests
inference-gym,
pytestCheckHook,
}:

buildPythonPackage rec {
pname = "oryx";
version = "0.2.7";
pyproject = true;

src = fetchFromGitHub {
owner = "jax-ml";
repo = "oryx";
rev = "refs/tags/v${version}";
hash = "sha256-1n7ogGuFNAeOyXWe0/pAouhg2+aA3MXxlCcsrfqRTdU=";
};

build-system = [ poetry-core ];

dependencies = [
jax
jaxlib
tensorflow-probability
];

pythonImportsCheck = [ "oryx" ];

nativeCheckInputs = [
inference-gym
pytestCheckHook
];

meta = {
description = "Oryx is a library for probabilistic programming and deep learning built on top of Jax";
homepage = "https://github.com/jax-ml/oryx";
changelog = "https://github.com/jax-ml/oryx/releases/tag/v${version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ GaetanLepage ];
};
}
10 changes: 10 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1496,6 +1496,8 @@ self: super: with self; {

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

bayeux-ml = callPackage ../development/python-modules/bayeux-ml { };

bayesian-optimization = callPackage ../development/python-modules/bayesian-optimization { };

bayespy = callPackage ../development/python-modules/bayespy { };
Expand Down Expand Up @@ -6071,6 +6073,8 @@ self: super: with self; {

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

inference-gym = callPackage ../development/python-modules/inference-gym { };

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

inflect = callPackage ../development/python-modules/inflect { };
Expand Down Expand Up @@ -7226,6 +7230,8 @@ self: super: with self; {

linear-operator = callPackage ../development/python-modules/linear-operator { };

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

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

lineedit = callPackage ../development/python-modules/lineedit { };
Expand Down Expand Up @@ -9408,6 +9414,8 @@ self: super: with self; {

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

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

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

optree = callPackage ../development/python-modules/optree { };
Expand Down Expand Up @@ -9450,6 +9458,8 @@ self: super: with self; {

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

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

os-client-config = callPackage ../development/python-modules/os-client-config { };

os-service-types = callPackage ../development/python-modules/os-service-types { };
Expand Down