tags | dataset | framework | ||||||
---|---|---|---|---|---|---|---|---|
|
|
|
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.
Install the dependencies defined in pyproject.toml
. Simulation has been tested using Python 3.11.6.
pip install -e .
Download MovieLens 1m and extract the ml-1m
directory to the root project directory alongside the src
directory.
Edit pyproject.toml.
model-type = <mf|vae>
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.
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
Note
An update to this example will show how to run this Flower application with the Deployment Engine and TLS certificates, or with Docker.
Results will be automatically saved to metrics_plots.png
and latent_space_visualization.png
upon successful run.