Skip to content

Model Persistence Examples

This directory contains examples demonstrating the model persistence functionality in deep-river.

Files

  • model_persistence_demo.ipynb - Comprehensive demonstration of saving and loading models

What you'll learn

The notebook covers:

  1. Basic Model Persistence - Save and load classification and regression models
  2. Model Information - Inspect saved models before loading
  3. Continued Training - Resume training from saved checkpoints
  4. Error Handling - Robust error handling and best practices
  5. Model Comparison - Verify model integrity after loading

Key Features Demonstrated

  • Saving PyTorch model weights and architecture
  • Preserving River model state for incremental learning
  • Storing model configuration and hyperparameters
  • Training metadata and statistics preservation
  • Cross-session model persistence
  • Production deployment readiness

Usage

Open the notebook in Jupyter Lab or VS Code and run the cells sequentially to see the complete persistence workflow in action.

The examples use standard datasets from the River library and demonstrate realistic training scenarios.