Skip to content

A Flower / PyTorch package for evaluating recommender system policies.

License

Notifications You must be signed in to change notification settings

stoille/FedRecPolicyEval

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tags dataset framework
basic
vision
fds
MovieLens
torch
torchvision

Federated Recommender System Performance Benchmarking with PyTorch and Flower

This project evaluates the performance of recommender systems that implement collaborative filtering and user policy control in a federated way using the Flower framework. Recommender models use either Matrix Factorization or Variational Autoencoder (VAE), conditioned on item metadata, user preferences, and user policies. Currently the MovieLens dataset is supported. Alternative datasets and implementations of policy-controlled recommender systems will be evaluated in the future.

Set up the project

Install dependencies and project

Install the dependencies defined in pyproject.toml. Simulation has been tested using Python 3.11.6.

pip install -e .

Download MovieLens 1m

Download MovieLens 1m and extract the ml-1m directory to the root project directory alongside the src directory.

Configure Model & Simulation Settings

Edit pyproject.toml.

model-type = <mf|vae>

Run the Project

You can run Flower projects such as this one in both simulation and deployment mode without making changes to the code. Start out by using the simulation mode requires fewer components to be launched manually. By default, flwr run will make use of the Simulation Engine.

Run with the Simulation Engine

flwr run .

You can also override some of the settings for your ClientApp and ServerApp defined in pyproject.toml. For example:

flwr run . --run-config num-server-rounds=5

Run with the Deployment Engine

Note

An update to this example will show how to run this Flower application with the Deployment Engine and TLS certificates, or with Docker.

Visualize the results

Results will be automatically saved to metrics_plots.png and latent_space_visualization.png upon successful run.

About

A Flower / PyTorch package for evaluating recommender system policies.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published