Reference: Save and Load Training Sessions
BojAI allows you to save and load complete training sessions.
You can use these features from both the CLI and UI, making it easy to pause, resume, or revisit past experiments.
Saving a Session
Example of Saved JSON
{
"model_name": "YourModel",
"hyperparameters": {
"batch_size": 32,
"learning_rate": 0.00001
},
"loggs": {
"0": {"train": 0.87, "valid": 0.83, "loss": 0.6},
"1": {"train": 0.89, "valid": 0.85, "loss": 0.4}
},
"timestamp": "2025-04-19T18:00:00",
"model_weights": "your_session_model.bin"
}
Loading a Session
To resume from a saved session you can load a session, this will:
- Load the model weights from
{session_name}_model.bin
- Restore your hyperparameters
- Restore the logger’s training and evaluation logs
- Print the logs to confirm successful loading
If either file is missing, a message will be shown and loading is aborted.
Files Saved per Session
File | Purpose |
---|---|
{name}_model.bin |
Model weights saved with torch.save |
{name}_session.json |
Metadata and training logs |
These files are located inside the train_sessions/
folder inside the applets
folder.
Use Cases
- Resume training from where you left off
- Visualize training/evaluation without retraining
- Track experiments with timestamped logs
- Share sessions across machines
Let me know if you’d like session versioning, auto-saving, or cloud integration added next!