Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

feat(signals): torch multi-head network and onnx export for inbox ranking (#116266)

posthog[bot]25fb8085e739
diff --git a/.github/workflows/ci-inbox-ranking.yml b/.github/workflows/ci-inbox-ranking.yml
new file mode 100644
index 000000000000..fd815380ff49
--- /dev/null
+++ b/.github/workflows/ci-inbox-ranking.yml
@@ -0,0 +1,70 @@
+# Runs the inbox ranking multi-head network tests with the inbox-ranking dependency group.
+# torch is not a main dependency, so the other test jobs skip these tests.
+name: Inbox ranking network CI
+
+on:
+ pull_request:
+ paths:
+ - '.github/workflows/ci-inbox-ranking.yml'
+ - 'products/signals/dags/inbox_ranking/**'
+ - 'pyproject.toml'
+ - 'uv.lock'
+ workflow_dispatch:
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}
+
+permissions:
+ contents: read
+
+env:
+ SECRET_KEY: '6b01eee4f945ca25045b5aab440b953461faf08693a9abbf1166dc7c6b9772da' # unsafe - for testing only
+ TEST: 1
+
+jobs:
+ network:
+ name: Torch network and ONNX parity tests
+ runs-on: depot-ubuntu-24.04
+ timeout-minutes: 20
+ steps:
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
+ with:
+ clean: false
+
+ - name: Mint setup-action GitHub token
+ id: setup-gh-token
+ if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
+ continue-on-error: true
+ uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1
+ with:
+ client-id: ${{ vars.GH_APP_POSTHOG_SETUP_ACTIONS_APP_ID }}
+ private-key: ${{ secrets.GH_APP_POSTHOG_SETUP_ACTIONS_PRIVATE_KEY }}
+ skip-token-revoke: true
+
+ - name: Set up Python
+ uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
+ with:
+ python-version-file: 'pyproject.toml'
+ token: ${{ steps.setup-gh-token.outputs.token || github.token }}
+
+ - name: Install uv
+ id: setup-uv
+ uses: ./.github/actions/setup-uv
+
+ - name: Install SAML (python3-saml) dependencies
+ if: steps.setup-uv.outputs.cache-hit != 'true'
+ run: |
+ sudo rm -f /etc/apt/sources.list.d/*twingate*
+ sudo apt-get update
+ sudo apt-get install libxml2-dev libxmlsec1-dev libxmlsec1-openssl
+
+ - name: Install python dependencies with the inbox-ranking group
+ run: UV_PROJECT_ENVIRONMENT=$pythonLocation uv sync --frozen --dev --group inbox-ranking
+
+ # The tests need no database, ClickHouse or Redis, so the job starts no services.
+ - name: Run the network tests
+ run: |
+ python -c "import torch, onnxruntime"
+ pytest products/signals/dags/inbox_ranking/tests/test_multihead_network.py \
+ products/signals/dags/inbox_ranking/tests/test_multihead.py -v --tb=short
diff --git a/products/signals/dags/inbox_ranking/README.md b/products/signals/dags/inbox_ranking/README.md
index c7f17b6480e4..6bc7b31d1a3e 100644
--- a/products/signals/dags/inbox_ranking/README.md
+++ b/products/signals/dags/inbox_ranking/README.md
@@ -329,12 +329,19 @@ Nothing here touches the prod bucket: the reader credential is read-only and the
### The multi-head prototype
-`multihead/` is an offline experiment and not a dag. It tests whether one shared network over the report vector, with or without the team's project vectors, beats the per-head XGBoost champion recipe of the `report_embeddings` family. It reads the disk cache the sync script fills, so sync with `INBOX_RANKING_SYNC_EMBEDDINGS=1` first. The dev stack does not need to be up:
+`multihead/` is an offline experiment and not a dag. It tests whether one shared network over the report vector, with or without the team's project vectors, beats the per-head XGBoost champion recipe of the `report_embeddings` family. It reads the disk cache the sync script fills, so sync with `INBOX_RANKING_SYNC_EMBEDDINGS=1` first. The dev stack does not need to be up.
+
+The network is PyTorch. torch is not a main dependency: it comes from the `inbox-ranking` dependency group, with the CPU-only wheels, together with `onnx` and `onnxruntime`. The group conflicts with the `sentiment` group, which takes the CUDA build of torch, so install one or the other. No image installs the group.
```bash
+uv sync --group inbox-ranking
DEBUG=1 python -m products.signals.dags.inbox_ranking.multihead --output multihead.json
```
+`multihead/network.py` is the only module that imports torch. `multihead/inputs.py` holds the inputs and the settings, so the prototype and its callers build them without torch. Never import `network.py` from a module on the Django, Temporal or Dagster import path: `test_multihead_network.py` fails if torch reaches one. Without the group, the torch tests skip. `ci-inbox-ranking.yml` installs the group and runs them.
+
+`export_onnx(network, path)` writes the network as one ONNX graph and returns its head order. The inputs are `report` (N x 1536) and, for the network with project vectors, `project` (N x 4 x 1536) and `has_history` (N x 4), all float32. The one output is `probabilities` (N x heads), after the sigmoid. N is a dynamic axis.
+
The run takes the newest day that has the state, labels and report embeddings cached, unless you pass `--partition`. It builds the `open`, `action` and `fixed` examples with the training dag's own `example_moments`, `cap_examples` and `holdout_mask`. Then it prints pooled AUC, within-team AUC (`team_auc`), average precision and ECE per head for three models on each head's own holdout rows:
- `champion_recipe` is the `XGB_PARAMS` booster, refit on the head's train rows.
diff --git a/products/signals/dags/inbox_ranking/multihead/__main__.py b/products/signals/dags/inbox_ranking/multihead/__main__.py
index 9d44dc866515..c5e96c157815 100644
--- a/products/signals/dags/inbox_ranking/multihead/__main__.py
+++ b/products/signals/dags/inbox_ranking/multihead/__main__.py
@@ -1,5 +1,6 @@
"""Run the multi-head prototype against the snapshots `bin/sync_snapshots_local.sh` cached on disk.
+ uv sync --group inbox-ranking
INBOX_RANKING_SYNC_EMBEDDINGS=1 products/signals/dags/inbox_ranking/bin/sync_snapshots_local.sh
DEBUG=1 python -m products.signals.dags.inbox_ranking.multihead [--partition YYYY-MM-DD] [--output results.json]
diff --git a/products/signals/dags/inbox_ranking/multihead/inputs.py b/products/signals/dags/inbox_ranking/multihead/inputs.py
new file mode 100644
index 000000000000..3fa35cfb5531
--- /dev/null
+++ b/products/signals/dags/inbox_ranking/multihead/inputs.py
@@ -0,0 +1,40 @@
+"""The network's inputs and settings, kept apart from `network.py` so that callers can build them
+without importing torch."""
+
+import numpy as np
+
+from posthog.dataclasses import frozen
+
+
+@frozen
+class NetworkConfig:
+ projection_dim: int = 64
+ trunk_dim: int = 64
+ dropout: float = 0.2
+ weight_decay: float = 1e-2
+ learning_rate: float = 1e-3
+ epochs: int = 15
+ batch_size: int = 256
+ seed: int = 0
+
+
+@frozen
+class ProjectContext:
+ """The team's project vectors per (team, moment), shared by every report of that pair."""
+
+ # (pairs, kinds, D) float32; an all-zero row where the kind's history is too thin.
+ vectors: np.ndarray
+ # (pairs, kinds) float32, 1.0 where the kind had enough history to carry a mean.
+ has_history: np.ndarray
+ # (rows,) int, the pair each example row reads.
+ index: np.ndarray
+
+
+@frozen
+class NetworkInputs:
+ # (rows, D) float32.
+ reports: np.ndarray
+ context: ProjectContext | None = None
+
+ def __len__(self) -> int:
+ return len(self.reports)
diff --git a/products/signals/dags/inbox_ranking/multihead/local.py b/products/signals/dags/inbox_ranking/multihead/local.py
index 680a915bb934..d08aed58bb58 100644
--- a/products/signals/dags/inbox_ranking/multihead/local.py
+++ b/products/signals/dags/inbox_ranking/multihead/local.py
@@ -27,7 +27,7 @@ from products.signals.backend.ranking.features import (
from products.signals.dags.inbox_ranking.common import DATASET_VERSION, PARQUET_PART_NAME
from products.signals.dags.inbox_ranking.dataset.dag import EMBEDDINGS_TABLE, LABELS_TABLE, STATE_TABLE
from products.signals.dags.inbox_ranking.dataset.project_vectors import EMBEDDING_COLUMNS, LABEL_COLUMNS
-from products.signals.dags.inbox_ranking.multihead.network import NetworkConfig
+from products.signals.dags.inbox_ranking.multihead.inputs import NetworkConfig
from products.signals.dags.inbox_ranking.multihead.prototype import (
ABLATIONS,
REPORT_ONLY,
diff --git a/products/signals/dags/inbox_ranking/multihead/network.py b/products/signals/dags/inbox_ranking/multihead/network.py
index 3283fd88d6b6..cff3ee4831fb 100644
--- a/products/signals/dags/inbox_ranking/multihead/network.py
+++ b/products/signals/dags/inbox_ranking/multihead/network.py
@@ -8,237 +8,191 @@ One projection serves every vector, so the report and the team's history land in
and their element-wise product can say "this report looks like what the team engaged with". Weight
decay is decoupled (AdamW), and dropout sits on the trunk's input and output.
-Plain numpy with a hand-written backward pass, because torch is not a main dependency and the
-prototype has to run from the default environment. A gradient check test pins the backward pass.
-A label is NaN where the head has no example for the row, and a NaN label adds no gradient.
+A label is NaN where the head has no example for the row, and a NaN label adds no gradient, so one
+network trains every head on rows that only some heads cover.
+
+torch is not a main dependency: it comes from the `inbox-ranking` dependency group. Import this
+module only from dev code, never from a module on the Django, Temporal or Dagster import path.
"""
import math
-from collections.abc import Iterator
+from collections.abc import Iterator, Sequence
+from contextlib import contextmanager
+from pathlib import Path
import numpy as np
-
-from posthog.dataclasses import frozen
+import torch
+from torch import nn
+from torch.nn import functional as F
from products.signals.backend.ranking.features import EMBEDDING_DIMENSIONS
+from products.signals.dags.inbox_ranking.multihead.inputs import NetworkConfig, NetworkInputs
# text-embedding-3 vectors are unit length, so each component is about 1/sqrt(D). Scaling by
# sqrt(D) gives the projection unit-variance inputs, which is what its initialization assumes.
INPUT_SCALE = math.sqrt(EMBEDDING_DIMENSIONS)
+ONNX_OPSET = 17
+ONNX_INPUTS = ("report", "project", "has_history")
+ONNX_OUTPUT = "probabilities"
-@frozen
-class NetworkConfig:
- projection_dim: int = 64
- trunk_dim: int = 64
- dropout: float = 0.2
- weight_decay: float = 1e-2
- learning_rate: float = 1e-3
- epochs: int = 15
- batch_size: int = 256
- seed: int = 0
-
-
-@frozen
-class ProjectContext:
- """The team's project vectors per (team, moment), shared by every report of that pair."""
- # (pairs, kinds, D) float32; an all-zero row where the kind's history is too thin.
- vectors: np.ndarray
- # (pairs, kinds) float32, 1.0 where the kind had enough history to carry a mean.
- has_history: np.ndarray
- # (rows,) int, the pair each example row reads.
- index: np.ndarray
+class _Model(nn.Module):
+ def __init__(self, *, heads: int, kinds: int, config: NetworkConfig) -> None:
+ super().__init__()
+ self.kinds = kinds
+ k, h = config.projection_dim, config.trunk_dim
+ self.projection = nn.Linear(EMBEDDING_DIMENSIONS, k)
+ self.input_dropout = nn.Dropout(config.dropout)
+ self.trunk = nn.Linear(k + kinds * (2 * k + 1), h)
+ self.output_dropout = nn.Dropout(config.dropout)
+ self.heads = nn.Linear(h, heads)
+ for layer in (self.projection, self.trunk, self.heads):
+ nn.init.xavier_normal_(layer.weight)
+ nn.init.zeros_(layer.bias)
+
+ def forward(
+ self, report: torch.Tensor, project: torch.Tensor | None = None, has_history: torch.Tensor | None = None
+ ) -> torch.Tensor:
+ """(N, heads) logits from `report` (N, D), `project` (N, kinds, D) and `has_history` (N, kinds)."""
+ projected = self.projection(report * INPUT_SCALE)
+ parts = [projected]
+ if self.kinds:
+ if project is None or has_history is None:
+ raise ValueError("a network built with context needs project vectors")
+ projected_context = self.projection(project * INPUT_SCALE)
+ parts += [
+ projected_context.flatten(1),
+ (projected.unsqueeze(1) * projected_context).flatten(1),
+ has_history,
+ ]
+ trunk_input = torch.cat(parts, dim=1) if len(parts) > 1 else projected
+ trunk_out = F.relu(self.trunk(self.input_dropout(trunk_input)))
+ return self.heads(self.output_dropout(trunk_out))
-@frozen
-class NetworkInputs:
- # (rows, D) float32.
- reports: np.ndarray
- context: ProjectContext | None = None
+class _Probabilities(nn.Module):
+ """The exported graph: the sigmoid of every head's logit."""
- def __len__(self) -> int:
- return len(self.reports)
+ def __init__(self, model: _Model) -> None:
+ super().__init__()
+ self.model = model
+ def forward(self, *inputs: torch.Tensor) -> torch.Tensor:
+ return torch.sigmoid(self.model(*inputs))
-@frozen(frozen=False)
-class _Cache:
- """What the forward pass keeps for the backward pass of one batch."""
- reports: np.ndarray
- projected: np.ndarray
- context: np.ndarray | None
- projected_context: np.ndarray | None
- trunk_input: np.ndarray
- trunk_input_keep: np.ndarray | None
- trunk_pre: np.ndarray
- trunk_out: np.ndarray
- trunk_out_keep: np.ndarray | None
+def masked_binary_cross_entropy(logits: torch.Tensor, labels: torch.Tensor) -> torch.Tensor:
+ """The mean binary cross-entropy over the labels that are not NaN."""
+ observed = ~torch.isnan(labels)
+ # The NaN labels are replaced before the loss, not masked after it: 0 * NaN is NaN, also in the gradient.
+ losses = F.binary_cross_entropy_with_logits(logits, torch.where(observed, labels, 0.0), reduction="none")
+ return (losses * observed).sum() / observed.sum().clamp(min=1)
class MultiHeadNetwork:
- def __init__(self, *, heads: int, with_context: bool, kinds: int, config: NetworkConfig) -> None:
- self.heads = heads
+ def __init__(self, *, heads: Sequence[str], with_context: bool, kinds: int, config: NetworkConfig) -> None:
+ self.head_names = tuple(heads)
self.with_context = with_context
self.kinds = kinds if with_context else 0
self.config = config
- self._rng = np.random.default_rng(config.seed)
- k, h = config.projection_dim, config.trunk_dim
- trunk_in = k + self.kinds * (2 * k + 1)
- self.params: dict[str, np.ndarray] = {
- "projection_w": self._glorot(EMBEDDING_DIMENSIONS, k),
- "projection_b": np.zeros(k, dtype=np.float32),
- "trunk_w": self._glorot(trunk_in, h),
- "trunk_b": np.zeros(h, dtype=np.float32),
- "heads_w": self._glorot(h, heads),
- "heads_b": np.zeros(heads, dtype=np.float32),
- }
- self._first_moment = {name: np.zeros_like(value) for name, value in self.params.items()}
- self._second_moment = {name: np.zeros_like(value) for name, value in self.params.items()}
- self._steps = 0
-
- def _glorot(self, fan_in: int, fan_out: int) -> np.ndarray:
- scale = math.sqrt(2.0 / (fan_in + fan_out))
- return self._rng.normal(0.0, scale, size=(fan_in, fan_out)).astype(np.float32)
-
- def _dropout_mask(self, shape: tuple[int, ...]) -> np.ndarray | None:
- rate = self.config.dropout
- if rate <= 0:
- return None
- return (self._rng.random(shape) >= rate).astype(np.float32) / (1.0 - rate)
-
- def _forward(self, inputs: NetworkInputs, rows: np.ndarray, *, train: bool) -> tuple[np.ndarray, _Cache]:
- p = self.params
- reports = inputs.reports[rows] * INPUT_SCALE
- projected = reports @ p["projection_w"] + p["projection_b"]
- parts = [projected]
- context = projected_context = None
- if self.with_context:
- if inputs.context is None:
- raise ValueError("a network built with context needs project vectors")
- pairs = inputs.context.index[rows]
- context = inputs.context.vectors[pairs] * INPUT_SCALE
- projected_context = context @ p["projection_w"] + p["projection_b"]
- batch = len(rows)
- parts += [
- projected_context.reshape(batch, -1),
- (projected[:, None, :] * projected_context).reshape(batch, -1),
- inputs.context.has_history[pairs],
- ]
- trunk_input = np.concatenate(parts, axis=1) if len(parts) > 1 else projected
- trunk_input_keep = self._dropout_mask(trunk_input.shape) if train else None
- dropped_input = trunk_input * trunk_input_keep if trunk_input_keep is not None else trunk_input
- trunk_pre = dropped_input @ p["trunk_w"] + p["trunk_b"]
- trunk_out = np.maximum(trunk_pre, 0.0)
- trunk_out_keep = self._dropout_mask(trunk_out.shape) if train else None
- dropped_out = trunk_out * trunk_out_keep if trunk_out_keep is not None else trunk_out
- logits = dropped_out @ p["heads_w"] + p["heads_b"]
- cache = _Cache(
- reports=reports,
- projected=projected,
- context=context,
- projected_context=projected_context,
- trunk_input=dropped_input,
- trunk_input_keep=trunk_input_keep,
- trunk_pre=trunk_pre,
- trunk_out=dropped_out,
- trunk_out_keep=trunk_out_keep,
+ # Every random draw (initialization, shuffle, dropout) comes from this seeded state, and the
+ # global torch state stays as it was.
+ self._rng_state = torch.Generator().manual_seed(config.seed).get_state()
+ with self._seeded():
+ self.model = _Model(heads=len(self.head_names), kinds=self.kinds, config=config)
+ weights = [parameter for name, parameter in self.model.named_parameters() if name.endswith("weight")]
+ biases = [parameter for name, parameter in self.model.named_parameters() if name.endswith("bias")]
+ self._optimizer = torch.optim.AdamW(
+ [
+ {"params": weights, "weight_decay": config.weight_decay},
+ # Biases are not decayed: shrinking a head's bias pulls its base rate away from the label rate.
+ {"params": biases, "weight_decay": 0.0},
+ ],
+ lr=config.learning_rate,
)
- return logits, cache
-
- def loss_and_gradients(
- self, inputs: NetworkInputs, labels: np.ndarray, rows: np.ndarray, *, train: bool = True
- ) -> tuple[float, dict[str, np.ndarray]]:
- """The mean binary cross-entropy over the observed labels of `rows`, and its gradients.
-
- Weight decay is not part of the loss, because AdamW applies it to the weights directly."""
- logits, cache = self._forward(inputs, rows, train=train)
- targets = labels[rows]
- observed = ~np.isnan(targets)
- count = max(int(observed.sum()), 1)
- filled = np.where(observed, targets, 0.0)
- # log(1 + exp(-|x|)) + max(x, 0) - x * y is the cross-entropy without overflow.
- losses = np.logaddexp(0.0, -np.abs(logits)) + np.maximum(logits, 0.0) - logits * filled
- loss = float((losses * observed).sum() / count)
- d_logits = (_sigmoid(logits) - filled) * observed / count
- return loss, self._backward(cache, d_logits)
-
- def _backward(self, cache: _Cache, d_logits: np.ndarray) -> dict[str, np.ndarray]:
- p = self.params
- k = self.config.projection_dim
- grads: dict[str, np.ndarray] = {
- "heads_w": cache.trunk_out.T @ d_logits,
- "heads_b": d_logits.sum(axis=0),
- }
- d_out = d_logits @ p["heads_w"].T
- if cache.trunk_out_keep is not None:
- d_out *= cache.trunk_out_keep
- d_pre = d_out * (cache.trunk_pre > 0)
- grads["trunk_w"] = cache.trunk_input.T @ d_pre
- grads["trunk_b"] = d_pre.sum(axis=0)
- d_input = d_pre @ p["trunk_w"].T
- if cache.trunk_input_keep is not None:
- d_input *= cache.trunk_input_keep
-
- d_projected = d_input[:, :k]
- grads["projection_w"] = cache.reports.T @ d_projected
- grads["projection_b"] = d_projected.sum(axis=0)
- if cache.projected_context is not None and cache.context is not None:
- batch, kinds = len(d_input), self.kinds
- offset = k + kinds * k
- d_context = d_input[:, k:offset].reshape(batch, kinds, k)
- d_product = d_input[:, offset : offset + kinds * k].reshape(batch, kinds, k)
- d_context = d_context + d_product * cache.projected[:, None, :]
- d_projected_from_product = (d_product * cache.projected_context).sum(axis=1)
- grads["projection_w"] += cache.reports.T @ d_projected_from_product
- grads["projection_b"] += d_projected_from_product.sum(axis=0)
- flat_context = cache.context.reshape(batch * kinds, -1)
- flat_d_context = d_context.reshape(batch * kinds, k)
- grads["projection_w"] += flat_context.T @ flat_d_context
- grads["projection_b"] += flat_d_context.sum(axis=0)
- return grads
-
- def _step(self, grads: dict[str, np.ndarray]) -> None:
- config = self.config
- beta1, beta2, epsilon = 0.9, 0.999, 1e-8
- self._steps += 1
- for name, grad in grads.items():
- self._first_moment[name] = beta1 * self._first_moment[name] + (1 - beta1) * grad
- self._second_moment[name] = beta2 * self._second_moment[name] + (1 - beta2) * grad * grad
- first = self._first_moment[name] / (1 - beta1**self._steps)
- second = self._second_moment[name] / (1 - beta2**self._steps)
- update = first / (np.sqrt(second) + epsilon)
- # Biases are not decayed: shrinking a head's bias pulls its base rate away from the label rate.
- if name.endswith("_w"):
- update = update + config.weight_decay * self.params[name]
- self.params[name] = (self.params[name] - config.learning_rate * update).astype(np.float32)
def fit(self, inputs: NetworkInputs, labels: np.ndarray, rows: np.ndarray) -> list[float]:
"""Train on `rows` for the configured epochs; returns the mean loss per epoch."""
history: list[float] = []
- for _ in range(self.config.epochs):
- losses = []
- for batch in self._batches(rows, shuffle=True):
- loss, grads = self.loss_and_gradients(inputs, labels, batch)
- self._step(grads)
- losses.append(loss)
- history.append(float(np.mean(losses)) if losses else float("nan"))
+ self.model.train()
+ with self._seeded():
+ for _ in range(self.config.epochs):
+ losses = []
+ for batch in self._batches(rows, shuffle=True):
+ loss = masked_binary_cross_entropy(
+ self.model(*self._tensors(inputs, batch)), torch.from_numpy(labels[batch]).float()
+ )
+ self._optimizer.zero_grad()
+ loss.backward()
+ self._optimizer.step()
+ losses.append(loss.item())
+ history.append(float(np.mean(losses)) if losses else float("nan"))
return history
def predict(self, inputs: NetworkInputs, rows: np.ndarray) -> np.ndarray:
"""(len(rows), heads) probabilities, without dropout."""
if len(rows) == 0:
- return np.zeros((0, self.heads), dtype=np.float32)
- return np.concatenate(
- [_sigmoid(self._forward(inputs, batch, train=False)[0]) for batch in self._batches(rows, shuffle=False)]
+ return np.zeros((0, len(self.head_names)), dtype=np.float32)
+ self.model.eval()
+ with torch.no_grad():
+ return np.concatenate(
+ [
+ torch.sigmoid(self.model(*self._tensors(inputs, batch))).numpy()
+ for batch in self._batches(rows, shuffle=False)
+ ]
+ )
+
+ def _tensors(self, inputs: NetworkInputs, rows: np.ndarray) -> tuple[torch.Tensor, ...]:
+ report = torch.from_numpy(inputs.reports[rows]).float()
+ if not self.with_context:
+ return (report,)
+ if inputs.context is None:
+ raise ValueError("a network built with context needs project vectors")
+ pairs = inputs.context.index[rows]
+ return (
+ report,
+ torch.from_numpy(inputs.context.vectors[pairs]).float(),
+ torch.from_numpy(inputs.context.has_history[pairs]).float(),
)
def _batches(self, rows: np.ndarray, *, shuffle: bool) -> Iterator[np.ndarray]:
- order = self._rng.permutation(rows) if shuffle else rows
+ order = rows[torch.randperm(len(rows)).numpy()] if shuffle else rows
size = self.config.batch_size
for start in range(0, len(order), size):
yield order[start : start + size]
-
-def _sigmoid(values: np.ndarray) -> np.ndarray:
- return np.exp(-np.logaddexp(0.0, -values))
+ @contextmanager
+ def _seeded(self) -> Iterator[None]:
+ with torch.random.fork_rng(devices=[]):
+ torch.set_rng_state(self._rng_state)
+ yield
+ self._rng_state = torch.get_rng_state()
+
+
+def export_onnx(network: MultiHeadNetwork, path: Path) -> tuple[str, ...]:
+ """Write the network to `path` as an ONNX graph and return its head order.
+
+ The inputs are `report` (N, D) and, for a network with context, `project` (N, kinds, D) and
+ `has_history` (N, kinds), all float32. The one output is `probabilities` (N, heads), in the
+ returned head order. N is a dynamic axis.
+ """
+ module = _Probabilities(network.model).eval()
+ batch = 2
+ example: tuple[torch.Tensor, ...] = (torch.zeros(batch, EMBEDDING_DIMENSIONS),)
+ if network.with_context:
+ example += (torch.zeros(batch, network.kinds, EMBEDDING_DIMENSIONS), torch.zeros(batch, network.kinds))
+ input_names = list(ONNX_INPUTS[: len(example)])
+ # torch 2.9 defaults to the dynamo exporter, which needs onnxscript. The TorchScript exporter
+ # covers these layers without it.
+ torch.onnx.export(
+ module,
+ example,
+ str(path),
+ input_names=input_names,
+ output_names=[ONNX_OUTPUT],
+ dynamic_axes={name: {0: "batch"} for name in (*input_names, ONNX_OUTPUT)},
+ opset_version=ONNX_OPSET,
+ dynamo=False,
+ )
+ return network.head_names
diff --git a/products/signals/dags/inbox_ranking/multihead/prototype.py b/products/signals/dags/inbox_ranking/multihead/prototype.py
index c0d28b49ea99..e15733d1705a 100644
--- a/products/signals/dags/inbox_ranking/multihead/prototype.py
+++ b/products/signals/dags/inbox_ranking/multihead/prototype.py
@@ -40,12 +40,7 @@ from products.signals.dags.inbox_ranking.dataset.project_vectors import (
VECTOR_KINDS,
project_vectors,
)
-from products.signals.dags.inbox_ranking.multihead.network import (
- MultiHeadNetwork,
- NetworkConfig,
- NetworkInputs,
- ProjectContext,
-)
+from products.signals.dags.inbox_ranking.multihead.inputs import NetworkConfig, NetworkInputs, ProjectContext
from products.signals.dags.inbox_ranking.training.calibration import calibration_buckets, expected_calibration_error
from products.signals.dags.inbox_ranking.training.examples import Snapshot, cap_examples, example_moments, holdout_mask
from products.signals.dags.inbox_ranking.training.heads import HEADS_BY_NAME, Head
@@ -230,8 +225,12 @@ def network_scores(
name: str, table: ExampleTable, inputs: NetworkInputs, config: NetworkConfig
) -> tuple[list[HeadScore], list[float]]:
"""Fit one network on the shared train rows and grade each head on its own holdout."""
+ from products.signals.dags.inbox_ranking.multihead.network import ( # noqa: PLC0415 — keeps torch off the import path
+ MultiHeadNetwork,
+ )
+
network = MultiHeadNetwork(
- heads=len(PROTOTYPE_HEADS),
+ heads=[head.name for head in PROTOTYPE_HEADS],
with_context=inputs.context is not None,
kinds=len(VECTOR_KINDS),
config=config,
diff --git a/products/signals/dags/inbox_ranking/tests/test_multihead.py b/products/signals/dags/inbox_ranking/tests/test_multihead.py
index 76206ec6d2ec..3844d5352827 100644
--- a/products/signals/dags/inbox_ranking/tests/test_multihead.py
+++ b/products/signals/dags/inbox_ranking/tests/test_multihead.py
@@ -1,4 +1,3 @@
-import math
import datetime
import pytest
@@ -6,18 +5,12 @@ import pytest
import numpy as np
import pandas as pd
import pyarrow as pa
-from parameterized import parameterized
from products.signals.backend.ranking.features import EMBEDDING_DIMENSIONS
from products.signals.dags.inbox_ranking.dataset.dag import EMBEDDINGS_SCHEMA, LABELS_SCHEMA
from products.signals.dags.inbox_ranking.dataset.project_vectors import HISTORY_LIMIT, MIN_HISTORY_REPORTS, VECTOR_KINDS
+from products.signals.dags.inbox_ranking.multihead.inputs import NetworkConfig
from products.signals.dags.inbox_ranking.multihead.local import report_vectors
-from products.signals.dags.inbox_ranking.multihead.network import (
- MultiHeadNetwork,
- NetworkConfig,
- NetworkInputs,
- ProjectContext,
-)
from products.signals.dags.inbox_ranking.multihead.prototype import (
ABLATIONS,
CHAMPION_RECIPE,
@@ -127,47 +120,6 @@ class _SyntheticInbox:
)
[email protected]([("report_only", False), ("with_project_vectors", True)])
-def test_backward_pass_matches_the_numerical_gradient(_name: str, with_context: bool) -> None:
- rng = np.random.default_rng(0)
- rows, kinds = 6, 2
- network = MultiHeadNetwork(
- heads=3,
- with_context=with_context,
- kinds=kinds,
- config=NetworkConfig(projection_dim=3, trunk_dim=4, dropout=0.0),
- )
- network.params = {name: value.astype(np.float64) for name, value in network.params.items()}
- scale = 1 / math.sqrt(EMBEDDING_DIMENSIONS)
- context = (
- ProjectContext(
- vectors=rng.normal(0.0, scale, size=(2, kinds, EMBEDDING_DIMENSIONS)),
- has_history=np.array([[1.0, 0.0], [1.0, 1.0]]),
- index=np.array([0, 1, 0, 1, 0, 1]),
- )
- if with_context
- else None
- )
- inputs = NetworkInputs(reports=rng.normal(0.0, scale, size=(rows, EMBEDDING_DIMENSIONS)), context=context)
- labels = rng.integers(0, 2, size=(rows, 3)).astype(np.float64)
- labels[0, 1] = labels[3, 2] = np.nan
- every_row = np.arange(rows)
-
- _, gradients = network.loss_and_gradients(inputs, labels, every_row, train=False)
-
- epsilon = 1e-6
- for name, value in network.params.items():
- for flat in rng.choice(value.size, size=min(6, value.size), replace=False):
- position = np.unravel_index(flat, value.shape)
- original = value[position]
- value[position] = original + epsilon
- plus, _ = network.loss_and_gradients(inputs, labels, every_row, train=False)
- value[position] = original - epsilon
- minus, _ = network.loss_and_gradients(inputs, labels, every_row, train=False)
- value[position] = original
- assert gradients[name][position] == pytest.approx((plus - minus) / (2 * epsilon), rel=1e-4, abs=1e-8)
-
-
def test_example_table_keeps_each_champion_holdout_and_trains_the_network_on_none_of_them() -> None:
inbox = _SyntheticInbox()
snapshots = inbox.snapshots()
@@ -217,6 +169,7 @@ def test_project_context_reads_the_team_history_from_before_the_birth_day() -> N
def test_every_model_is_graded_on_the_champion_holdout_rows_and_each_head_reads_its_own_output() -> None:
+ pytest.importorskip("torch")
inbox = _SyntheticInbox()
embeddings = inbox.embeddings()
diff --git a/products/signals/dags/inbox_ranking/tests/test_multihead_network.py b/products/signals/dags/inbox_ranking/tests/test_multihead_network.py
new file mode 100644
index 000000000000..528c3812c6d2
--- /dev/null
+++ b/products/signals/dags/inbox_ranking/tests/test_multihead_network.py
@@ -0,0 +1,123 @@
+import sys
+import tempfile
+import subprocess
+from pathlib import Path
+
+import pytest
+
+import numpy as np
+from parameterized import parameterized
+
+from products.signals.backend.ranking.features import EMBEDDING_DIMENSIONS
+from products.signals.dags.inbox_ranking.dataset.project_vectors import VECTOR_KINDS
+from products.signals.dags.inbox_ranking.multihead.inputs import NetworkConfig, NetworkInputs, ProjectContext
+
+torch = pytest.importorskip("torch")
+onnxruntime = pytest.importorskip("onnxruntime")
+
+from products.signals.dags.inbox_ranking.multihead.network import ( # noqa: E402
+ MultiHeadNetwork,
+ export_onnx,
+ masked_binary_cross_entropy,
+)
+
+HEADS = ("open", "action", "fixed")
+KINDS = len(VECTOR_KINDS)
+CONFIG = NetworkConfig(projection_dim=8, trunk_dim=8, dropout=0.2, epochs=3, batch_size=16)
+
+# A clean interpreter: pytest has already imported half the world, so this process cannot tell
+# which import pulled torch in.
+_IMPORT_PATH_SNAPSHOT = """
+import os
+os.environ.setdefault("DJANGO_SETTINGS_MODULE", "posthog.settings")
+import django
+django.setup()
+import posthog.dags.locations.signals
+import products.signals.backend.temporal
+import products.signals.backend.ranking.scorer
+import products.signals.dags.inbox_ranking.multihead.local
+import sys
+print("torch" in sys.modules)
+"""
+
+
+def _inputs(rows: int, *, with_context: bool, seed: int = 0) -> NetworkInputs:
+ rng = np.random.default_rng(seed)
+ reports = rng.normal(0.0, 1 / np.sqrt(EMBEDDING_DIMENSIONS), size=(rows, EMBEDDING_DIMENSIONS)).astype(np.float32)
+ if not with_context:
+ return NetworkInputs(reports=reports)
+ context = ProjectContext(
+ vectors=rng.normal(0.0, 1 / np.sqrt(EMBEDDING_DIMENSIONS), size=(rows, KINDS, EMBEDDING_DIMENSIONS)).astype(
+ np.float32
+ ),
+ has_history=rng.integers(0, 2, size=(rows, KINDS)).astype(np.float32),
+ index=np.arange(rows),
+ )
+ return NetworkInputs(reports=reports, context=context)
+
+
+def test_a_nan_label_adds_no_gradient_and_no_loss() -> None:
+ logits = torch.tensor([[2.0, -1.0, 0.5], [-0.5, 3.0, 1.0]], requires_grad=True)
+ labels = torch.tensor([[1.0, float("nan"), 0.0], [0.0, float("nan"), float("nan")]])
+
+ loss = masked_binary_cross_entropy(logits, labels)
+ loss.backward()
+
+ expected = torch.nn.functional.binary_cross_entropy_with_logits(
+ torch.stack([logits[0, 0], logits[0, 2], logits[1, 0]]), torch.tensor([1.0, 0.0, 0.0])
+ )
+ assert loss.item() == pytest.approx(expected.item())
+ assert logits.grad is not None
+ assert not torch.isnan(logits.grad).any()
+ assert torch.equal(logits.grad[:, 1], torch.zeros(2))
+ assert logits.grad[1, 2].item() == 0.0
+
+
[email protected]([("report_only", False), ("with_project_vectors", True)])
+def test_a_seeded_fit_is_repeatable(_name: str, with_context: bool) -> None:
+ inputs = _inputs(64, with_context=with_context)
+ labels = np.random.default_rng(1).integers(0, 2, size=(64, len(HEADS))).astype(np.float32)
+ labels[::3, 2] = np.nan
+ rows = np.arange(64)
+
+ runs = []
+ for _ in range(2):
+ network = MultiHeadNetwork(heads=HEADS, with_context=with_context, kinds=KINDS, config=CONFIG)
+ losses = network.fit(inputs, labels, rows)
+ runs.append((losses, network.predict(inputs, rows)))
+
+ assert runs[0][0] == runs[1][0]
+ np.testing.assert_array_equal(runs[0][1], runs[1][1])
+
+
[email protected]([("report_only", False), ("with_project_vectors", True)])
+def test_onnx_export_matches_the_torch_network(_name: str, with_context: bool) -> None:
+ rows = 37
+ inputs = _inputs(rows, with_context=with_context, seed=2)
+ labels = np.random.default_rng(3).integers(0, 2, size=(rows, len(HEADS))).astype(np.float32)
+ network = MultiHeadNetwork(heads=HEADS, with_context=with_context, kinds=KINDS, config=CONFIG)
+ network.fit(inputs, labels, np.arange(rows))
+
+ with tempfile.TemporaryDirectory() as directory:
+ path = Path(directory) / "multihead.onnx"
+ head_order = export_onnx(network, path)
+ session = onnxruntime.InferenceSession(str(path), providers=["CPUExecutionProvider"])
+
+ feeds = {"report": inputs.reports}
+ if inputs.context is not None:
+ feeds |= {"project": inputs.context.vectors, "has_history": inputs.context.has_history}
+ assert [i.name for i in session.get_inputs()] == list(feeds)
+ assert [o.name for o in session.get_outputs()] == ["probabilities"]
+ (probabilities,) = session.run(None, feeds)
+ assert head_order == HEADS
+ np.testing.assert_allclose(probabilities, network.predict(inputs, np.arange(rows)), atol=1e-5)
+
+
+def test_torch_stays_off_the_django_temporal_and_dagster_import_paths() -> None:
+ result = subprocess.run([sys.executable, "-c", _IMPORT_PATH_SNAPSHOT], capture_output=True, text=True, timeout=180)
+
+ assert result.returncode == 0, f"import failed:\n{result.stderr[-2000:]}"
+ assert result.stdout.strip().splitlines()[-1] == "False", (
+ "torch comes from the inbox-ranking dependency group and is not in the main image. "
+ "Import multihead.network only from dev code, at call time."
+ )
diff --git a/pyproject.toml b/pyproject.toml
index 4c53a82a2879..92969e367a57 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -300,6 +300,13 @@ sentiment = [
"optimum[onnxruntime]~=1.25.0",
"torch~=2.9.0",
]
+# The inbox ranking multi-head network (products/signals/dags/inbox_ranking/multihead/). Dev only:
+# no image installs it. torch comes from the CPU wheel index, see [tool.uv.sources].
+inbox-ranking = [
+ "onnx~=1.21.0",
+ "onnxruntime~=1.24.1",
+ "torch~=2.9.0",
+]
hogql-parser-parity = [
"shrinkray==26.4.14.0",
]
@@ -317,6 +324,13 @@ exclude-newer-package = { hogql-parser = false, hogql-parser-rs = false, deltali
# dependency spec on every release, so this constraint is what stops a new major from
# landing by accident. Lift it in the migration PR that moves the call sites.
constraint-dependencies = ["posthoganalytics<8"]
+# sentiment takes torch from PyPI with the CUDA libraries, inbox-ranking takes the CPU-only build.
+conflicts = [[{ group = "sentiment" }, { group = "inbox-ranking" }]]
+
+[[tool.uv.index]]
+name = "pytorch-cpu"
+url = "https://download.pytorch.org/whl/cpu"
+explicit = true
[tool.uv.workspace]
members = ["tools/hogli", "packages/owners-yaml", "packages/personhog-proto"]
@@ -331,6 +345,7 @@ infi-clickhouse-orm = { git = "https://github.com/PostHog/infi.clickhouse_orm",
# To pull upstream fixes: rebase the fork's feat branch onto upstream, cut the next
# v0.11.0-posthog.N tag, and bump this pin.
pytest-split = { git = "https://github.com/PostHog/pytest-split", tag = "v0.11.0-posthog.8" }
+torch = [{ index = "pytorch-cpu", group = "inbox-ranking" }]
# xgboost's Linux wheel declares nvidia-nccl-cu12 (322 MB) for multi-GPU training. We use xgboost on
# CPU, so drop it to keep the wheel out of the image.
diff --git a/uv.lock b/uv.lock
index cfb872d2ec46..5a62bfe8edd8 100644
--- a/uv.lock
+++ b/uv.lock
@@ -2,13 +2,27 @@ version = 1
revision = 3
requires-python = "==3.14.7"
resolution-markers = [
- "platform_machine != 's390x' and platform_python_implementation != 'PyPy' and sys_platform != 'emscripten'",
- "platform_machine == 's390x' and platform_python_implementation != 'PyPy' and sys_platform != 'emscripten'",
- "platform_machine != 's390x' and platform_python_implementation == 'PyPy' and sys_platform != 'emscripten'",
- "platform_machine == 's390x' and platform_python_implementation == 'PyPy' and sys_platform != 'emscripten'",
- "platform_machine != 's390x' and sys_platform == 'emscripten'",
- "platform_machine == 's390x' and sys_platform == 'emscripten'",
-]
+ "platform_machine != 's390x' and platform_python_implementation != 'PyPy' and sys_platform != 'emscripten' and extra != 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment'",
+ "platform_machine == 's390x' and platform_python_implementation != 'PyPy' and sys_platform != 'emscripten' and extra != 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment'",
+ "platform_machine != 's390x' and platform_python_implementation == 'PyPy' and sys_platform != 'emscripten' and extra != 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment'",
+ "platform_machine == 's390x' and platform_python_implementation == 'PyPy' and sys_platform != 'emscripten' and extra != 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment'",
+ "platform_machine != 's390x' and sys_platform == 'emscripten' and extra != 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment'",
+ "platform_machine == 's390x' and sys_platform == 'emscripten' and extra != 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment'",
+ "platform_machine != 's390x' and platform_python_implementation != 'PyPy' and sys_platform != 'darwin' and sys_platform != 'emscripten' and extra == 'group-7-posthog-inbox-ranking' and extra != 'group-7-posthog-sentiment'",
+ "platform_machine != 's390x' and platform_python_implementation != 'PyPy' and sys_platform == 'darwin' and extra == 'group-7-posthog-inbox-ranking' and extra != 'group-7-posthog-sentiment'",
+ "platform_machine == 's390x' and platform_python_implementation != 'PyPy' and sys_platform != 'emscripten' and extra == 'group-7-posthog-inbox-ranking' and extra != 'group-7-posthog-sentiment'",
+ "platform_machine != 's390x' and platform_python_implementation == 'PyPy' and sys_platform != 'emscripten' and extra == 'group-7-posthog-inbox-ranking' and extra != 'group-7-posthog-sentiment'",
+ "platform_machine == 's390x' and platform_python_implementation == 'PyPy' and sys_platform != 'emscripten' and extra == 'group-7-posthog-inbox-ranking' and extra != 'group-7-posthog-sentiment'",
+ "platform_machine != 's390x' and sys_platform == 'emscripten' and extra == 'group-7-posthog-inbox-ranking' and extra != 'group-7-posthog-sentiment'",
+ "platform_machine == 's390x' and sys_platform == 'emscripten' and extra == 'group-7-posthog-inbox-ranking' and extra != 'group-7-posthog-sentiment'",
+ "platform_python_implementation != 'PyPy' and sys_platform != 'emscripten' and extra != 'group-7-posthog-inbox-ranking' and extra != 'group-7-posthog-sentiment'",
+ "platform_python_implementation == 'PyPy' and sys_platform != 'emscripten' and extra != 'group-7-posthog-inbox-ranking' and extra != 'group-7-posthog-sentiment'",
+ "sys_platform == 'emscripten' and extra != 'group-7-posthog-inbox-ranking' and extra != 'group-7-posthog-sentiment'",
+]
+conflicts = [[
+ { package = "posthog", group = "inbox-ranking" },
+ { package = "posthog", group = "sentiment" },
+]]
[options]
exclude-newer = "0001-01-01T00:00:00Z" # This has no effect and is included for backwards compatibility when using relative exclude-newer values.
@@ -801,10 +815,10 @@ name = "browser-cookie3"
version = "0.20.1"
source = { registry = "https://pypi.org/simple" }
dependencies = [
- { name = "jeepney", marker = "'bsd' in sys_platform or sys_platform == 'linux'" },
+ { name = "jeepney", marker = "'bsd' in sys_platform or sys_platform == 'linux' or (extra == 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment')" },
{ name = "lz4" },
{ name = "pycryptodomex" },
- { name = "shadowcopy", marker = "sys_platform == 'win32'" },
+ { name = "shadowcopy", marker = "sys_platform == 'win32' or (extra == 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment')" },
]
sdist = { url = "https://files.pythonhosted.org/packages/e0/e1/652adea0ce25948e613ef78294c8ceaf4b32844aae00680d3a1712dde444/browser_cookie3-0.20.1.tar.gz", hash = "sha256:6d8d0744bf42a5327c951bdbcf77741db3455b8b4e840e18bab266d598368a12", size = 22665, upload-time = "2024-12-20T00:31:30.144Z" }
wheels = [
@@ -894,7 +908,7 @@ name = "cffi"
version = "2.0.0"
source = { registry = "https://pypi.org/simple" }
dependencies = [
- { name = "pycparser", marker = "implementation_name != 'PyPy'" },
+ { name = "pycparser", marker = "implementation_name != 'PyPy' or (extra == 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment')" },
]
sdist = { url = "https://files.pythonhosted.org/packages/eb/56/b1ba7935a17738ae8453301356628e8147c79dbb825bcbc73dc7401f9846/cffi-2.0.0.tar.gz", hash = "sha256:44d1b5909021139fe36001ae048dbdde8214afa20200eda0f64c068cac5d5529", size = 523588, upload-time = "2025-09-08T23:24:04.541Z" }
wheels = [
@@ -1002,7 +1016,7 @@ name = "click"
version = "8.1.8"
source = { registry = "https://pypi.org/simple" }
dependencies = [
- { name = "colorama", marker = "sys_platform == 'win32'" },
+ { name = "colorama", marker = "sys_platform == 'win32' or (extra == 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment')" },
]
sdist = { url = "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz", hash = "sha256:ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a", size = 226593, upload-time = "2024-12-21T18:38:44.339Z" }
wheels = [
@@ -1299,7 +1313,7 @@ name = "cryptography"
version = "46.0.7"
source = { registry = "https://pypi.org/simple" }
dependencies = [
- { name = "cffi", marker = "platform_python_implementation != 'PyPy'" },
+ { name = "cffi", marker = "platform_python_implementation != 'PyPy' or (extra == 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment')" },
]
sdist = { url = "https://files.pythonhosted.org/packages/47/93/ac8f3d5ff04d54bc814e961a43ae5b0b146154c89c61b47bb07557679b18/cryptography-46.0.7.tar.gz", hash = "sha256:e4cfd68c5f3e0bfdad0d38e023239b96a2fe84146481852dffbcca442c245aa5", size = 750652, upload-time = "2026-04-08T01:57:54.692Z" }
wheels = [
@@ -1392,10 +1406,10 @@ dependencies = [
{ name = "grpcio-health-checking" },
{ name = "jinja2" },
{ name = "protobuf" },
- { name = "psutil", marker = "sys_platform == 'win32'" },
+ { name = "psutil", marker = "sys_platform == 'win32' or (extra == 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment')" },
{ name = "python-dotenv" },
{ name = "pytz" },
- { name = "pywin32", marker = "sys_platform == 'win32'" },
+ { name = "pywin32", marker = "sys_platform == 'win32' or (extra == 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment')" },
{ name = "requests" },
{ name = "rich" },
{ name = "setuptools" },
@@ -1720,7 +1734,7 @@ source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "aiohttp" },
{ name = "dill" },
- { name = "fsspec", extra = ["http"] },
+ { name = "fsspec", extra = ["http"], marker = "extra == 'group-7-posthog-sentiment'" },
{ name = "huggingface-hub" },
{ name = "multiprocess" },
{ name = "numpy" },
@@ -1885,7 +1899,7 @@ source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "asgiref" },
{ name = "sqlparse" },
- { name = "tzdata", marker = "sys_platform == 'win32'" },
+ { name = "tzdata", marker = "sys_platform == 'win32' or (extra == 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment')" },
]
sdist = { url = "https://files.pythonhosted.org/packages/85/fe/79e692b430c7721bf4b812c328bfe687e73e3f28f56611a6a18a97e887cc/django-5.2.18.tar.gz", hash = "sha256:461c5dd06d2ea16bd5ca37d3f46e4def1d6b0fe7588c6f4e2119517bb0af8b2d", size = 10910238, upload-time = "2026-10-06T13:01:09.371Z" }
wheels = [
@@ -2217,7 +2231,7 @@ dependencies = [
{ name = "pendulum" },
{ name = "pluggy" },
{ name = "pytz" },
- { name = "pywin32", marker = "sys_platform == 'win32'" },
+ { name = "pywin32", marker = "sys_platform == 'win32' or (extra == 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment')" },
{ name = "pyyaml" },
{ name = "requests" },
{ name = "requirements-parser" },
@@ -2250,7 +2264,7 @@ name = "docker"
version = "7.1.0"
source = { registry = "https://pypi.org/simple" }
dependencies = [
- { name = "pywin32", marker = "sys_platform == 'win32'" },
+ { name = "pywin32", marker = "sys_platform == 'win32' or (extra == 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment')" },
{ name = "requests" },
{ name = "urllib3" },
]
@@ -2961,7 +2975,7 @@ reload = [
{ name = "watchfiles" },
]
uvloop = [
- { name = "uvloop", marker = "platform_python_implementation == 'CPython' and sys_platform != 'win32'" },
+ { name = "uvloop", marker = "(platform_python_implementation == 'CPython' and sys_platform != 'win32') or (platform_python_implementation != 'CPython' and extra == 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment') or (sys_platform == 'win32' and extra == 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment')" },
]
[[package]]
@@ -3375,7 +3389,7 @@ name = "humanfriendly"
version = "10.0"
source = { registry = "https://pypi.org/simple" }
dependencies = [
- { name = "pyreadline3", marker = "sys_platform == 'win32'" },
+ { name = "pyreadline3", marker = "sys_platform == 'win32' or (extra == 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment')" },
]
sdist = { url = "https://files.pythonhosted.org/packages/cc/3f/2c29224acb2e2df4d2046e4c73ee2662023c58ff5b113c4c1adac0886c43/humanfriendly-10.0.tar.gz", hash = "sha256:6b0b831ce8f15f7300721aa49829fc4e83921a9a301cc7f606be6686a2288ddc", size = 360702, upload-time = "2021-09-17T21:40:43.31Z" }
wheels = [
@@ -3500,12 +3514,12 @@ name = "ipython"
version = "9.3.0"
source = { registry = "https://pypi.org/simple" }
dependencies = [
- { name = "colorama", marker = "sys_platform == 'win32'" },
+ { name = "colorama", marker = "sys_platform == 'win32' or (extra == 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment')" },
{ name = "decorator" },
{ name = "ipython-pygments-lexers" },
{ name = "jedi" },
{ name = "matplotlib-inline" },
- { name = "pexpect", marker = "sys_platform != 'emscripten' and sys_platform != 'win32'" },
+ { name = "pexpect", marker = "(sys_platform != 'emscripten' and sys_platform != 'win32') or (sys_platform == 'emscripten' and extra == 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment') or (sys_platform == 'win32' and extra == 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment')" },
{ name = "prompt-toolkit" },
{ name = "pygments" },
{ name = "stack-data" },
@@ -3981,7 +3995,7 @@ version = "0.4.10"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "httpx" },
- { name = "orjson", marker = "platform_python_implementation != 'PyPy'" },
+ { name = "orjson", marker = "platform_python_implementation != 'PyPy' or (extra == 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment')" },
{ name = "packaging" },
{ name = "pydantic" },
{ name = "requests" },
@@ -4418,12 +4432,12 @@ dependencies = [
{ name = "pydantic-settings" },
{ name = "pyjwt", extra = ["crypto"] },
{ name = "python-multipart" },
- { name = "pywin32", marker = "sys_platform == 'win32'" },
+ { name = "pywin32", marker = "sys_platform == 'win32' or (extra == 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment')" },
{ name = "sse-starlette" },
{ name = "starlette" },
{ name = "typing-extensions" },
{ name = "typing-inspection" },
- { name = "uvicorn", marker = "sys_platform != 'emscripten'" },
+ { name = "uvicorn", marker = "sys_platform != 'emscripten' or (extra == 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment')" },
]
sdist = { url = "https://files.pythonhosted.org/packages/fc/6d/62e76bbb8144d6ed86e202b5edd8a4cb631e7c8130f3f4893c3f90262b10/mcp-1.26.0.tar.gz", hash = "sha256:db6e2ef491eecc1a0d93711a76f28dec2e05999f93afd48795da1c1137142c66", size = 608005, upload-time = "2026-01-24T19:40:32.468Z" }
wheels = [
@@ -4619,7 +4633,7 @@ version = "2.1.0"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "ast-serialize" },
- { name = "librt", marker = "platform_python_implementation != 'PyPy'" },
+ { name = "librt", marker = "platform_python_implementation != 'PyPy' or (extra == 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment')" },
{ name = "mypy-extensions" },
{ name = "pathspec" },
{ name = "typing-extensions" },
@@ -4800,7 +4814,9 @@ name = "nvidia-cublas-cu12"
version = "12.8.4.1"
source = { registry = "https://pypi.org/simple" }
wheels = [
+ { url = "https://files.pythonhosted.org/packages/29/99/db44d685f0e257ff0e213ade1964fc459b4a690a73293220e98feb3307cf/nvidia_cublas_cu12-12.8.4.1-py3-none-manylinux_2_27_aarch64.whl", hash = "sha256:b86f6dd8935884615a0683b663891d43781b819ac4f2ba2b0c9604676af346d0", size = 590537124, upload-time = "2025-03-07T01:43:53.556Z" },
{ url = "https://files.pythonhosted.org/packages/dc/61/e24b560ab2e2eaeb3c839129175fb330dfcfc29e5203196e5541a4c44682/nvidia_cublas_cu12-12.8.4.1-py3-none-manylinux_2_27_x86_64.whl", hash = "sha256:8ac4e771d5a348c551b2a426eda6193c19aa630236b418086020df5ba9667142", size = 594346921, upload-time = "2025-03-07T01:44:31.254Z" },
+ { url = "https://files.pythonhosted.org/packages/70/61/7d7b3c70186fb651d0fbd35b01dbfc8e755f69fd58f817f3d0f642df20c3/nvidia_cublas_cu12-12.8.4.1-py3-none-win_amd64.whl", hash = "sha256:47e9b82132fa8d2b4944e708049229601448aaad7e6f296f630f2d1a32de35af", size = 567544208, upload-time = "2025-03-07T01:53:30.535Z" },
]
[[package]]
@@ -4808,7 +4824,9 @@ name = "nvidia-cuda-cupti-cu12"
version = "12.8.90"
source = { registry = "https://pypi.org/simple" }
wheels = [
+ { url = "https://files.pythonhosted.org/packages/d5/1f/b3bd73445e5cb342727fd24fe1f7b748f690b460acadc27ea22f904502c8/nvidia_cuda_cupti_cu12-12.8.90-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:4412396548808ddfed3f17a467b104ba7751e6b58678a4b840675c56d21cf7ed", size = 9533318, upload-time = "2025-03-07T01:40:10.421Z" },
{ url = "https://files.pythonhosted.org/packages/f8/02/2adcaa145158bf1a8295d83591d22e4103dbfd821bcaf6f3f53151ca4ffa/nvidia_cuda_cupti_cu12-12.8.90-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:ea0cb07ebda26bb9b29ba82cda34849e73c166c18162d3913575b0c9db9a6182", size = 10248621, upload-time = "2025-03-07T01:40:21.213Z" },
+ { url = "https://files.pythonhosted.org/packages/41/bc/83f5426095d93694ae39fe1311431b5d5a9bb82e48bf0dd8e19be2765942/nvidia_cuda_cupti_cu12-12.8.90-py3-none-win_amd64.whl", hash = "sha256:bb479dcdf7e6d4f8b0b01b115260399bf34154a1a2e9fe11c85c517d87efd98e", size = 7015759, upload-time = "2025-03-07T01:51:11.355Z" },
]
[[package]]
@@ -4817,6 +4835,8 @@ version = "12.8.93"
source = { registry = "https://pypi.org/simple" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/05/6b/32f747947df2da6994e999492ab306a903659555dddc0fbdeb9d71f75e52/nvidia_cuda_nvrtc_cu12-12.8.93-py3-none-manylinux2010_x86_64.manylinux_2_12_x86_64.whl", hash = "sha256:a7756528852ef889772a84c6cd89d41dfa74667e24cca16bb31f8f061e3e9994", size = 88040029, upload-time = "2025-03-07T01:42:13.562Z" },
+ { url = "https://files.pythonhosted.org/packages/eb/d1/e50d0acaab360482034b84b6e27ee83c6738f7d32182b987f9c7a4e32962/nvidia_cuda_nvrtc_cu12-12.8.93-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:fc1fec1e1637854b4c0a65fb9a8346b51dd9ee69e61ebaccc82058441f15bce8", size = 43106076, upload-time = "2025-03-07T01:41:59.817Z" },
+ { url = "https://files.pythonhosted.org/packages/45/51/52a3d84baa2136cc8df15500ad731d74d3a1114d4c123e043cb608d4a32b/nvidia_cuda_nvrtc_cu12-12.8.93-py3-none-win_amd64.whl", hash = "sha256:7a4b6b2904850fe78e0bd179c4b655c404d4bb799ef03ddc60804247099ae909", size = 73586838, upload-time = "2025-03-07T01:52:13.483Z" },
]
[[package]]
@@ -4824,7 +4844,9 @@ name = "nvidia-cuda-runtime-cu12"
version = "12.8.90"
source = { registry = "https://pypi.org/simple" }
wheels = [
+ { url = "https://files.pythonhosted.org/packages/7c/75/f865a3b236e4647605ea34cc450900854ba123834a5f1598e160b9530c3a/nvidia_cuda_runtime_cu12-12.8.90-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:52bf7bbee900262ffefe5e9d5a2a69a30d97e2bc5bb6cc866688caa976966e3d", size = 965265, upload-time = "2025-03-07T01:39:43.533Z" },
{ url = "https://files.pythonhosted.org/packages/0d/9b/a997b638fcd068ad6e4d53b8551a7d30fe8b404d6f1804abf1df69838932/nvidia_cuda_runtime_cu12-12.8.90-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:adade8dcbd0edf427b7204d480d6066d33902cab2a4707dcfc48a2d0fd44ab90", size = 954765, upload-time = "2025-03-07T01:40:01.615Z" },
+ { url = "https://files.pythonhosted.org/packages/30/a5/a515b7600ad361ea14bfa13fb4d6687abf500adc270f19e89849c0590492/nvidia_cuda_runtime_cu12-12.8.90-py3-none-win_amd64.whl", hash = "sha256:c0c6027f01505bfed6c3b21ec546f69c687689aad5f1a377554bc6ca4aa993a8", size = 944318, upload-time = "2025-03-07T01:51:01.794Z" },
]
[[package]]
@@ -4832,10 +4854,12 @@ name = "nvidia-cudnn-cu12"
version = "9.10.2.21"
source = { registry = "https://pypi.org/simple" }
dependencies = [
- { name = "nvidia-cublas-cu12" },
+ { name = "nvidia-cublas-cu12", marker = "sys_platform != 'emscripten'" },
]
wheels = [
+ { url = "https://files.pythonhosted.org/packages/fa/41/e79269ce215c857c935fd86bcfe91a451a584dfc27f1e068f568b9ad1ab7/nvidia_cudnn_cu12-9.10.2.21-py3-none-manylinux_2_27_aarch64.whl", hash = "sha256:c9132cc3f8958447b4910a1720036d9eff5928cc3179b0a51fb6d167c6cc87d8", size = 705026878, upload-time = "2025-06-06T21:52:51.348Z" },
{ url = "https://files.pythonhosted.org/packages/ba/51/e123d997aa098c61d029f76663dedbfb9bc8dcf8c60cbd6adbe42f76d049/nvidia_cudnn_cu12-9.10.2.21-py3-none-manylinux_2_27_x86_64.whl", hash = "sha256:949452be657fa16687d0930933f032835951ef0892b37d2d53824d1a84dc97a8", size = 706758467, upload-time = "2025-06-06T21:54:08.597Z" },
+ { url = "https://files.pythonhosted.org/packages/3d/90/0bd6e586701b3a890fd38aa71c387dab4883d619d6e5ad912ccbd05bfd67/nvidia_cudnn_cu12-9.10.2.21-py3-none-win_amd64.whl", hash = "sha256:c6288de7d63e6cf62988f0923f96dc339cea362decb1bf5b3141883392a7d65e", size = 692992268, upload-time = "2025-06-06T21:55:18.114Z" },
]
[[package]]
@@ -4843,10 +4867,12 @@ name = "nvidia-cufft-cu12"
version = "11.3.3.83"
source = { registry = "https://pypi.org/simple" }
dependencies = [
- { name = "nvidia-nvjitlink-cu12" },
+ { name = "nvidia-nvjitlink-cu12", marker = "sys_platform != 'emscripten'" },
]
wheels = [
+ { url = "https://files.pythonhosted.org/packages/60/bc/7771846d3a0272026c416fbb7e5f4c1f146d6d80704534d0b187dd6f4800/nvidia_cufft_cu12-11.3.3.83-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:848ef7224d6305cdb2a4df928759dca7b1201874787083b6e7550dd6765ce69a", size = 193109211, upload-time = "2025-03-07T01:44:56.873Z" },
{ url = "https://files.pythonhosted.org/packages/1f/13/ee4e00f30e676b66ae65b4f08cb5bcbb8392c03f54f2d5413ea99a5d1c80/nvidia_cufft_cu12-11.3.3.83-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:4d2dd21ec0b88cf61b62e6b43564355e5222e4a3fb394cac0db101f2dd0d4f74", size = 193118695, upload-time = "2025-03-07T01:45:27.821Z" },
+ { url = "https://files.pythonhosted.org/packages/7d/ec/ce1629f1e478bb5ccd208986b5f9e0316a78538dd6ab1d0484f012f8e2a1/nvidia_cufft_cu12-11.3.3.83-py3-none-win_amd64.whl", hash = "sha256:7a64a98ef2a7c47f905aaf8931b69a3a43f27c55530c698bb2ed7c75c0b42cb7", size = 192216559, upload-time = "2025-03-07T01:53:57.106Z" },
]
[[package]]
@@ -4855,6 +4881,7 @@ version = "1.13.1.3"
source = { registry = "https://pypi.org/simple" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/bb/fe/1bcba1dfbfb8d01be8d93f07bfc502c93fa23afa6fd5ab3fc7c1df71038a/nvidia_cufile_cu12-1.13.1.3-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:1d069003be650e131b21c932ec3d8969c1715379251f8d23a1860554b1cb24fc", size = 1197834, upload-time = "2025-03-07T01:45:50.723Z" },
+ { url = "https://files.pythonhosted.org/packages/1e/f5/5607710447a6fe9fd9b3283956fceeee8a06cda1d2f56ce31371f595db2a/nvidia_cufile_cu12-1.13.1.3-py3-none-manylinux_2_27_aarch64.whl", hash = "sha256:4beb6d4cce47c1a0f1013d72e02b0994730359e17801d395bdcbf20cfb3bb00a", size = 1120705, upload-time = "2025-03-07T01:45:41.434Z" },
]
[[package]]
@@ -4862,7 +4889,9 @@ name = "nvidia-curand-cu12"
version = "10.3.9.90"
source = { registry = "https://pypi.org/simple" }
wheels = [
+ { url = "https://files.pythonhosted.org/packages/45/5e/92aa15eca622a388b80fbf8375d4760738df6285b1e92c43d37390a33a9a/nvidia_curand_cu12-10.3.9.90-py3-none-manylinux_2_27_aarch64.whl", hash = "sha256:dfab99248034673b779bc6decafdc3404a8a6f502462201f2f31f11354204acd", size = 63625754, upload-time = "2025-03-07T01:46:10.735Z" },
{ url = "https://files.pythonhosted.org/packages/fb/aa/6584b56dc84ebe9cf93226a5cde4d99080c8e90ab40f0c27bda7a0f29aa1/nvidia_curand_cu12-10.3.9.90-py3-none-manylinux_2_27_x86_64.whl", hash = "sha256:b32331d4f4df5d6eefa0554c565b626c7216f87a06a4f56fab27c3b68a830ec9", size = 63619976, upload-time = "2025-03-07T01:46:23.323Z" },
+ { url = "https://files.pythonhosted.org/packages/b9/75/70c05b2f3ed5be3bb30b7102b6eb78e100da4bbf6944fd6725c012831cab/nvidia_curand_cu12-10.3.9.90-py3-none-win_amd64.whl", hash = "sha256:f149a8ca457277da854f89cf282d6ef43176861926c7ac85b2a0fbd237c587ec", size = 62765309, upload-time = "2025-03-07T01:54:20.478Z" },
]
[[package]]
@@ -4870,12 +4899,14 @@ name = "nvidia-cusolver-cu12"
version = "11.7.3.90"
source = { registry = "https://pypi.org/simple" }
dependencies = [
- { name = "nvidia-cublas-cu12" },
- { name = "nvidia-cusparse-cu12" },
- { name = "nvidia-nvjitlink-cu12" },
+ { name = "nvidia-cublas-cu12", marker = "sys_platform != 'emscripten'" },
+ { name = "nvidia-cusparse-cu12", marker = "sys_platform != 'emscripten'" },
+ { name = "nvidia-nvjitlink-cu12", marker = "sys_platform != 'emscripten'" },
]
wheels = [
+ { url = "https://files.pythonhosted.org/packages/c8/32/f7cd6ce8a7690544d084ea21c26e910a97e077c9b7f07bf5de623ee19981/nvidia_cusolver_cu12-11.7.3.90-py3-none-manylinux_2_27_aarch64.whl", hash = "sha256:db9ed69dbef9715071232caa9b69c52ac7de3a95773c2db65bdba85916e4e5c0", size = 267229841, upload-time = "2025-03-07T01:46:54.356Z" },
{ url = "https://files.pythonhosted.org/packages/85/48/9a13d2975803e8cf2777d5ed57b87a0b6ca2cc795f9a4f59796a910bfb80/nvidia_cusolver_cu12-11.7.3.90-py3-none-manylinux_2_27_x86_64.whl", hash = "sha256:4376c11ad263152bd50ea295c05370360776f8c3427b30991df774f9fb26c450", size = 267506905, upload-time = "2025-03-07T01:47:16.273Z" },
+ { url = "https://files.pythonhosted.org/packages/13/c0/76ca8551b8a84146ffa189fec81c26d04adba4bc0dbe09cd6e6fd9b7de04/nvidia_cusolver_cu12-11.7.3.90-py3-none-win_amd64.whl", hash = "sha256:4a550db115fcabc4d495eb7d39ac8b58d4ab5d8e63274d3754df1c0ad6a22d34", size = 256720438, upload-time = "2025-03-07T01:54:39.898Z" },
]
[[package]]
@@ -4883,10 +4914,12 @@ name = "nvidia-cusparse-cu12"
version = "12.5.8.93"
source = { registry = "https://pypi.org/simple" }
dependencies = [
- { name = "nvidia-nvjitlink-cu12" },
+ { name = "nvidia-nvjitlink-cu12", marker = "sys_platform != 'emscripten'" },
]
wheels = [
+ { url = "https://files.pythonhosted.org/packages/bc/f7/cd777c4109681367721b00a106f491e0d0d15cfa1fd59672ce580ce42a97/nvidia_cusparse_cu12-12.5.8.93-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:9b6c161cb130be1a07a27ea6923df8141f3c295852f4b260c65f18f3e0a091dc", size = 288117129, upload-time = "2025-03-07T01:47:40.407Z" },
{ url = "https://files.pythonhosted.org/packages/c2/f5/e1854cb2f2bcd4280c44736c93550cc300ff4b8c95ebe370d0aa7d2b473d/nvidia_cusparse_cu12-12.5.8.93-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:1ec05d76bbbd8b61b06a80e1eaf8cf4959c3d4ce8e711b65ebd0443bb0ebb13b", size = 288216466, upload-time = "2025-03-07T01:48:13.779Z" },
+ { url = "https://files.pythonhosted.org/packages/62/07/f3b2ad63f8e3d257a599f422ae34eb565e70c41031aecefa3d18b62cabd1/nvidia_cusparse_cu12-12.5.8.93-py3-none-win_amd64.whl", hash = "sha256:9a33604331cb2cac199f2e7f5104dfbb8a5a898c367a53dfda9ff2acb6b6b4dd", size = 284937404, upload-time = "2025-03-07T01:55:07.742Z" },
]
[[package]]
@@ -4894,7 +4927,9 @@ name = "nvidia-cusparselt-cu12"
version = "0.7.1"
source = { registry = "https://pypi.org/simple" }
wheels = [
+ { url = "https://files.pythonhosted.org/packages/73/b9/598f6ff36faaece4b3c50d26f50e38661499ff34346f00e057760b35cc9d/nvidia_cusparselt_cu12-0.7.1-py3-none-manylinux2014_aarch64.whl", hash = "sha256:8878dce784d0fac90131b6817b607e803c36e629ba34dc5b433471382196b6a5", size = 283835557, upload-time = "2025-02-26T00:16:54.265Z" },
{ url = "https://files.pythonhosted.org/packages/56/79/12978b96bd44274fe38b5dde5cfb660b1d114f70a65ef962bcbbed99b549/nvidia_cusparselt_cu12-0.7.1-py3-none-manylinux2014_x86_64.whl", hash = "sha256:f1bb701d6b930d5a7cea44c19ceb973311500847f81b634d802b7b539dc55623", size = 287193691, upload-time = "2025-02-26T00:15:44.104Z" },
+ { url = "https://files.pythonhosted.org/packages/2f/d8/a6b0d0d0c2435e9310f3e2bb0d9c9dd4c33daef86aa5f30b3681defd37ea/nvidia_cusparselt_cu12-0.7.1-py3-none-win_amd64.whl", hash = "sha256:f67fbb5831940ec829c9117b7f33807db9f9678dc2a617fbe781cac17b4e1075", size = 271020911, upload-time = "2025-02-26T00:14:47.204Z" },
]
[[package]]
@@ -4902,6 +4937,7 @@ name = "nvidia-nccl-cu12"
version = "2.27.5"
source = { registry = "https://pypi.org/simple" }
wheels = [
+ { url = "https://files.pythonhosted.org/packages/bb/1c/857979db0ef194ca5e21478a0612bcdbbe59458d7694361882279947b349/nvidia_nccl_cu12-2.27.5-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:31432ad4d1fb1004eb0c56203dc9bc2178a1ba69d1d9e02d64a6938ab5e40e7a", size = 322400625, upload-time = "2025-06-26T04:11:04.496Z" },
{ url = "https://files.pythonhosted.org/packages/6e/89/f7a07dc961b60645dbbf42e80f2bc85ade7feb9a491b11a1e973aa00071f/nvidia_nccl_cu12-2.27.5-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:ad730cf15cb5d25fe849c6e6ca9eb5b76db16a80f13f425ac68d8e2e55624457", size = 322348229, upload-time = "2025-06-26T04:11:28.385Z" },
]
@@ -4911,6 +4947,8 @@ version = "12.8.93"
source = { registry = "https://pypi.org/simple" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/f6/74/86a07f1d0f42998ca31312f998bd3b9a7eff7f52378f4f270c8679c77fb9/nvidia_nvjitlink_cu12-12.8.93-py3-none-manylinux2010_x86_64.manylinux_2_12_x86_64.whl", hash = "sha256:81ff63371a7ebd6e6451970684f916be2eab07321b73c9d244dc2b4da7f73b88", size = 39254836, upload-time = "2025-03-07T01:49:55.661Z" },
+ { url = "https://files.pythonhosted.org/packages/2a/a2/8cee5da30d13430e87bf99bb33455d2724d0a4a9cb5d7926d80ccb96d008/nvidia_nvjitlink_cu12-12.8.93-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:adccd7161ace7261e01bb91e44e88da350895c270d23f744f0820c818b7229e7", size = 38386204, upload-time = "2025-03-07T01:49:43.612Z" },
+ { url = "https://files.pythonhosted.org/packages/ed/d7/34f02dad2e30c31b10a51f6b04e025e5dd60e5f936af9045a9b858a05383/nvidia_nvjitlink_cu12-12.8.93-py3-none-win_amd64.whl", hash = "sha256:bd93fbeeee850917903583587f4fc3a4eafa022e34572251368238ab5e6bd67f", size = 268553710, upload-time = "2025-03-07T01:56:24.13Z" },
]
[[package]]
@@ -4918,6 +4956,7 @@ name = "nvidia-nvshmem-cu12"
version = "3.3.20"
source = { registry = "https://pypi.org/simple" }
wheels = [
+ { url = "https://files.pythonhosted.org/packages/92/9d/3dd98852568fb845ec1f7902c90a22b240fe1cbabda411ccedf2fd737b7b/nvidia_nvshmem_cu12-3.3.20-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:0b0b960da3842212758e4fa4696b94f129090b30e5122fea3c5345916545cff0", size = 124484616, upload-time = "2025-08-04T20:24:59.172Z" },
{ url = "https://files.pythonhosted.org/packages/3b/6c/99acb2f9eb85c29fc6f3a7ac4dccfd992e22666dd08a642b303311326a97/nvidia_nvshmem_cu12-3.3.20-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:d00f26d3f9b2e3c3065be895e3059d6479ea5c638a3f38c9fec49b1b9dd7c1e5", size = 124657145, upload-time = "2025-08-04T20:25:19.995Z" },
]
@@ -4926,7 +4965,9 @@ name = "nvidia-nvtx-cu12"
version = "12.8.90"
source = { registry = "https://pypi.org/simple" }
wheels = [
+ { url = "https://files.pythonhosted.org/packages/10/c0/1b303feea90d296f6176f32a2a70b5ef230f9bdeb3a72bddb0dc922dc137/nvidia_nvtx_cu12-12.8.90-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:d7ad891da111ebafbf7e015d34879f7112832fc239ff0d7d776b6cb685274615", size = 91161, upload-time = "2025-03-07T01:42:23.922Z" },
{ url = "https://files.pythonhosted.org/packages/a2/eb/86626c1bbc2edb86323022371c39aa48df6fd8b0a1647bc274577f72e90b/nvidia_nvtx_cu12-12.8.90-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:5b17e2001cc0d751a5bc2c6ec6d26ad95913324a4adb86788c944f8ce9ba441f", size = 89954, upload-time = "2025-03-07T01:42:44.131Z" },
+ { url = "https://files.pythonhosted.org/packages/9f/99/4c9c0c329bf9fc125008c3b54c7c94c0023518d06fc025ae36431375e1fe/nvidia_nvtx_cu12-12.8.90-py3-none-win_amd64.whl", hash = "sha256:619c8304aedc69f02ea82dd244541a83c3d9d40993381b3b590f1adaed3db41e", size = 56492, upload-time = "2025-03-07T01:52:24.69Z" },
]
[[package]]
@@ -5340,7 +5381,7 @@ dependencies = [
{ name = "huggingface-hub" },
{ name = "numpy" },
{ name = "packaging" },
- { name = "torch" },
+ { name = "torch", version = "2.9.1", source = { registry = "https://pypi.org/simple" } },
{ name = "transformers" },
]
sdist = { url = "https://files.pythonhosted.org/packages/51/bd/cc1cb4e6d8cc2886f81775c798ffd2a9d1807474facedaa736e2e4a02912/optimum-1.25.3.tar.gz", hash = "sha256:1482d5f730bd5fb745e07915bae520ad9c4eaf02100811c287a74c117dbe3c6e", size = 345294, upload-time = "2025-05-16T14:22:43.108Z" }
@@ -5591,7 +5632,7 @@ name = "pexpect"
version = "4.9.0"
source = { registry = "https://pypi.org/simple" }
dependencies = [
- { name = "ptyprocess" },
+ { name = "ptyprocess", marker = "sys_platform != 'emscripten' or (extra == 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment')" },
]
sdist = { url = "https://files.pythonhosted.org/packages/42/92/cc564bf6381ff43ce1f4d06852fc19a2f11d180f23dc32d9588bee2f149d/pexpect-4.9.0.tar.gz", hash = "sha256:ee7d41123f3c9911050ea2c2dac107568dc43b2d3b0c7557a33212c398ead30f", size = 166450, upload-time = "2023-11-25T09:07:26.339Z" }
wheels = [
@@ -5948,7 +5989,7 @@ dependencies = [
{ name = "statshog" },
{ name = "stripe" },
{ name = "structlog" },
- { name = "tbb", marker = "platform_machine == 'x86_64' and sys_platform == 'linux'" },
+ { name = "tbb", marker = "(platform_machine == 'x86_64' and sys_platform == 'linux') or (platform_machine != 'x86_64' and extra == 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment') or (sys_platform != 'linux' and extra == 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment')" },
{ name = "temporalio" },
{ name = "tenacity" },
{ name = "tiktoken" },
@@ -6019,7 +6060,7 @@ dev = [
{ name = "requests-mock" },
{ name = "responses" },
{ name = "ruff" },
- { name = "stpyv8", marker = "(platform_machine != 'aarch64' and platform_machine != 'arm64') or sys_platform != 'linux'" },
+ { name = "stpyv8", marker = "(platform_machine != 'aarch64' and platform_machine != 'arm64') or (platform_machine == 'aarch64' and extra == 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment') or (platform_machine == 'arm64' and extra == 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment') or sys_platform != 'linux'" },
{ name = "syrupy" },
{ name = "tach" },
{ name = "testcontainers", extra = ["mysql"] },
@@ -6044,13 +6085,19 @@ dev = [
hogql-parser-parity = [
{ name = "shrinkray" },
]
+inbox-ranking = [
+ { name = "onnx" },
+ { name = "onnxruntime" },
+ { name = "torch", version = "2.9.1", source = { registry = "https://download.pytorch.org/whl/cpu" }, marker = "(platform_machine != 's390x' and platform_python_implementation != 'PyPy' and sys_platform == 'darwin' and extra == 'group-7-posthog-inbox-ranking') or (platform_machine != 's390x' and platform_python_implementation == 'PyPy' and extra == 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment') or (platform_machine == 's390x' and extra == 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment') or (sys_platform != 'darwin' and extra == 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment')" },
+ { name = "torch", version = "2.9.1+cpu", source = { registry = "https://download.pytorch.org/whl/cpu" }, marker = "(platform_machine != 's390x' and platform_python_implementation == 'PyPy' and extra == 'group-7-posthog-inbox-ranking') or (platform_machine != 's390x' and platform_python_implementation != 'PyPy' and extra == 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment') or (platform_machine == 's390x' and extra == 'group-7-posthog-inbox-ranking') or (sys_platform != 'darwin' and extra == 'group-7-posthog-inbox-ranking')" },
+]
proto-codegen = [
{ name = "grpcio-tools" },
{ name = "ruff" },
]
sentiment = [
- { name = "optimum", extra = ["onnxruntime"] },
- { name = "torch" },
+ { name = "optimum", extra = ["onnxruntime"], marker = "extra == 'group-7-posthog-sentiment'" },
+ { name = "torch", version = "2.9.1", source = { registry = "https://pypi.org/simple" } },
]
[package.metadata]
@@ -6332,6 +6379,11 @@ dev = [
{ name = "watchdog", specifier = "==5.0.3" },
]
hogql-parser-parity = [{ name = "shrinkray", specifier = "==26.4.14.0" }]
+inbox-ranking = [
+ { name = "onnx", specifier = "~=1.21.0" },
+ { name = "onnxruntime", specifier = "~=1.24.1" },
+ { name = "torch", specifier = "~=2.9.0", index = "https://download.pytorch.org/whl/cpu", conflict = { package = "posthog", group = "inbox-ranking" } },
+]
proto-codegen = [
{ name = "grpcio-tools", specifier = "~=1.75.1" },
{ name = "ruff", specifier = "~=0.15.20" },
@@ -6491,6 +6543,11 @@ version = "6.1.1"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/1f/5a/07871137bb752428aa4b659f910b399ba6f291156bdea939be3e96cae7cb/psutil-6.1.1.tar.gz", hash = "sha256:cf8496728c18f2d0b45198f06895be52f36611711746b7f30c464b422b50e2f5", size = 508502, upload-time = "2024-12-19T18:21:20.568Z" }
wheels = [
+ { url = "https://files.pythonhosted.org/packages/61/99/ca79d302be46f7bdd8321089762dd4476ee725fce16fc2b2e1dbba8cac17/psutil-6.1.1-cp36-abi3-macosx_10_9_x86_64.whl", hash = "sha256:fc0ed7fe2231a444fc219b9c42d0376e0a9a1a72f16c5cfa0f68d19f1a0663e8", size = 247511, upload-time = "2024-12-19T18:21:45.163Z" },
+ { url = "https://files.pythonhosted.org/packages/0b/6b/73dbde0dd38f3782905d4587049b9be64d76671042fdcaf60e2430c6796d/psutil-6.1.1-cp36-abi3-macosx_11_0_arm64.whl", hash = "sha256:0bdd4eab935276290ad3cb718e9809412895ca6b5b334f5a9111ee6d9aff9377", size = 248985, upload-time = "2024-12-19T18:21:49.254Z" },
+ { url = "https://files.pythonhosted.org/packages/17/38/c319d31a1d3f88c5b79c68b3116c129e5133f1822157dd6da34043e32ed6/psutil-6.1.1-cp36-abi3-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b6e06c20c05fe95a3d7302d74e7097756d4ba1247975ad6905441ae1b5b66003", size = 284488, upload-time = "2024-12-19T18:21:51.638Z" },
+ { url = "https://files.pythonhosted.org/packages/9c/39/0f88a830a1c8a3aba27fededc642da37613c57cbff143412e3536f89784f/psutil-6.1.1-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:97f7cb9921fbec4904f522d972f0c0e1f4fabbdd4e0287813b21215074a0f160", size = 287477, upload-time = "2024-12-19T18:21:55.306Z" },
+ { url = "https://files.pythonhosted.org/packages/47/da/99f4345d4ddf2845cb5b5bd0d93d554e84542d116934fde07a0c50bd4e9f/psutil-6.1.1-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:33431e84fee02bc84ea36d9e2c4a6d395d479c9dd9bba2376c1f6ee8f3a4e0b3", size = 289017, upload-time = "2024-12-19T18:21:57.875Z" },
{ url = "https://files.pythonhosted.org/packages/38/53/bd755c2896f4461fd4f36fa6a6dcb66a88a9e4b9fd4e5b66a77cf9d4a584/psutil-6.1.1-cp37-abi3-win32.whl", hash = "sha256:eaa912e0b11848c4d9279a93d7e2783df352b082f40111e078388701fd479e53", size = 250602, upload-time = "2024-12-19T18:22:08.808Z" },
{ url = "https://files.pythonhosted.org/packages/7b/d7/7831438e6c3ebbfa6e01a927127a6cb42ad3ab844247f3c5b96bea25d73d/psutil-6.1.1-cp37-abi3-win_amd64.whl", hash = "sha256:f35cfccb065fff93529d2afb4a2e89e363fe63ca1e4a5da22b603a85833c2649", size = 254444, upload-time = "2024-12-19T18:22:11.335Z" },
]
@@ -6500,7 +6557,7 @@ name = "psycopg"
version = "3.2.10"
source = { registry = "https://pypi.org/simple" }
dependencies = [
- { name = "tzdata", marker = "sys_platform == 'win32'" },
+ { name = "tzdata", marker = "sys_platform == 'win32' or (extra == 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment')" },
]
sdist = { url = "https://files.pythonhosted.org/packages/a9/f1/0258a123c045afaf3c3b60c22ccff077bceeb24b8dc2c593270899353bd0/psycopg-3.2.10.tar.gz", hash = "sha256:0bce99269d16ed18401683a8569b2c5abd94f72f8364856d56c0389bcd50972a", size = 160380, upload-time = "2025-09-08T09:13:37.775Z" }
wheels = [
@@ -6509,7 +6566,7 @@ wheels = [
[package.optional-dependencies]
binary = [
- { name = "psycopg-binary", marker = "implementation_name != 'pypy'" },
+ { name = "psycopg-binary", marker = "implementation_name != 'pypy' or (extra == 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment')" },
]
[[package]]
@@ -7011,7 +7068,7 @@ name = "pytest"
version = "9.1.1"
source = { registry = "https://pypi.org/simple" }
dependencies = [
- { name = "colorama", marker = "sys_platform == 'win32'" },
+ { name = "colorama", marker = "sys_platform == 'win32' or (extra == 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment')" },
{ name = "iniconfig" },
{ name = "packaging" },
{ name = "pluggy" },
@@ -7369,7 +7426,7 @@ name = "qrcode"
version = "7.4.2"
source = { registry = "https://pypi.org/simple" }
dependencies = [
- { name = "colorama", marker = "sys_platform == 'win32'" },
+ { name = "colorama", marker = "sys_platform == 'win32' or (extra == 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment')" },
{ name = "pypng" },
{ name = "typing-extensions" },
]
@@ -7898,7 +7955,7 @@ name = "shadowcopy"
version = "0.0.4"
source = { registry = "https://pypi.org/simple" }
dependencies = [
- { name = "wmi" },
+ { name = "wmi", marker = "sys_platform != 'emscripten' or (extra == 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment')" },
]
sdist = { url = "https://files.pythonhosted.org/packages/12/44/c00420a3b7bcdf830529b933392b566c876a4944a24f31e126eb6fd28647/shadowcopy-0.0.4.tar.gz", hash = "sha256:ed89817dda065f893607a04c0b7d6b3b34c3507a4711f441111a4bcb1b1826c0", size = 4138, upload-time = "2023-07-08T00:01:35.266Z" }
wheels = [
@@ -8111,7 +8168,7 @@ name = "sqlalchemy"
version = "2.0.54"
source = { registry = "https://pypi.org/simple" }
dependencies = [
- { name = "greenlet", marker = "platform_machine == 'AMD64' or platform_machine == 'WIN32' or platform_machine == 'aarch64' or platform_machine == 'amd64' or platform_machine == 'ppc64le' or platform_machine == 'win32' or platform_machine == 'x86_64'" },
+ { name = "greenlet", marker = "platform_machine == 'AMD64' or platform_machine == 'WIN32' or platform_machine == 'aarch64' or platform_machine == 'amd64' or platform_machine == 'ppc64le' or platform_machine == 'win32' or platform_machine == 'x86_64' or (extra == 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment')" },
{ name = "typing-extensions" },
]
sdist = { url = "https://files.pythonhosted.org/packages/29/9c/271aa905cf2964f841371a97f3e63ab692bf51b4423d0491e67bc7f64037/sqlalchemy-2.0.54.tar.gz", hash = "sha256:baa8521e8ee9f24e75dfc7aaabc08020e551ef0d48d7c3e3536f5cddf277586b", size = 9969559, upload-time = "2026-09-15T21:06:57.337Z" }
@@ -8349,6 +8406,7 @@ dependencies = [
]
wheels = [
{ url = "https://files.pythonhosted.org/packages/08/59/8d381a2cfe8d36c4f4ff9f94769ff2809bfc16014d888360b0e24c7e5c6b/tbb-2022.3.1-py2.py3-none-manylinux_2_28_x86_64.whl", hash = "sha256:534c089eca6bcf148408684c156229d5f09c01d323b685b15739f41985b529d7", size = 4178630, upload-time = "2026-01-22T05:30:20.589Z" },
+ { url = "https://files.pythonhosted.org/packages/68/ef/d01ec56a854949efc727c8cac8941325a2020f345a786e64ca6ad3a05611/tbb-2022.3.1-py3-none-win_amd64.whl", hash = "sha256:8187e4c50a77c75c51ca9395febddd3a67d88dcb4cc537947d68d244925710f7", size = 422729, upload-time = "2026-01-22T05:30:51.916Z" },
]
[[package]]
@@ -8357,6 +8415,7 @@ version = "1.4.1"
source = { registry = "https://pypi.org/simple" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/a1/a4/38e8b5a27b66ab286168ba6c449771ed71d71ec76524e7f12401474a5151/tcmlib-1.4.1-py2.py3-none-manylinux_2_28_x86_64.whl", hash = "sha256:0d5bd98db48d31bec7fedba5c23599bf9ae43c7016d4c3946d25242d320cee89", size = 2731276, upload-time = "2025-10-22T17:57:02.392Z" },
+ { url = "https://files.pythonhosted.org/packages/eb/4d/2b1d55dba475f602197e284b9a5e5460139a9c5ef2bfb63c8d2a1fafc163/tcmlib-1.4.1-py2.py3-none-win_amd64.whl", hash = "sha256:5202a1fd8541182fbd4ef72848784e4bf94340152d7ddff33d401d30930fa53c", size = 370347, upload-time = "2025-10-22T18:00:36.37Z" },
]
[[package]]
@@ -8648,10 +8707,39 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/f6/17/57b444fd314d5e1593350b9a31d000e7411ba8e17ce12dc7ad54ca76b810/toposort-1.10-py3-none-any.whl", hash = "sha256:cbdbc0d0bee4d2695ab2ceec97fe0679e9c10eab4b2a87a9372b929e70563a87", size = 8500, upload-time = "2023-02-25T20:07:06.538Z" },
]
+[[package]]
+name = "torch"
+version = "2.9.1"
+source = { registry = "https://download.pytorch.org/whl/cpu" }
+resolution-markers = [
+ "platform_machine != 's390x' and platform_python_implementation != 'PyPy' and sys_platform == 'darwin'",
+]
+dependencies = [
+ { name = "filelock", marker = "platform_machine != 's390x' and platform_python_implementation != 'PyPy' and sys_platform == 'darwin'" },
+ { name = "fsspec", marker = "platform_machine != 's390x' and platform_python_implementation != 'PyPy' and sys_platform == 'darwin'" },
+ { name = "jinja2", marker = "platform_machine != 's390x' and platform_python_implementation != 'PyPy' and sys_platform == 'darwin'" },
+ { name = "networkx", marker = "platform_machine != 's390x' and platform_python_implementation != 'PyPy' and sys_platform == 'darwin'" },
+ { name = "setuptools", marker = "platform_machine != 's390x' and platform_python_implementation != 'PyPy' and sys_platform == 'darwin'" },
+ { name = "sympy", marker = "platform_machine != 's390x' and platform_python_implementation != 'PyPy' and sys_platform == 'darwin'" },
+ { name = "typing-extensions", marker = "platform_machine != 's390x' and platform_python_implementation != 'PyPy' and sys_platform == 'darwin'" },
+]
+wheels = [
+ { url = "https://download-r2.pytorch.org/whl/cpu/torch-2.9.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:defadbeb055cfcf5def58f70937145aecbd7a4bc295238ded1d0e85ae2cf0e1d", upload-time = "2026-01-23T15:12:48Z" },
+ { url = "https://download-r2.pytorch.org/whl/cpu/torch-2.9.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:886f84b181f766f53265ba0a1d503011e60f53fff9d569563ef94f24160e1072", upload-time = "2026-01-23T15:12:50Z" },
+]
+
[[package]]
name = "torch"
version = "2.9.1"
source = { registry = "https://pypi.org/simple" }
+resolution-markers = [
+ "platform_machine != 's390x' and platform_python_implementation != 'PyPy' and sys_platform != 'emscripten'",
+ "platform_machine == 's390x' and platform_python_implementation != 'PyPy' and sys_platform != 'emscripten'",
+ "platform_machine != 's390x' and platform_python_implementation == 'PyPy' and sys_platform != 'emscripten'",
+ "platform_machine == 's390x' and platform_python_implementation == 'PyPy' and sys_platform != 'emscripten'",
+ "platform_machine != 's390x' and sys_platform == 'emscripten'",
+ "platform_machine == 's390x' and sys_platform == 'emscripten'",
+]
dependencies = [
{ name = "filelock" },
{ name = "fsspec" },
@@ -8688,12 +8776,42 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/db/2b/f7818f6ec88758dfd21da46b6cd46af9d1b3433e53ddbb19ad1e0da17f9b/torch-2.9.1-cp314-cp314t-win_amd64.whl", hash = "sha256:c88d3299ddeb2b35dcc31753305612db485ab6f1823e37fb29451c8b2732b87e", size = 111163659, upload-time = "2025-11-12T15:23:20.009Z" },
]
+[[package]]
+name = "torch"
+version = "2.9.1+cpu"
+source = { registry = "https://download.pytorch.org/whl/cpu" }
+resolution-markers = [
+ "platform_machine != 's390x' and platform_python_implementation != 'PyPy' and sys_platform != 'darwin' and sys_platform != 'emscripten'",
+ "platform_machine == 's390x' and platform_python_implementation != 'PyPy' and sys_platform != 'emscripten'",
+ "platform_machine != 's390x' and platform_python_implementation == 'PyPy' and sys_platform != 'emscripten'",
+ "platform_machine == 's390x' and platform_python_implementation == 'PyPy' and sys_platform != 'emscripten'",
+ "platform_machine != 's390x' and sys_platform == 'emscripten'",
+ "platform_machine == 's390x' and sys_platform == 'emscripten'",
+]
+dependencies = [
+ { name = "filelock", marker = "platform_machine == 's390x' or (platform_machine != 's390x' and platform_python_implementation == 'PyPy') or sys_platform != 'darwin'" },
+ { name = "fsspec", marker = "platform_machine == 's390x' or (platform_machine != 's390x' and platform_python_implementation == 'PyPy') or sys_platform != 'darwin'" },
+ { name = "jinja2", marker = "platform_machine == 's390x' or (platform_machine != 's390x' and platform_python_implementation == 'PyPy') or sys_platform != 'darwin'" },
+ { name = "networkx", marker = "platform_machine == 's390x' or (platform_machine != 's390x' and platform_python_implementation == 'PyPy') or sys_platform != 'darwin'" },
+ { name = "setuptools", marker = "platform_machine == 's390x' or (platform_machine != 's390x' and platform_python_implementation == 'PyPy') or sys_platform != 'darwin'" },
+ { name = "sympy", marker = "platform_machine == 's390x' or (platform_machine != 's390x' and platform_python_implementation == 'PyPy') or sys_platform != 'darwin'" },
+ { name = "typing-extensions", marker = "platform_machine == 's390x' or (platform_machine != 's390x' and platform_python_implementation == 'PyPy') or sys_platform != 'darwin'" },
+]
+wheels = [
+ { url = "https://download-r2.pytorch.org/whl/cpu/torch-2.9.1%2Bcpu-cp314-cp314-manylinux_2_28_aarch64.whl", hash = "sha256:65010ab4aacce6c9a1ddfc935f986c003ca8638ded04348fd326c3e74346237c", upload-time = "2026-01-23T15:13:22Z" },
+ { url = "https://download-r2.pytorch.org/whl/cpu/torch-2.9.1%2Bcpu-cp314-cp314-manylinux_2_28_x86_64.whl", hash = "sha256:88adf5157db5da1d54b1c9fe4a6c1d20ceef00e75d854e206a87dbf69e3037dc", upload-time = "2026-01-23T15:13:23Z" },
+ { url = "https://download-r2.pytorch.org/whl/cpu/torch-2.9.1%2Bcpu-cp314-cp314-win_amd64.whl", hash = "sha256:f60e2565f261542efac07e25208fb3fc55c6fe82314a5a9cbee971edb5f27713", upload-time = "2026-01-23T15:13:26Z" },
+ { url = "https://download-r2.pytorch.org/whl/cpu/torch-2.9.1%2Bcpu-cp314-cp314t-manylinux_2_28_aarch64.whl", hash = "sha256:3ac2b8df2c55430e836dcda31940d47f1f5f94b8731057b6f20300ebea394dd9", upload-time = "2026-01-23T15:13:28Z" },
+ { url = "https://download-r2.pytorch.org/whl/cpu/torch-2.9.1%2Bcpu-cp314-cp314t-manylinux_2_28_x86_64.whl", hash = "sha256:5b688445f928f13563b7418b17c57e97bf955ab559cf73cd8f2b961f8572dbb3", upload-time = "2026-01-23T15:13:29Z" },
+ { url = "https://download-r2.pytorch.org/whl/cpu/torch-2.9.1%2Bcpu-cp314-cp314t-win_amd64.whl", hash = "sha256:cf9c3e50b595721ca6b488bdcc326e0f1af73ed28b9b66eff504a96649bb5c96", upload-time = "2026-01-23T15:13:32Z" },
+]
+
[[package]]
name = "tqdm"
version = "4.67.1"
source = { registry = "https://pypi.org/simple" }
dependencies = [
- { name = "colorama", marker = "sys_platform == 'win32'" },
+ { name = "colorama", marker = "sys_platform == 'win32' or (extra == 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment')" },
]
sdist = { url = "https://files.pythonhosted.org/packages/a8/4b/29b4ef32e036bb34e4ab51796dd745cdba7ed47ad142a9f4a1eb8e0c744d/tqdm-4.67.1.tar.gz", hash = "sha256:f8aef9c52c08c13a65f30ea34f4e5aac3fd1a34959879d7e59e63027286627f2", size = 169737, upload-time = "2024-11-24T20:12:22.481Z" }
wheels = [
@@ -8754,7 +8872,7 @@ version = "0.338.0"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "lz4" },
- { name = "orjson", marker = "platform_python_implementation != 'PyPy'" },
+ { name = "orjson", marker = "platform_python_implementation != 'PyPy' or (extra == 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment')" },
{ name = "python-dateutil" },
{ name = "pytz" },
{ name = "requests" },
@@ -8772,7 +8890,7 @@ version = "0.30.0"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "attrs" },
- { name = "cffi", marker = "implementation_name != 'pypy' and os_name == 'nt'" },
+ { name = "cffi", marker = "(implementation_name != 'pypy' and os_name == 'nt' and platform_machine == 's390x') or (implementation_name != 'pypy' and os_name == 'nt' and platform_machine != 's390x' and platform_python_implementation == 'PyPy') or (implementation_name != 'pypy' and os_name == 'nt' and platform_machine != 's390x' and platform_python_implementation != 'PyPy' and extra != 'group-7-posthog-inbox-ranking') or (implementation_name != 'pypy' and os_name == 'nt' and sys_platform != 'darwin') or (implementation_name != 'pypy' and platform_machine != 's390x' and platform_python_implementation != 'PyPy' and sys_platform == 'darwin' and extra == 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment') or (implementation_name == 'pypy' and extra == 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment') or (os_name != 'nt' and extra == 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment')" },
{ name = "idna" },
{ name = "outcome" },
{ name = "sniffio" },
@@ -8788,7 +8906,9 @@ name = "triton"
version = "3.5.1"
source = { registry = "https://pypi.org/simple" }
wheels = [
+ { url = "https://files.pythonhosted.org/packages/14/f9/0430e879c1e63a1016cb843261528fd3187c872c3a9539132efc39514753/triton-3.5.1-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f617aa7925f9ea9968ec2e1adaf93e87864ff51549c8f04ce658f29bbdb71e2d", size = 159956163, upload-time = "2025-11-11T17:52:12.999Z" },
{ url = "https://files.pythonhosted.org/packages/a4/e6/c595c35e5c50c4bc56a7bac96493dad321e9e29b953b526bbbe20f9911d0/triton-3.5.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d0637b1efb1db599a8e9dc960d53ab6e4637db7d4ab6630a0974705d77b14b60", size = 170480488, upload-time = "2025-11-11T17:41:18.222Z" },
+ { url = "https://files.pythonhosted.org/packages/41/1e/63d367c576c75919e268e4fbc33c1cb33b6dc12bb85e8bfe531c2a8bd5d3/triton-3.5.1-cp314-cp314t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8932391d7f93698dfe5bc9bead77c47a24f97329e9f20c10786bb230a9083f56", size = 160073620, upload-time = "2025-11-11T17:52:18.403Z" },
{ url = "https://files.pythonhosted.org/packages/16/b5/b0d3d8b901b6a04ca38df5e24c27e53afb15b93624d7fd7d658c7cd9352a/triton-3.5.1-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:bac7f7d959ad0f48c0e97d6643a1cc0fd5786fe61cb1f83b537c6b2d54776478", size = 170582192, upload-time = "2025-11-11T17:41:23.963Z" },
]
@@ -9240,7 +9360,7 @@ name = "tzlocal"
version = "5.3.1"
source = { registry = "https://pypi.org/simple" }
dependencies = [
- { name = "tzdata", marker = "sys_platform == 'win32'" },
+ { name = "tzdata", marker = "sys_platform == 'win32' or (extra == 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment')" },
]
sdist = { url = "https://files.pythonhosted.org/packages/8b/2e/c14812d3d4d9cd1773c6be938f89e5735a1f11a9f184ac3639b93cef35d5/tzlocal-5.3.1.tar.gz", hash = "sha256:cceffc7edecefea1f595541dbd6e990cb1ea3d19bf01b2809f362a03dd7921fd", size = 30761, upload-time = "2025-03-05T21:17:41.549Z" }
wheels = [
@@ -9350,11 +9470,11 @@ wheels = [
[package.optional-dependencies]
standard = [
- { name = "colorama", marker = "sys_platform == 'win32'" },
+ { name = "colorama", marker = "sys_platform == 'win32' or (extra == 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment')" },
{ name = "httptools" },
{ name = "python-dotenv" },
{ name = "pyyaml" },
- { name = "uvloop", marker = "platform_python_implementation != 'PyPy' and sys_platform != 'cygwin' and sys_platform != 'win32'" },
+ { name = "uvloop", marker = "(platform_python_implementation != 'PyPy' and sys_platform != 'cygwin' and sys_platform != 'win32') or (platform_python_implementation == 'PyPy' and extra == 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment') or (sys_platform == 'cygwin' and extra == 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment') or (sys_platform == 'win32' and extra == 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment')" },
{ name = "watchfiles" },
{ name = "websockets" },
]
@@ -9507,7 +9627,7 @@ name = "wmi"
version = "1.5.1"
source = { registry = "https://pypi.org/simple" }
dependencies = [
- { name = "pywin32" },
+ { name = "pywin32", marker = "sys_platform != 'emscripten' or (extra == 'group-7-posthog-inbox-ranking' and extra == 'group-7-posthog-sentiment')" },
]
sdist = { url = "https://files.pythonhosted.org/packages/d4/66/6364deb0a03415f96c66803d8c4379f808f2401da3bdb183348487b10510/WMI-1.5.1.tar.gz", hash = "sha256:b6a6be5711b1b6c8d55bda7a8befd75c48c12b770b9d227d31c1737dbf0d40a6", size = 26254, upload-time = "2020-04-28T08:22:58.096Z" }
wheels = [