|
1 | | -# ZenML VS Code Tutorial Extension - Developer Guide |
| 1 | +# Welcome to the ZenML Interactive Tutorial Extension 👋 |
2 | 2 |
|
3 | | -Development repository for contributors working on the ZenML VSCode Tutorial Extension. |
| 3 | +This VS Code extension provides an interactive, hands-on learning experience for ZenML - the open-source MLOps framework. Master ZenML fundamentals through 10 guided pipeline examples with step-by-step tutorials and one-click execution! |
4 | 4 |
|
5 | 5 | <div style="display: flex; justify-content: center;"> |
6 | 6 | <img src=".devcontainer/assets/welcome-page.png" alt="Welcome page screenshot" width="1000" /> |
7 | 7 | </div> |
8 | 8 |
|
9 | | -## 🚀 Quick Start |
10 | 9 |
|
11 | | -### Prerequisites |
12 | 10 |
|
13 | | -- [Node.js](https://nodejs.org/en/download/) |
14 | | -- [VS Code](https://code.visualstudio.com/Download) |
15 | | -- [Docker](https://www.docker.com/get-started/) |
16 | | -- [Dev Containers Extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) |
17 | | - |
18 | | -### Setup |
19 | | - |
20 | | -1. **Clone & install**: |
21 | | - |
22 | | - ```bash |
23 | | - git clone https://github.com/zenml-io/vscode-tutorial-extension |
24 | | - cd vscode-tutorial-extension |
25 | | - npm install && npm run compile |
26 | | - ``` |
27 | | - |
28 | | -2. **Open in VS Code** and reopen in dev container when prompted |
29 | | - |
30 | | -3. **Test the extension**: Press `F5` or use Run and Debug panel → "Run Extension" |
31 | | - |
32 | | -**⚠️ Important**: Always run in dev container - the extension expects this environment. |
33 | | - |
34 | | -## 🛠️ Development Workflow |
35 | 11 |
|
36 | | -### Making Changes |
| 12 | +## ✨ What You'll Learn |
37 | 13 |
|
38 | | -The extension runs in two places: |
| 14 | +- **Pipeline Fundamentals** - Create your first ZenML pipeline |
| 15 | +- **Data Flow** - Pass data between pipeline steps |
| 16 | +- **Parameters** - Make pipelines flexible with parameters |
| 17 | +- **Organization** - Tag and organize your pipeline runs |
| 18 | +- **Tracking** - Log metadata to record useful facts about runs |
| 19 | +- **Visualizations** - Create automatic & custom charts |
| 20 | +- **Performance** - Use caching and parallel processing |
| 21 | +- **Reliability** - Handle errors with retries and hooks |
| 22 | +- **Configuration** - Use YAML to separate configuration from code |
39 | 23 |
|
40 | | -- **Development** (this repo) |
41 | | -- **User-facing** ([vscode-tutorial repo](https://github.com/zenml-io/vscode-tutorial)) |
| 24 | +**10 Progressive Tutorials** that build from basic concepts to advanced ZenML patterns. |
42 | 25 |
|
43 | | -**After making changes**, you need to: |
44 | | - |
45 | | -1. **Build extension**: |
46 | | - |
47 | | - ```bash |
48 | | - npm run buildExtension |
49 | | - ``` |
50 | | - |
51 | | - _This packages the extension and replaces the current one in `.devcontainer/extensions/`_ |
52 | | - |
53 | | -2. **Test in user environment**: Test changes in both GitHub Codespaces and local dev containers |
54 | | - |
55 | | -### File Structure |
56 | | - |
57 | | -- **Extension code**: Main TypeScript files |
58 | | -- **Tutorial content**: `pipelines/` directory |
59 | | -- **Tutorial structure**: `tutorialMetadata.json` |
60 | | -- **Entry point**: `extension.ts` → `Tutorial` class |
| 26 | +<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 20px;"> |
| 27 | + <img src="assets/architecture.png" alt="Architecture" /> |
| 28 | +</div> |
61 | 29 |
|
62 | | -### Editing Content |
| 30 | +## 🚀 Get Started |
63 | 31 |
|
64 | | -**Quick text edits**: |
| 32 | +### GitHub Codespaces (Recommended) |
65 | 33 |
|
66 | | -- Uncomment the "edit text" button in WebView HTML |
67 | | -- Edit markdown files directly |
68 | | -- Save (`Cmd+S`) → Reload extension (`Cmd+R`) |
| 34 | +The fastest way to get started - no local setup required. |
69 | 35 |
|
70 | | -**Adding/reorganizing steps**: |
| 36 | +1. Click **Code ▶ Codespaces ▶ Create codespace on develop** |
| 37 | +2. Wait ~2 min for setup (container, dependencies, extension) |
| 38 | +3. The extension will launch automatically |
71 | 39 |
|
72 | | -- Edit `tutorialMetadata.json` |
73 | | -- Each section has steps with optional `doc` (markdown) and `code` (Python) files |
| 40 | +### 💻 Alternative: Local Setup |
74 | 41 |
|
75 | | -### 🔔 Pipeline Health Checks |
| 42 | +**Requirements:** |
76 | 43 |
|
77 | | -**Workflow**: [`.github/workflows/test-pipelines.yml`](.github/workflows/test-pipelines.yml) |
| 44 | +- [Docker Desktop](https://www.docker.com/products/docker-desktop) |
| 45 | +- [VS Code](https://code.visualstudio.com/) |
| 46 | +- [Dev Containers Extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) |
78 | 47 |
|
79 | | -| Trigger | Action | Alert | |
80 | | -| -------------------------------------------------- | -------------------------------------------- | --------------------------------------------------------------------------------- | |
81 | | -| Daily @ 09:00 UTC + on push/PR to `main`/`develop` | Run all tutorial pipelines with latest ZenML | On any failure, sends a single message to `#sre-alerts` via `DISCORD_WEBHOOK_SRE` | |
| 48 | +**Steps:** |
82 | 49 |
|
83 | | -This ensures we catch any breaking changes in ZenML or our tutorials before users do. |
| 50 | +1. Clone this repo & open in VS Code |
| 51 | +2. Click **Reopen in Container** when prompted |
| 52 | +3. Extension starts automatically |
84 | 53 |
|
85 | | -## 🐳 Docker Image |
| 54 | +## 🎓 Tutorial Structure |
86 | 55 |
|
87 | | -The user-facing repository uses a pre-built Docker image for faster startup. |
| 56 | +| Tutorial | Topic | Skills | |
| 57 | +| -------- | --------------- | ------------------------ | |
| 58 | +| 1 | Hello World | Basic pipeline creation | |
| 59 | +| 2 | Step I/O | Data flow between steps | |
| 60 | +| 3 | Parameters | Pipeline configuration | |
| 61 | +| 4 | Tagging | Run organization | |
| 62 | +| 5 | Metadata | Logging and tracking | |
| 63 | +| 6 | Caching | Performance optimization | |
| 64 | +| 7 | Visualizations | Charts and plots | |
| 65 | +| 8 | Fan-out/Fan-in | Parallel processing | |
| 66 | +| 9 | Retries & Hooks | Error handling | |
| 67 | +| 10 | YAML Config | Configuration management | |
88 | 68 |
|
89 | | -**To update the image**: |
| 69 | +## 🎮 How to Use |
90 | 70 |
|
91 | | -1. Switch to `docker-image-build` branch |
92 | | -2. Build and push following [Docker's guide](https://docs.docker.com/guides/getting-started/build-and-push-first-image/) |
93 | | -3. Update `devcontainer.json` to reference new image: `"image": "zenml/tutorial:latest"` |
| 71 | +- **Run** pipelines via the “Run Pipeline” button |
| 72 | +- **Navigate** with Previous/Next buttons |
| 73 | +- **Inspect** output in the terminal and Dashboard link |
| 74 | +- **Experiment** by editing any example code |
94 | 75 |
|
95 | | -## 📚 Resources |
| 76 | +## 🛟 Getting Help |
96 | 77 |
|
97 | | -- [ZenML Documentation](https://docs.zenml.io/) |
98 | | -- [VS Code Extension API](https://code.visualstudio.com/api) |
| 78 | +- **📖 ZenML Docs**: [docs.zenml.io](https://docs.zenml.io) |
| 79 | +- **💬 Community**: [ZenML Slack](https://zenml.slack.com/ssb/redirect) |
| 80 | +- **🐛 Issues**: [GitHub Issues](https://github.com/zenml-io/vscode-tutorial/issues) |
0 commit comments