How sachncs/morel works
morel is a Python research and inference package for robust multimodal recommendation. Its central workflow prepares interaction graphs and partially missing item features, retrieves graph context, completes missing modalities through routed codebooks, and ranks items; training and evaluation support that workflow. It also offers a data-lifecycle CLI and an optional inference API. The graph follows the README and sampled pipeline, retrieval, and server code; some subsystem links are omitted where source wiring was not sampled.
Main entry points: composer.py GRE-MC pipeline · app.py Inference API · build.py Build graphs · acquire.py Acquire data
Components 20
Data lifecycle
- Acquire data
morel/data/acquire.py - Extract data
morel/data/extract.py - Build graphs
morel/data/build.py - Mask modalities
morel/data/mask.py - Dataset store
morel/data/store.py
GRE-MC model
- GRE-MC pipeline
morel/pipeline/composer.py - Graph retrieval
morel/retrieve/pipeline.py - Feature encoding
morel/encode/transformer.py - Codebook routing
morel/route/router.py - Modality codebook
morel/codebook/codebook.py - Completion decoder
morel/complete/decoders.py - Item ranking
morel/recommend/light.py
Training and evaluation
- Model training
morel/train/trainer.py - Evaluation and ablations
morel/eval/completion.py - Experiment services
morel/app/experiment.py
Inference service
- Inference API
morel/serve/app.py - Model loader
morel/serve/loader.py - Scoped authentication
morel/serve/auth.py - Model updates
morel/serve/update.py
Other components
- Researcher or caller
Connections 21
- Researcher or caller → Acquire data: starts data lifecycle
- Researcher or caller → GRE-MC pipeline: provides features and graph
- GRE-MC pipeline → Graph retrieval: retrieves context
- GRE-MC pipeline → Feature encoding: encodes features
- GRE-MC pipeline → Codebook routing: routes representations
- GRE-MC pipeline → Modality codebook: uses codebook
- GRE-MC pipeline → Completion decoder: completes modalities
- Researcher or caller → Item ranking: requests ranking
- Researcher or caller → Model training: starts training
- Model training → GRE-MC pipeline: trains model
- Researcher or caller → Evaluation and ablations: requests evaluation
- Researcher or caller → Experiment services: runs experiment
- Researcher or caller → Inference API: sends request
- Inference API → Scoped authentication: checks scope
- Inference API → Model loader: loads pipeline
- Inference API → Model updates: dispatches updates
- Model loader → GRE-MC pipeline: provides model
- Acquire data → Extract data: extracts archive
- Extract data → Build graphs: prepares inputs
- Build graphs → Mask modalities: supports masking
- Build graphs → Dataset store: stores dataset