๐Ÿ”ฌPost-Hoc Analysis

After training, SLM Lab automatically generates graphs and metrics. You can regenerate these anytime with updated styling or new metrics.

What SLM Lab Generates

Every training run produces:

Training curves showing reward over time:

Example Training Curve

Moving average curves for smoother visualization:

Example Moving Average

Regenerating Analysis

Use retro_analyze to regenerate graphs and metrics without re-running training:

Basic Usage

This regenerates:

  • All graphs (PNG and HTML)

  • Trial-level aggregated metrics

  • Experiment summary (for search runs)

What Gets Regenerated

Artifact
Location
Effect

Trial graphs

*_trial_graph_*.png (root)

Overwritten

Trial metrics

*_trial_metrics_scalar.json (root)

Overwritten

Session graphs

graph/*_session_graph_*.png

Overwritten

Session data

info/*_session_df_{train,eval}.csv

Preserved

Model checkpoints

model/*.pt

Preserved

Spec file

*_spec.json (root)

Preserved

circle-check

Common Use Cases

Update Graph Styling

SLM Lab updates Plotly styling periodically. Regenerate graphs to get the latest look:

Recompute Metrics After Code Changes

If you modify the analysis module (e.g., add a new metric):

Generate Publication-Quality Graphs

For papers or presentations, you may want higher-resolution or different formats:

Batch Processing

Process multiple experiments:

Troubleshooting

"Session data not found"

Ensure the data folder contains *_session_df_train.csv and *_session_df_eval.csv files in the info/ subfolder. These are required for analysis.

Graphs look wrong

Check that your SLM Lab version matches the data format. Very old experiments may need manual migration.

Last updated

Was this helpful?