back to home

lenskit / lkpy

Python recommendation toolkit

307 stars
72 forks
120 issues
PythonRustShell

AI Architecture Analysis

This repository is indexed by RepoMind. By analyzing lenskit/lkpy in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.

Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.

Source files are only loaded when you start an analysis to optimize performance.

Embed this Badge

Showcase RepoMind's analysis directly in your repository's README.

[![Analyzed by RepoMind](https://img.shields.io/badge/Analyzed%20by-RepoMind-4F46E5?style=for-the-badge)](https://repomind.in/repo/lenskit/lkpy)
Preview:Analyzed by RepoMind

Repository Overview (README excerpt)

Crawler view

Python recommendation tools LensKit 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. > [!IMPORTANT] > 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. > > In Proceedings of the 29th ACM International Conference on Information and Knowledge Management (CIKM '20). > > DOI:10.1145/3340531.3412778. > > arXiv:1809.03125 [cs.IR]. > [!NOTE] > > LensKit had significant changes in the 2025.1 release. See the Migration > Guide for details. [release]: https://lkpy.lenskit.org/en/stable/ Installing To install the current release with (recommended): Or, to add it to your project's dependencies and virtual environment: Classic also works: Then see Getting Started Conda Packages You can also install LensKit from with : Or : Development Version To use the latest development version, you have two options. You can install directly from GitHub: Or you can use our PyPI index, by adding to : Binary wheels of LensKit development (and release) versions are automatically pushed to this index, although they are not guaranteed to be permanently available. Reproducible code should generally depend on released versions published to PyPI. Simplifying PyTorch installation We also provide mirrors of the PyTorch package repositories that are filtered to only include PyTorch and directly supporting dependencies, without other packages that conflict with or mask packages from PyPI, and with fallbacks for other platforms (i.e., our CUDA indices include CPU-only MacOS packages). This makes it easier to install specific versions of PyTorch in your project with the index priority and fallthrough logic implemented by . To make your project only use CPU-based PyTorch, you can add to : Or CUDA 12.8: These indices provide the same package distributions as the official PyTorch repositories (in fact, they link directly to the PyTorch packages). They are just an alternate index view that reduces some package conflicts. Developing [issues]: https://github.com/lenskit/lkpy/issues [workflow]: https://github.com/lenskit/lkpy/wiki/DevWorkflow To 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][issues]. Our development workflow is documented in [the wiki][workflow]; the wiki also contains other information on *developing* LensKit. User-facing documentation is at . [conda-lock]: https://github.com/conda-incubator/conda-lock [lkdev]: https://github.com/lenskit/lkdev We use for developing LensKit and managing development environments. Our file contains the Python development dependencies; you also need a working Rust compiler (typically via ). Before setting up to work on LensKit, you therefore need: • Git • • and a working Rust compiler ( ) • A working C compiler compatible with Python • On Windows, this is either Visual Studio (with C++ development) or the Visual C++ Build Tools. See the [Rustup Windows install instructions][rsu-win] for details. • On Mac, install Xcode. • On Linux, see your system package manager instructions. Windows On Windows, you can install dependencies (except for the Visual C++ tools) with : Mac On Mac, you can install the dependencies with Homebrew: [rsu-win]: https://ehuss.github.io/rustup/installation/windows.html Once you have the dependencies installed, set up your LensKit development environment: If you want all extras (may not work on Windows), do: You can then activate the virtual environment to have the tools available and run tools like : Testing Changes You should always test your changes by running the LensKit test suite: pytest tests If 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: uv pip install -e /path/to/lkpy Resources • Documentation • Discussion and Announcements Acknowledgements This 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.