CLI API Reference
Command-line interface entry points for training and evaluating models. These functions are called
via the openretina CLI or can be invoked programmatically with a Hydra DictConfig.
Training
train_model
train_model(cfg: DictConfig) -> float | None
Run the full training pipeline: load data, instantiate model, train, test, and optionally log to MLflow.
Returns the objective target score if configured, otherwise None.
Evaluation
evaluate_model
evaluate_model(cfg: DictConfig) -> float
Run the full evaluation pipeline: load a trained model, compute per-neuron metrics (correlation, FEVe, Poisson loss, oracle), and return the mean correlation.