Commit 3e82bad
feat: Revisit examples (#240)
* feat: add comprehensive machine learning tutorials
Add three complete tutorial examples demonstrating Runnable's ML capabilities:
**Data Science 101 Tutorial:**
- End-to-end ML pipeline with data loading, exploration, preprocessing,
training, and evaluation
- Uses scikit-learn with RandomForestClassifier on Iris dataset
- Demonstrates parameter passing, catalog management, and metrics tracking
- Includes comprehensive visualizations and model evaluation
**Model Comparison Tutorial:**
- Parallel model training and comparison using Runnable's Parallel execution
- Compares 4 ML algorithms: Random Forest, Logistic Regression, SVM, and KNN
- Features cross-validation, hyperparameter tuning, and performance
visualization
- Demonstrates advanced pipeline orchestration and result aggregation
**PyTorch Distributed Training Tutorial:**
- Single-node distributed training using PyTorch DistributedDataParallel (DDP)
- Multi-process coordination with gradient synchronization across 4 CPU cores
- Comprehensive checkpoint management with per-epoch, latest, and final saves
- **Process output capture**: All prints from distributed processes captured
- Advanced features: ProcessOutputCapture manager, TeeOutput for logging
- Complete training visibility with process-specific output files
**Key Features Added:**
- Tutorial dependency group with scikit-learn, matplotlib, seaborn, torch
- Comprehensive README documentation for each tutorial
- Production-ready code with proper error handling and logging
- Runnable catalog integration for artifact storage and reproducibility
- Advanced distributed training patterns with output capture
These tutorials serve as comprehensive examples for ML practitioners using
Runnable for data science workflows, model comparison, and distributed learning.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
* feat: add standard PyTorch examples with minimal runnable integration
Add comprehensive examples showing how runnable can execute standard PyTorch
code with only type annotations required. Demonstrates the minimal changes
needed to integrate existing PyTorch scripts with runnable orchestration.
Features:
- Standard PyTorch training scripts with argparse patterns
- Distributed training using PyTorch DDP
- Type-annotated functions for runnable compatibility
- Clean integration via PythonJob wrappers
- YAML parameter configuration
- Comprehensive documentation showing migration path
Key insight: 99% of existing PyTorch code remains unchanged, only requiring
type annotations to enable runnable's orchestration capabilities.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
* fix: bug in parameter when handling objects
* docs: Better examples and docs
* feat: add conditional parallel execution for local executors
- Add enable_parallel config option to local and local-container executors
- Implement parallel execution using multiprocessing.Pool for parallel and
map nodes
- Add supports_parallel_writes flag to run log stores (True for chunked-fs,
False for file-system)
- Graceful fallback to sequential execution with warning when parallel writes
not supported
- Only enable parallel execution for local executors with user opt-in via
config
- Add execute_single_branch function for multiprocessing execution
- Maintain backward compatibility with existing sequential behavior
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
* feat: output capture
* docs: improve code examples and fix documentation patterns
- Update mocking-testing.md with executable examples following main()
- Fix jobs-vs-pipelines.md by removing non-existent .as_pipeline()
- Enhance reproducibility.md with custom run ID examples
- Improve file-storage.md by removing duplicate sections
- Update first-job.md with comprehensive custom run ID docs
- Streamline jobs/index.md by removing premature error handling
- Enhance job-types.md focus and remove combining jobs section
- Expand parameters.md with argparse migration examples
- Add pipeline-parameters.md for pipeline-specific parameters
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
* docs: add comprehensive parallel execution support documentation
- Update executor overview with conditional parallel support
- Enhance local.md with detailed parallel execution examples
- Add parallel execution examples to local-container.md
- Improve run-log.md with parallel execution compatibility table
- Update parallel-execution.md with local configuration requirements
- Document enable_parallel config option and chunked-fs requirement
- Add automatic fallback behavior and compatibility information
- Include practical examples with configuration files
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
* docs: enhance job execution documentation for consistency and accuracy
Update all job execution documentation following established patterns:
- Fix code examples to use main() function pattern consistently
- Update command usage from `python` to `uv run` throughout
- Correct execute() parameter from config= to configuration_file=
- Add comprehensive configuration references based on actual classes
- Improve user experience with clear benefits, trade-offs, and upgrade paths
- Streamline troubleshooting sections with actionable guidance
- Enhance overview with better executor comparison and selection guidance
All job executors now maintain consistency with pipeline executor patterns.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
* docs: Extensions captured
* docs: Extensions captured
* docs: Extensions captured
* feat(tutorial): add getting started tutorial navigation structure
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
* feat(tutorial): add core ML functions for getting started tutorial
Add foundational ML functions for the getting started tutorial:
- Complete ML workflow functions (load, preprocess, train, evaluate)
- Sample dataset generation
- Model and results persistence
- Basic monolithic training function demonstrating common problems
This establishes the baseline "before Runnable" code that will be
progressively enhanced throughout the tutorial chapters.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
* feat(tutorial): add Chapter 1 - The Starting Point
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
* feat(tutorial): add Chapter 2 - Making It Reproducible
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
* feat(tutorial): add Chapter 3 - Adding Flexibility
Add parameterized ML functions with flexible configuration support.
Users can now run different experiments without code changes using
environment variables or YAML config files.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
* feat(tutorial): add Chapter 4 - Connecting the Workflow
Transform monolithic ML function into multi-step pipeline with automatic
data flow between steps. Shows how functions can be composed into pipelines
with step-by-step tracking and intermediate result preservation.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
* docs: add tutorial chapter 5 - handling large datasets
Add chapter demonstrating efficient file-based data management using Catalog.
Shows how to handle datasets larger than memory by storing intermediate
results as files instead of passing everything through memory.
Key concepts:
- Using Catalog(put=[...]) for storing files
- Using Catalog(get=[...]) for retrieving files
- File-based data flow for large datasets
- Mixing file storage with memory passing
Example script and documentation both tested successfully.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
* docs: add tutorial chapter 6 - sharing results
Add chapter demonstrating persistent storage of model artifacts and metrics
that can be shared across runs and team members.
Key concepts:
- Storing model artifacts in catalog
- Using metric() for tracking performance metrics
- Loading previously saved models
- Metrics tracked in run logs
- Performance history and comparison
Shows how to make results persistent beyond pipeline execution,
enabling model reuse and performance tracking over time.
Example script and documentation both tested successfully.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
* docs: add tutorial chapter 7 - running anywhere
Add final chapter demonstrating that the same pipeline code runs in
different environments without modification. Environment controlled
by configuration, not code changes.
Key concepts:
- Same code for local, container, and cloud execution
- Configuration-driven deployment
- Develop locally, deploy anywhere workflow
- Zero code changes between environments
- Production-ready portability
Completes the getting-started tutorial showing the full journey from
a simple ML function to a production-ready portable pipeline.
Example script and documentation both tested successfully.
All chapters 1-7 verified to run without errors.
Documentation builds successfully with mkdocs.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
* docs: Extensions captured
---------
Co-authored-by: Claude <[email protected]>1 parent 15de039 commit 3e82bad
File tree
151 files changed
+17349
-8987
lines changed- .claude/commands
- data_folder
- docs
- advanced-patterns
- compare
- comparisons
- concepts
- advanced-patterns
- building-blocks
- superpowers
- configurations
- executors
- job-executors
- getting-started
- jobs
- pipelines
- production
- job-execution
- pipeline-execution
- tutorial
- examples
- 03-parameters
- common
- configs
- tutorials
- data_science_101
- getting-started
- experiment_configs
- mnist
- model_comparison
- pytorch_distributed
- reddit_text_classification
- standard_pytorch
- visualization
- extensions
- job_executor
- nodes
- pipeline_executor
- run_log_store
- runnable
- tests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
151 files changed
+17349
-8987
lines changedLarge diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
182 | | - | |
| 182 | + | |
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
34 | 39 | | |
35 | 40 | | |
36 | 41 | | |
| |||
46 | 51 | | |
47 | 52 | | |
48 | 53 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
53 | 63 | | |
54 | 64 | | |
55 | 65 | | |
| |||
60 | 70 | | |
61 | 71 | | |
62 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
63 | 83 | | |
64 | 84 | | |
65 | 85 | | |
| |||
This file was deleted.
This file was deleted.
Lines changed: 56 additions & 43 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
42 | 47 | | |
43 | 48 | | |
44 | 49 | | |
| |||
60 | 65 | | |
61 | 66 | | |
62 | 67 | | |
| 68 | + | |
63 | 69 | | |
64 | 70 | | |
65 | 71 | | |
| |||
74 | 80 | | |
75 | 81 | | |
76 | 82 | | |
| 83 | + | |
77 | 84 | | |
78 | 85 | | |
79 | 86 | | |
| |||
106 | 113 | | |
107 | 114 | | |
108 | 115 | | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
116 | 125 | | |
117 | 126 | | |
118 | 127 | | |
119 | 128 | | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
127 | 138 | | |
128 | 139 | | |
129 | 140 | | |
130 | 141 | | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
138 | 151 | | |
139 | 152 | | |
140 | 153 | | |
| |||
0 commit comments