๐Ÿ“Data Locations

Understanding where SLM Lab saves data helps you analyze results, reproduce experiments, and share findings.

Output Directory Structure

After training, results are saved to data/{spec_name}_{timestamp}/:

data/ppo_cartpole_2026_01_30_221924/
โ”œโ”€โ”€ ppo_cartpole_spec.json                              # Original spec
โ”œโ”€โ”€ ppo_cartpole_t0_spec.json                           # Trial spec (for reproduction)
โ”œโ”€โ”€ ppo_cartpole_t0_trial_graph_mean_returns_vs_frames.png    # Trial training curve
โ”œโ”€โ”€ ppo_cartpole_t0_trial_graph_mean_returns_ma_vs_frames.png # Trial moving average
โ”œโ”€โ”€ ppo_cartpole_t0_trial_metrics_scalar.json           # Trial metrics
โ”‚
โ”œโ”€โ”€ graph/                  # Per-session graphs
โ”‚   โ””โ”€โ”€ ppo_cartpole_t0_s0_session_graph_*.png
โ”‚
โ”œโ”€โ”€ info/                   # Session data and experiment results
โ”‚   โ”œโ”€โ”€ ppo_cartpole_t0_s0_session_df_train.csv        # Training metrics
โ”‚   โ”œโ”€โ”€ ppo_cartpole_t0_s0_session_df_eval.csv         # Evaluation metrics
โ”‚   โ””โ”€โ”€ experiment_df.csv                               # Search results (if search mode)
โ”‚
โ”œโ”€โ”€ log/                    # TensorBoard event files
โ”‚   โ””โ”€โ”€ events.out.tfevents.*
โ”‚
โ””โ”€โ”€ model/                  # PyTorch checkpoints
    โ”œโ”€โ”€ ppo_cartpole_t0_s0_ckpt-best_net_model.pt      # Best model (session 0)
    โ””โ”€โ”€ ppo_cartpole_t0_s0_net_model.pt                # Final model (session 0)

Naming convention: {spec_name}_t{trial}_s{session}_{type}.{ext}

  • t0 = Trial index 0

  • s0 = Session index 0

Key Files Explained

Session DataFrames (*_session_df_{train,eval}.csv)

Two variants are saved per session:

  • *_session_df_train.csv: Metrics during training rollouts

  • *_session_df_eval.csv: Metrics during evaluation (more stable)

Time series of metrics, one row per checkpoint:

Column
Description

frame

Total frames processed

total_reward

Episode reward at this checkpoint

total_reward_ma

100-checkpoint moving average of reward

loss

Training loss

fps

Frames per second

wall_t

Wall-clock time (seconds)

t

Step counter

epi

Episode count

opt_step

Optimization steps

lr

Current learning rate

entropy

Policy entropy (policy gradient algorithms)

clip_eps

PPO clipping epsilon (PPO only)

Note: Some columns are algorithm-specific (e.g., clip_eps only appears for PPO, entropy for policy gradient algorithms).

Example usage:

Trial Metrics (*_trial_metrics_scalar.json)

Summary statistics aggregated across sessions:

See Performance Metrics for detailed definitions.

Experiment DataFrame (experiment_df.csv)

For search mode, contains all trial results sorted by performance:

Column
Description

trial

Trial index

{search_var}

Hyperparameter values tried

total_reward_ma

Final performance

strength, efficiency, etc.

Performance metrics

Example usage:

Model Checkpoints

Two checkpoints are saved per session:

  • *_ckpt-best_net_model.pt: Model with highest total_reward_ma during training

  • *_net_model.pt: Model at the end of training (no ckpt- prefix)

circle-info

Usually these are similar, but "best" is useful if performance dropped near the end of training (policy collapse).

Loading a checkpoint:

Spec File (*_spec.json)

The complete spec used for this run, including:

  • All hyperparameters

  • Git SHA of the code version

  • Random seeds

This file is all you need to reproduce the experiment.

Quick Reference

What you want
Where to find it

Final reward

total_reward_ma in last row of info/*_session_df_eval.csv

Training curves

*_trial_graph_mean_returns_ma_vs_frames.png (root folder)

Best hyperparameters

First row of info/experiment_df.csv

Model for inference

model/*_ckpt-best_net_model.pt

Reproduce this run

slm-lab run slm_lab/spec/benchmark/ppo/ppo_cartpole.json ppo_cartpole enjoy@data/ppo_cartpole_2026_01_30_221924/ppo_cartpole_t0_spec.json

TensorBoard data

log/ folder

Working with Results

Using SLM Lab's Analysis Module

SLM Lab uses Plotly for visualization. You can regenerate graphs using the retro_analysis module:

See Post-Hoc Analysis for more details.

Viewing Graphs

The generated PNG graphs can be opened directly. For interactive viewing, SLM Lab also generates HTML files with Plotly's interactive features (zoom, hover data).

Export for Publication

SLM Lab automatically creates a zip archive of the data folder. For sharing results:

  1. Upload the zip to cloud storage or HuggingFace

  2. Share the spec file for reproducibility

  3. Reference the git SHA for exact code version

See Public Benchmark Data for examples.

Last updated

Was this helpful?