Package: lenskit
Python recommendation toolsLensKit is a set of Python tools for experimenting with and studying recommender
systems.  It provides support for training, running, and evaluating recommender
algorithms in a flexible fashion suitable for research and education.LensKit for Python (LKPY) is the successor to the Java-based LensKit project.If you use LensKit for Python in published research, please cite:Michael D. Ekstrand. 2020.
LensKit for Python: Next-Generation Software for Recommender Systems Experiments.
InProceedings of the 29th ACM International Conference on Information and Knowledge Management(CIKM '20).
DOI:10.1145/3340531.3412778.
arXiv:1809.03125[cs.IR].InstallingTo install the current release with Anaconda (recommended):conda install -c conda-forge lenskitOr you can usepip:pip install lenskitTo use the latest development version, install directly from GitHub:pip install -U git+https://github.com/lenskit/lkpyThen seeGetting StartedDevelopingTo contribute to LensKit, clone or fork the repository, get to work, and submit
a pull request.  We welcome contributions from anyone; if you are looking for a
place to get started, see the [issue tracker][].Our development workflow is documented inthe wiki; the wiki also
contains other information ondevelopingLensKit. User-facing documentation is
athttps://lkpy.lenskit.org.We recommend using an Anaconda environment for developing LensKit.
We don't maintain the Conda environment specification directly - instead, we
maintain information insetup.tomlto be able to generate it, so that we define
dependencies and versions in one place.conda-lockcan help you set up the environment (replacelinux-64with your platform):# install conda-lock in base environment
# alternatively: pip install conda-lock
conda install -c conda-forge conda-lock
# create the lock file for Python 3.9
conda-lock -p linux-64 -f pyproject.toml -f lkbuild/python-3.9-spec.yml
# create the environment
conda env create -n lkpy -f conda-linux-64.lockThis will create a Conda environment calledlkpywith the packages required to develop and test
LensKit.We also provide support for automating some of this process through LensKit's
infrastructure utilities:invoke dev-lockThelkbuild/boot-env.ymlfile defines a Conda environment with the packages necessary
for the lockfile generation to work.  The full set of commands:conda env create -f lkbuild/boot-env.yml
conda activate lkboot
invoke dev-lock
conda create -n lkpy -f conda-linux-64.lock
conda activate lkpyinvoke dev-lockcan optionally specify the BLAS implementation (openblasormkl), and the
Python version.Testing ChangesYou should always test your changes by running the LensKit test suite:python -m pytestIf you want to use your changes in a LensKit experiment, you can locally install
your modified LensKit into your experiment's environment.  We recommend using
separate environments for LensKit development and for each experiment; you will
need to install the modified LensKit into your experiment's repository:conda activate my-exp
conda install -c conda-forge flit
cd /path/to/lkpy
flit install --pth-file --deps noneYou may need to first uninstall LensKit from your experiment repo; make sure that
LensKit's dependencies are all still installed.Once you have pushed your code to a GitHub branch, you can use a Git repository as
a Pip dependency in anenvironment.ymlfor your experiment, to keep using the
correct modified version of LensKit until your changes make it in to a release.ResourcesDocumentationMailing list, etc.AcknowledgementsThis material is based upon work supported by the National Science Foundation
under Grant No. IIS 17-51278. Any opinions, findings, and conclusions or
recommendations expressed in this material are those of the author(s) and do not
necessarily reflect the views of the National Science Foundation.