Skip to content

Commit 618e966

Browse files
committed
deps: make pip-git-installable (oryx direct ref + tfp-nightly via fork)
Plain `pip install git+<acopula>` previously succeeded but crashed at import: pip ignores [tool.uv.sources]/[tool.uv] overrides, so it pulled stock oryx 0.2.9 (broken on jax 0.8) and stable tensorflow-probability alongside the nightly (namespace collision -> pytype_aval_mappings). - oryx: bare `oryx>=0.2.9` -> PEP 508 direct ref `oryx @ git+https://github.com/thisiscam/oryx.git@copulaad_support` (pip and uv both honor it). The fork now depends on tfp-nightly (not stable tensorflow-probability), so no stable tfp gets installed. - jet-array: 0.1.0a1 (git) -> 0.1.0a2 (PyPI). - Drop [tool.uv.sources] and the tfp override/constraint (superseded). - hatch: allow-direct-references = true (required to build with the git dep). - README / docs: `pip install git+...` is now the primary install; uv for dev. Caveat: the git URL in [project.dependencies] makes the package un-uploadable to PyPI until a jax-0.8-compatible oryx is published upstream. Verified: clean-venv `pip install` resolves only tfp-nightly (no stable tfp), oryx from the fork, jet-array 0.1.0a2; `import acopula` succeeds. uv path also imports.
1 parent 127e372 commit 618e966

4 files changed

Lines changed: 41 additions & 71 deletions

File tree

‎README.md‎

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,13 @@ AD* (arXiv:TBD).
1717

1818
## Install
1919

