Skip to content

Commit 214e7d3

Browse files
jeremymanningclaude
andcommitted
Update documentation to highlight notebook widget and cost monitoring as key features
- Add %%clusterfy widget as Option 1 configuration method in SLURM, PBS, and Kubernetes tutorials - Update installation guide with Jupyter notebook support section - Add verification steps for magic command functionality - Create comprehensive API documentation for notebook_magic and cost_monitoring modules - Update main README and Sphinx index to prominently feature widget capabilities - Add notebook-specific examples and usage patterns throughout documentation 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 78b85b5 commit 214e7d3

File tree

9 files changed

+1134
-379
lines changed

9 files changed

+1134
-379
lines changed

README.md

Lines changed: 56 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@ Clustrix is a Python package that enables seamless distributed computing on clus
1111
## Features
1212

1313
- **Simple Decorator Interface**: Just add `@cluster` to any function
14+
- **Interactive Jupyter Widget**: `%%clusterfy` magic command with GUI configuration manager
1415
- **Multiple Cluster Support**: SLURM, PBS, SGE, Kubernetes, and SSH
1516
- **Automatic Dependency Management**: Captures and replicates your exact Python environment
17+
- **Native Cost Monitoring**: Built-in cost tracking for all major cloud providers
1618
- **Loop Parallelization**: Automatically distributes loops across cluster nodes
17-
- **Flexible Configuration**: Easy setup with config files or environment variables
19+
- **Flexible Configuration**: Easy setup with config files, environment variables, or interactive widget
1820
- **Error Handling**: Comprehensive error reporting and job monitoring
1921

2022
## Quick Start
@@ -59,6 +61,33 @@ result = expensive_computation(data, iterations=10000)
5961
print(f"Result: {result}")
6062
```
6163

64+
### Jupyter Notebook Integration
65+
66+
Clustrix provides seamless integration with Jupyter notebooks through an interactive widget:
67+
68+
```python
69+
import clustrix # Auto-loads the magic command
70+
71+
# Use the %%clusterfy magic command to open the configuration widget
72+
```
73+
74+
```jupyter
75+
%%clusterfy
76+
# Interactive widget appears with:
77+
# - Dropdown to select configurations
78+
# - Forms to create/edit cluster setups
79+
# - One-click configuration application
80+
# - Save/load configurations to files
81+
```
82+
83+
The widget includes pre-built templates for:
84+
- **Local Development**: Run jobs on your local machine
85+
- **AWS GPU Instances**: p3.2xlarge, p3.8xlarge templates
86+
- **Google Cloud**: CPU and GPU instance configurations
87+
- **Azure**: Virtual machine templates with GPU support
88+
- **SLURM HPC**: University cluster configurations
89+
- **Kubernetes**: Container-based execution
90+
6291
### Configuration File
6392

6493
Create a `clustrix.yml` file in your project directory:
@@ -91,6 +120,32 @@ environment_variables:
91120
92121
## Advanced Usage
93122
123+
### Cost Monitoring
124+
125+
Clustrix includes built-in cost monitoring for cloud providers:
126+
127+
```python
128+
from clustrix import cost_tracking_decorator, get_cost_monitor
129+
130+
# Automatic cost tracking with decorator
131+
@cost_tracking_decorator('aws', 'p3.2xlarge')
132+
@cluster(cores=8, memory='60GB')
133+
def expensive_training():
134+
# Your training code here
135+
pass
136+
137+
# Manual cost monitoring
138+
monitor = get_cost_monitor('gcp')
139+
cost_estimate = monitor.estimate_cost('n2-standard-4', hours_used=2.0)
140+
print(f"Estimated cost: ${cost_estimate.estimated_cost:.2f}")
141+
142+
# Get pricing information
143+
pricing = monitor.get_pricing_info()
144+
recommendations = monitor.get_cost_optimization_recommendations()
145+
```
146+
147+
Supported cloud providers: **AWS**, **Google Cloud**, **Azure**, **Lambda Cloud**
148+
94149
### Custom Resource Requirements
95150

96151
```python

0 commit comments

Comments
 (0)