How xiewilliams/marco works
MARCO turns multi-domain review data into target-domain recommendation data, then trains a recommender whose source-domain contributions are selected cooperatively by multi-agent reinforcement learning. The primary runtime is entry.py → run.py: Run prepares loaders and models, coordinates the RL environment and MAPPO trainer, and uses inference to produce predictions and contribution weights. Separate branches cover review preprocessing and single-domain MF pretraining. The graph reflects the README and sampled source; some Run methods and model details were omitted, so uncertain internal wiring is not expanded.
Main entry points: run.py Experiment orchestration · rl_trainer_infer.py Training and inference · singlepre.py Single-domain MF · entry.py Training entry
Components 15
Data preparation
- Review preprocessing
preprocessing/preprocess.py - Domain datasets
Domain pretraining
- Single-domain MF
singleMF/singlepre.py - MF settings
singleMF/config.json - Pretrained models
Recommendation runtime
- Training entry
entry.py - MARCO settings
config.json - Experiment orchestration
run.py - Recommendation models
models.py - Training and inference
rl_trainer_infer.py - Ratings and weights
Cooperative learning
- CDR environment
rl_environment.py - MAPPO agents
MAPPO.py
Other components
- Researcher
- Amazon reviews
Connections 19
- Researcher → Training entry: starts training
- Researcher → Review preprocessing: prepares data
- Researcher → Single-domain MF: pretrains domains
- Amazon reviews → Review preprocessing: supplies reviews
- Review preprocessing → Domain datasets: parses and splits
- Domain datasets → Experiment orchestration: loads interaction data
- MF settings → Single-domain MF: configures
- Single-domain MF → Domain datasets: reads domain data
- Single-domain MF → Pretrained models: saves embeddings
- Training entry → MARCO settings: loads settings
- Training entry → Experiment orchestration: starts experiment
- Pretrained models → Experiment orchestration: provides model paths
- Experiment orchestration → Recommendation models: constructs recommender
- Experiment orchestration → Training and inference: runs training and inference
- Training and inference → CDR environment: resets and steps
- Training and inference → MAPPO agents: selects actions and trains
- CDR environment → Recommendation models: requests embeddings
- CDR environment → Recommendation models: computes weighted predictions
- Training and inference → Ratings and weights: returns predictions and weights