20-
Install from source with [uv](https://docs.astral.sh/uv/):
20+
```bash
21+
pip install git+https://github.com/thisiscam/acopula
22+
```
23+
24+
acopula depends on a patched [`oryx`](https://github.com/jax-ml/oryx) build
25+
(pulled from git as part of the install) because stock `oryx` is incompatible
26+
with jax 0.8. For development, clone and use [uv](https://docs.astral.sh/uv/):
2127

2228
```bash
2329
git clone https://github.com/thisiscam/acopula
@@ -26,12 +32,9 @@ uv sync # add --extra examples for the plotting examples
2632
uv run python examples/01_quickstart.py
2733
```
2834

29-
uv is required (for now) because `acopula` depends on a patched
30-
[`oryx`](https://github.com/jax-ml/oryx) build pinned via `[tool.uv.sources]`;
31-
plain `pip install` — including `pip install git+…` — ignores that pin, pulls
32-
the stock PyPI `oryx` (incompatible with jax 0.8), and fails at import. A
33-
`pip install acopula` from PyPI is **not available yet**; it is gated on an
34-
upstream `oryx` release compatible with jax 0.8.
35+
A PyPI `pip install acopula` is **not available yet**: the git-pinned `oryx`
36+
dependency can't be uploaded to PyPI, so this is gated on an upstream `oryx`
37+
release compatible with jax 0.8.
3538

3639
`acopula` pins `jax>=0.8,<0.9` because it relies on JAX-internal
3740
APIs in the [jet-array](https://github.com/thisiscam/jet-array) backend.

‎docs/index.md‎

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,13 @@ forward pass via Taylor-mode AD, scaling polynomially in the dimension.
1111

1212
## Install
1313

14-
Install from source with [uv](https://docs.astral.sh/uv/):
14+
```bash
15+
pip install git+https://github.com/thisiscam/acopula
16+
```
17+
18+
acopula depends on a patched [`oryx`](https://github.com/jax-ml/oryx) build
19+
(pulled from git during install) because stock `oryx` is incompatible with
20+
jax 0.8. For development, clone and use [uv](https://docs.astral.sh/uv/):
1521

1622
```bash
1723
git clone https://github.com/thisiscam/acopula
@@ -20,12 +26,9 @@ uv sync # add --extra examples for the plotting examples
2026
uv run python examples/01_quickstart.py
2127
```
2228

23-
uv is required (for now): `acopula` depends on a patched
24-
[`oryx`](https://github.com/jax-ml/oryx) build pinned via `[tool.uv.sources]`,
25-
and plain `pip install` (including `pip install git+…`) ignores that pin, pulls
26-
the stock PyPI `oryx` (incompatible with jax 0.8), and fails at import. A PyPI
27-
`pip install acopula` is **not available yet** — it is gated on an upstream
28-
`oryx` release compatible with jax 0.8.
29+
A PyPI `pip install acopula` is **not available yet**: the git-pinned `oryx`
30+
dependency can't be uploaded to PyPI, so it is gated on an upstream `oryx`
31+
release compatible with jax 0.8.
2932

3033
`acopula` pins `jax>=0.8,<0.9` because it relies on JAX-internal APIs in the
3134
[jet-array](https://github.com/thisiscam/jet-array) backend.

‎pyproject.toml‎

Lines changed: 11 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,17 @@ classifiers = [
3232
]
3333
dependencies = [
3434
"jax>=0.8,<0.9",
35-
"jet-array==0.1.0a1",
35+
"jet-array==0.1.0a2",
3636
"jaxopt>=0.8",
3737
"optimistix>=0.0.6",
3838
"quadax>=0.2.9",
3939
"equinox>=0.13",
40-
"oryx>=0.2.9",
40+
# Direct ref to the patched fork (jax-0.8 import fixes + copy_p ILDJ +
41+
# tfp-nightly dep). pip and uv both honor this, so `pip install
42+
# git+<acopula>` works. NOTE: a git URL here makes the package
43+
# un-uploadable to PyPI; swap back to `oryx>=<ver>` once a jax-0.8
44+
# compatible oryx is published.
45+
"oryx @ git+https://github.com/thisiscam/oryx.git@copulaad_support",
4146
"tfp-nightly==0.26.0.dev20251116",
4247
"scipy>=1.11",
4348
"sympy>=1.12",
@@ -69,35 +74,11 @@ docs = [
6974
required-environments = [
7075
"sys_platform == 'linux' and platform_machine == 'x86_64'",
7176
]
72-
# oryx pulls in stable `tensorflow-probability`, which collides on disk with
73-
# `tfp-nightly` (both write into the `tensorflow_probability/` namespace).
74-
# Depending on uv's install order, stable's broken `ops.py` (referencing the
75-
# removed `jax.interpreters.xla.pytype_aval_mappings`) wins and crashes at
76-
# import. Drop stable tfp from resolution; tfp-nightly satisfies every oryx
77-
# import path.
78-
override-dependencies = [
79-
"tensorflow-probability ; sys_platform == 'never'",
80-
]
81-
# Pin tfp-nightly to the version that works with jax 0.8.x. Newer nightlies
82-
# remove `jax.interpreters.xla.pytype_aval_mappings` and crash at import.
83-
constraint-dependencies = [
84-
"tfp-nightly==0.26.0.dev20251116",
85-
]
8677

87-
# PyPI's oryx 0.2.9 imports `from jax import util`, which jax 0.8.x removed.
88-
# The `copulaad_support` branch of the patched fork uses `from jax._src import
89-
# util` and ships the lax.copy_p ILDJ shim acopula expects. This source
90-
# override applies only under uv; the published `oryx>=0.2.9` PyPI dep stays
91-
# in `dependencies` so a future plain `pip install acopula` works once the
92-
# upstream fix lands.
93-
[tool.uv.sources]
94-
oryx = { git = "https://github.com/thisiscam/oryx.git", branch = "copulaad_support" }
95-
# PyPI's jet-array==0.1.0a1 predates the log-space Taylor expansion
96-
# (sign, log|c|) representation that `bell.py`'s `log_jet=True` path
97-
# uses, and also predates the log_add NaN-gradient shift-guard at
98-
# structural zeros. Pin to the public fork until a new wheel is
99-
# released.
100-
jet-array = { git = "https://github.com/thisiscam/jet-array.git", branch = "main" }
78+
[tool.hatch.metadata]
79+
# acopula depends on the oryx fork via a git direct reference (see
80+
# [project.dependencies]); hatchling requires opting in to build it.
81+
allow-direct-references = true
10182

10283
[tool.hatch.build.targets.wheel]
10384
packages = ["acopula"]

‎uv.lock‎

Lines changed: 10 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)