This is my implementation of the paper MPDA(On-Device Learning for Model Personalization with Large-Scale Cloud-Coordinated Domain Adaption) with pytorch.
First you need to config the config.yml in the root path.
generate users with train json file and users with train and test data json file
nohup python -u scripts/preprocess/movielens/generate_user_with_train_and_test.py > ./log/generate_user_with_train_and_test.log 2>&1 &generate user and item mapping
python scripts/preprocess/movielens/generate_mapping_file.pygenerate recall item pairs
python scripts/preprocess/movielens/generate_recall_item_pairs.pygenerate rating.csv with raw_data.json
python scripts/preprocess/amazon/generate_raw_data.pytrain global model NCF on MovieLens
nohup python -u scripts/train_global_model.py -model=NCF -epochs=10 -dataset=movielens -device=cuda:2 > ./log/train_global_model.log 2>&1 &train mask model on MovieLens
nohup python -u scripts/train_mask_model.py -device=cuda:2 > ./log/train_mask_model.log 2>&1 &
transfer model NCF
bash ./commands/ncf_movielens_50_random.sh