numpy==2.2.6
pandas==2.3.3
PyYAML==6.0.3
# Three packages, and for a re-ranking post that is the only honest option,
# because the thing being measured here is a six-line greedy loop and every
# library that provides it also provides the default that hides the result.
#
# The specific problem: a diversity library takes a similarity matrix as an
# argument and does not care where it came from. The single most important
# measurement in this repository is the difference between diversifying in
# the relevance model's OWN embedding space and diversifying on an attribute
# sourced independently of it, and no API makes you confront that choice
# because to the API they are both just a matrix.
#
# Everything below is optional and deliberately not installed.
#
# What it would replace: `rerank/dpp.py` entirely. `dppy` implements exact and
# approximate DPP sampling plus the greedy MAP this file hand-rolls from Chen,
# Zhang and Zhou (NeurIPS 2018). Worth knowing what writing it out bought: the
# incremental Cholesky makes the failure mode visible, because when the kernel
# loses positive-definiteness the marginal gain d_i^2 goes negative and the
# code can stop and say so. A library that silently jitters the diagonal back
# to PSD changes the policy you are measuring without telling you. The
# measured result that mattered more: at matched relevance, MMR delivers MORE
# ground-truth diversity than this DPP (at recall 0.4140 MMR reaches ILD 0.6040
# against the DPP's 0.5574 at recall 0.4143), which is the opposite of what the
# determinant formulation's elegance suggests, and is only visible if you
# compare FRONTIERS rather than single parameter settings.
# dppy==0.3.2
#
# What it would replace: `base/als.py`, with a Cython/GPU ALS that is 50 to
# 100 times faster and numerically equivalent. The base model is frozen in
# this repository and takes 1.9 seconds, so there is nothing to gain here;
# at production scale the base model is the expensive part and this is the
# right dependency to add first.
# implicit==0.7.2
#
# What it would replace: `eval/metrics.py`, partially. RecBole and Elliot both
# implement intra-list diversity, catalogue coverage and Gini. Neither
# implements the column this repository is built on, which is the SAME slate
# scored in two different similarity spaces, because a framework takes one
# similarity definition per run and reports one diversity number. Nor do they
# report calibration error next to intra-list diversity, which is the
# measurement that shows the DPP improving one by 0.5401 while degrading the
# other by 0.400 on the same slates.
# recbole==1.2.0
#
# What it would replace: nothing here, and it is listed because it is the
# honest next step rather than a substitute. The whole premise of this
# repository is a re-ranking LAYER over a frozen relevance model, which is a
# two-stage architecture chosen for debuggability. The production alternative
# is to put the diversity objective in the model's own loss (a determinantal
# or submodular training objective, or a slate-level listwise loss), which
# removes the layer and the pool ceiling along with it. That is a different
# post and it needs a framework with autodiff.
# torch==2.6.0
