Move README.md
#1
by tytskiy - opened
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124# 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
```bashdocker build -t yambda-image .```
### 2. Run Container with GPU Support
```bashdocker 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:
```bashdata/├── 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
```bash# For example random_rec
cd models/random_rec/
# Show help for main scriptpython main.py --help
# Basic executionpython main.py```
### Specific Methods
#### BPR/ALS
```bashcd models/bpr_als
python main.py --model bprpython main.py --model als```
#### SASRec
```bashcd models/sasrec
# Trainingpython train.py --exp_name exp1
# Evaluationpython eval.py --exp_name exp1 ```---
## Manual Installation (Not Recommedned)
### 1. Install Core Dependencies
```bashpip install torch torchvision torchaudio```
### 2. Install Implicit (CUDA 11.8 required)
Implicit works only with cuda<12. See reasons [here](https://github.com/NVIDIA/nvidia-docker/issues/700#issuecomment-381073278)
```bashCUDACXX=/usr/local/cuda-11.8/bin/nvcc \pip install implicit```
### 3. Install SANSA
```bashsudo apt-get install libsuitesparse-devgit clone https://github.com/glami/sansa.gitcd sansa && \SUITESPARSE_INCLUDE_DIR=/usr/include/suitesparse \SUITESPARSE_LIBRARY_DIR=/usr/lib \pip install .```
### 4. Install Project Package
```bashpip install . # In root directory```benchmarks/README.mdAdded+124