Datasets:

Modalities:
Tabular
Formats:
parquet
ArXiv:
Libraries:
Datasets
pandas
License:
yambda / benchmarks /README.md
ploshkin's picture
Move benchmarks/README.md (#3)
ef73a56 verified

Reproducibility Guide

Overview

This part of repo contains the implementation and experiments. This guide will help you reproduce the results using Docker or manual installation.


Docker Setup (Recommended)

1. Build Docker Image

docker build -t yambda-image .

2. Run Container with GPU Support

docker run --gpus all \
           --runtime=nvidia \
           -it \
           -v </absolute/path/to/local/data>:/yambda/data \
           yambda-image

Data Organization

Create following structure in mounted data directory:

data/
β”œβ”€β”€ flat/
β”‚   └── 50m/
β”‚       β”œβ”€β”€ likes.parquet
β”‚       β”œβ”€β”€ listens.parquet
β”‚       └── ...
└── sequential/
    └── 50m/
        β”œβ”€β”€ likes.parquet
        β”œβ”€β”€ listens.parquet
        └── ...

Note: Sequential data is only needed for sasrec. You can build it from flat using scripts/transform2sequential.py or download


Running Experiments

General Usage

# For example random_rec

cd models/random_rec/

# Show help for main script
python main.py --help

# Basic execution
python main.py

Specific Methods

BPR/ALS

cd models/bpr_als

python main.py --model bpr
python main.py --model als

SASRec

cd models/sasrec

# Training
python train.py --exp_name exp1

# Evaluation
python eval.py --exp_name exp1 

Manual Installation (Not Recommedned)

1. Install Core Dependencies

pip install torch torchvision torchaudio

2. Install Implicit (CUDA 11.8 required)

Implicit works only with cuda<12. See reasons here

CUDACXX=/usr/local/cuda-11.8/bin/nvcc \
pip install implicit

3. Install SANSA

sudo apt-get install libsuitesparse-dev
git clone https://github.com/glami/sansa.git
cd sansa && \
SUITESPARSE_INCLUDE_DIR=/usr/include/suitesparse \
SUITESPARSE_LIBRARY_DIR=/usr/lib \
pip install .

4. Install Project Package

pip install .