Interactive Onboarding & Learner Guide π§
Raylings provides a rich, multi-tiered onboarding workflow designed to ensure your system is properly configured, familiarise you with distributed concepts, and integrate seamlessly into your favorite IDE.
πΊοΈ The 5-Step Guided Tour (raylings tour)
Raylings includes an interactive guided tour that introduces you to core distributed computing primitives, exercise mechanics, and CLI productivity workflows.
To start the tour interactively:
You can also run non-interactively in automated setups or CI:
Or jump directly to a specific step (1β5):
For programmatic integrations, extract all tour steps as JSON:
Tour Step Breakdown
flowchart TD
S1["Step 1: Core Primitives<br/><i>Tasks, Actors, Plasma</i>"] --> S2["Step 2: Preflight Doctor<br/><i>5-point health check</i>"]
S2 --> S3["Step 3: First Exercise<br/><i>basics01 & @ray.remote</i>"]
S3 --> S4["Step 4: Live Watcher<br/><i>Keyboard navigation</i>"]
S4 --> S5["Step 5: VS Code Integration<br/><i>Sidebar & Status Bar</i>"]
Step 1: Welcome & Distributed Primitives
- Focus: What Ray is and how Raylings structures learning.
- Key Concepts: Ray Core, tasks, actors, futures (
ObjectRef), and the unified AI compute ecosystem. - Suggested Command:
raylings list
Step 2: Environment & Preflight Diagnostics
- Focus: Verifying Python 3.10+, Ray runtime, cluster health, and system capacity.
- Key Concepts: Automated preflight checks, local cluster detection, daemon management.
- Suggested Command:
raylings doctor
Step 3: Solving Your First Exercise (basics01.py)
- Focus: Understanding the exercise workflow,
# TODO:prompts, andverify()assertions. - Key Concepts: Decorating functions with
@ray.remote, asynchronous scheduling with.remote(), blocking retrieval withray.get(). - Suggested Command:
raylings run exercises/01_basics/basics01.py
Step 4: Interactive Watcher & Keystroke Controls
- Focus: Continuous feedback loop and hotkey navigation.
- Key Controls:
[n]Next,[p]Previous,[r]Rerun,[h]Hint,[q]Quit. - Suggested Command:
raylings watch
Step 5: Native VS Code & IDE Experience
- Focus: Enhancing productivity with the dedicated VS Code extension.
- Key Features: Sidebar curriculum tree, real-time status bar cluster health, auto-run on save.
- Suggested Command:
code .
π Preflight Diagnostics (raylings doctor)
Before working through advanced chapters like Ray Train DDP or KubeRay, ensure your development workstation satisfies all system requirements using raylings doctor.
Preflight Diagnostics Summary
βββββββββββββββββββββββββββββ³βββββββββ³βββββββββββββββββββββββββββββββββ
β Diagnostic Check β Status β Details β
β‘ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©
β Python Version β β PASS β Python 3.12.3 (>= 3.10) β
β Ray Installation β β PASS β Ray v2.43.0 installed β
β Ray Daemon / Cluster β β PASS β Cluster session active β
β Exercises Manifest β β PASS β Found 81 exercises in 18 chap β
β System Resources β β PASS β 10 logical CPUs, 32.0 GB RAM β
βββββββββββββββββββββββββββββ΄βββββββββ΄βββββββββββββββββββββββββββββββββ
Summary: 5 passed, 0 warnings, 0 failed
The 5 Diagnostic Checks
| Check Name | Target Requirement | Status | Critical? | Troubleshooting Recipe |
|---|---|---|---|---|
| Python Version | Python >= 3.10 |
PASS / FAIL |
Yes | Upgrade Python via uv python install 3.12 or pyenv. |
| Ray Installation | ray importable and healthy |
PASS / FAIL |
Yes | Run uv pip install ray[default] or pip install ray. |
| Ray Daemon / Cluster | Background cluster reachable | PASS / WARN |
No | Auto-starts during exercises, or run raylings daemon start. |
| Exercises Manifest | exercises/ populated with 81 files |
PASS / WARN |
No | Run raylings init to extract bundled exercises. |
| System Resources | Minimum 2 CPUs and >= 4GB RAM | PASS / WARN |
No | Warning shown if running on single-core containers. |
JSON Diagnostic Payloads
Integrate health checks into CI pipelines or editor status badges with --json:
{
"status": "healthy",
"passed": true,
"summary": {
"total": 5,
"passed": 5,
"warnings": 0,
"failed": 0
},
"checks": [
{
"name": "Python Version",
"status": "pass",
"critical": true,
"details": "Python 3.12.3 (>= 3.10 supported)"
},
{
"name": "Ray Installation",
"status": "pass",
"critical": true,
"details": "Ray v2.43.0 installed and importable"
}
]
}
π» VS Code Native Extension
Raylings provides a first-class editor extension located in editors/vscode that turns VS Code or Cursor into a dedicated Ray learning IDE.
graph LR
subgraph VSCode["VS Code / Cursor"]
TreeView["Curriculum Tree View (Sidebar)"]
StatusBar["Cluster & Progress Status Bar"]
Commands["Command Palette (Cmd+Shift+P)"]
Walkthrough["Interactive Walkthrough"]
end
subgraph RaylingsCLI["Raylings CLI Driver"]
JSONAPI["JSON Engine (--json)"]
DaemonCtrl["Daemon Controller"]
end
TreeView --> JSONAPI
StatusBar --> JSONAPI
Commands --> DaemonCtrl
Installation
Install Raylings: Master Python Ray directly from the VS Code Marketplace or via command line:
# For Visual Studio Code
code --install-extension dnf0.raylings-vscode
# For Cursor
cursor --install-extension dnf0.raylings-vscode
Key Extension Features
- Curriculum Explorer Tree View:
- Displays all 18 chapters in an expandable sidebar view.
- Distinct icons for completed (
β), pending (β), and active (βΊ) exercises. -
Click any exercise to open it immediately in the editor.
-
Status Bar Cluster & Progress Monitor:
- Shows live cluster status (e.g.
$(zap) Ray: 4 Nodes | 12/81 Done). -
Click to open the Ray Dashboard or trigger preflight diagnostics.
-
Auto-Run on File Save:
- Automatically invokes
raylings runon the active exercise when saved. -
In-editor diagnostic output and inline problem highlighting.
-
Progressive Hint Peek:
- Reveal hints directly in the editor using the
Raylings: Show Hintcommand without switching to a terminal window.
Command Palette Integration
Open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P) and type Raylings:
Raylings: Open Interactive Tourβ Launch the built-in walkthrough (raylings.welcome).Raylings: Start Watcherβ Open an integrated terminal withraylings watch.Raylings: Run Active Exerciseβ Execute current file withraylings run.Raylings: Show Hint for Current Exerciseβ Display progressive hint level.Raylings: Run Preflight Diagnosticsβ Executeraylings doctor.Raylings: Start / Stop Ray Daemonβ Manage background cluster session.
πΎ Progress Tracking & State Management
Raylings tracks your completion progress using a lightweight JSON state file located at .raylings_state.json in your workspace root.
How State is Updated
- When you run an exercise via
raylings watchorraylings run: - It executes the Python script in an isolated subprocess.
- If the script exits with status code
0(allverify()assertions pass), the exercise is marked as completed. - The state tracker writes the result to
.raylings_state.json:
Inspecting Your Progress
View overall completion statistics and your current active exercise:
Output:
Progress: [====================> ] 33.3% (27/81 completed)
Current Exercise: exercises/05_fault_tolerance/fault01.py
Or query in machine-readable JSON:
{
"total": 81,
"completed": 27,
"percentage": 33.3,
"current_exercise": "fault01",
"current_path": "exercises/05_fault_tolerance/fault01.py",
"is_finished": false
}
Resetting Progress
To reset your progress and start over, simply delete .raylings_state.json or reset your exercises via git.