Reference — CLI
morel ships a single morel console entry point with subcommands
for each lifecycle stage. This page documents every flag.
Top-level
morel [-h] {data,train,eval,bench,reproduce,serve,render-fidelity,render-api} ...
A bare morel (or python -m morel) prints the subcommand tree
and exits 0. Pass -h or --help for the full list of options.
morel data
The data lifecycle: download → extract → build → mask → verify.
morel data download
morel data download [--category CATEGORY] [--dest DIR] [--legacy] [--config CFG]
| Flag | Default | Meaning |
|---|---|---|
--category |
Beauty |
Which dataset category. |
--dest |
data/raw |
Output directory. |
--legacy |
off | Use the legacy mirror (debug only). |
--config |
(none) | Optional config YAML. |
morel data extract
morel data extract [--data-dir DIR] [--out-dir DIR] [--config CFG] [--synthetic]
Adds --synthetic to skip model downloads and use the deterministic
random encoder.
morel data build
morel data build [--data-dir DIR] [--out-dir DIR] [--min-edges N] [--config CFG] [--synthetic]
--min-edges overrides data.min for k-core filtering.
morel data mask
morel data mask --items N --modalities M [--ratio R] [--kind K] --out FILE [--config CFG]
Required: --items, --modalities, --out. The mask is saved
as a .npy file.
morel data verify
Walks a directory looking for *.manifest.json sidecars and prints
each path. No flag.
morel train
morel train completion
morel train completion [--config CFG] [--epochs N] [--items N] [--users N]
morel train recommendation
morel train recommendation [--config CFG] [--epochs N] [--items N] [--users N]
morel serve
morel serve --model-dir RUN_DIR [--host HOST] [--port PORT] [--workers N] [--config CFG]
RUN_DIR must contain the config, checkpoint, feature, mask, and graph
artifacts produced by a completed training run. Omitting it starts a
fail-closed liveness shell whose model routes return 503.
morel eval
morel eval rank
morel eval rank [--config CFG] [--items N] [--users N] [--epochs N]
Drives the trained ranker over the test split and reports
recall@K and ndcg@K for each K in config.eval.ks.
morel eval robustness
morel eval robustness [--config CFG] [--items N] [--users N] [--epochs N]
Sweeps every ratio in config.eval.robustness and reports
per-cutoff metrics across the sweep.
morel eval ablations
morel eval ablations [--config CFG] [--items N] [--users N]
Runs the baseline plus each condition in config.eval.ablations
through the same pipeline, changing only the named component.
morel bench
morel bench [--sizes "16,32"] [--epochs N]
Runs the benchmark suite at the requested item scales.
morel reproduce
morel reproduce CONFIG.yaml [--items N] [--users N] [--epochs N]
Loads the saved config and manifest and re-runs the experiment deterministically.
morel serve
morel serve --model-dir RUN_DIR [--host HOST] [--port PORT] [--workers N] [--config CFG]
Starts the FastAPI inference server from a validated run artifact bundle.
Without --model-dir it starts a fail-closed liveness shell. Configuration
of rate limits and auth happens via the env vars documented in
How-to: serve.
morel render-fidelity
morel render-fidelity OUT.md [OUT.json]
Renders the paper-fidelity registry as Markdown; if OUT.json is
supplied, a JSON export is written alongside.
morel render-api
morel render-api [OUT.md]
Regenerates the API reference from each module's __all__.
Default output is docs/reference/api.md.
Exit codes
| Code | Meaning |
|---|---|
| 0 | Success. |
| 1 | Soft error (handled Error subtype printed to stderr). |
| 2 | Usage error (unknown subcommand, bad flag). |
Anything else is an unexpected exception and surfaces a traceback.