📁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 0s0= 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:
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:
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 highesttotal_reward_maduring training*_net_model.pt: Model at the end of training (nockpt-prefix)
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
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:
Upload the zip to cloud storage or HuggingFace
Share the spec file for reproducibility
Reference the git SHA for exact code version
See Public Benchmark Data for examples.
Last updated
Was this helpful?