Understanding Execution
To run code in Alph notebooks, you need a kernel - a computational engine that executes your code and returns results. Alph provides two ways to get a kernel:- Projects: Full-featured cloud compute environments (recommended)
- Quick Execute: Serverless execution (coming soon)
Projects and Kernels
Projects are Docker-based computational environments running on Alph’s cloud infrastructure.What is a Project?
A project provides:- Jupyter kernel: Python, R, or Julia execution environment
- Compute resources: CPU, memory, and optional GPU
- Persistent storage: Files and data persist across sessions
- Terminal access: Full shell access to the environment
- Port forwarding: Run web apps and services
Creating a Project
1
Navigate to Projects
From your organization dashboard, click Projects
2
Create new project
Click New Project and configure:Basic Settings:
- Name: Descriptive project name
- Slug: URL-friendly identifier
- Micro: 0.5 CPU, 1GB RAM (free tier)
- Small: 2 CPU, 4GB RAM (Pro tier)
- GPU: 4 CPU, 16GB RAM, T4 GPU (Expert tier)
- Python version: 3.9, 3.10, 3.11
- Conda/pip: Pre-install packages
3
Launch project
Click Create - your project will start in ~30-60 seconds
Connecting a Notebook to a Project
- From Notebook Editor
- From Project Page
- Open your notebook
- Click the Kernel dropdown in the toolbar
- Select Connect to Project
- Choose your project from the list
- Kernel connects automatically
One kernel can only connect to one notebook at a time. Multiple notebooks can use the same project, but you’ll need to disconnect one before connecting another.
Running Cells
Once connected to a kernel, you can execute code cells.Execution Methods
| Method | Shortcut | Behavior |
|---|---|---|
| Run cell | Shift + Enter | Execute and select next cell |
| Run in place | Ctrl/Cmd + Enter | Execute without moving selection |
| Run and insert | Alt + Enter | Execute and insert new cell below |
| Run all | Toolbar button | Execute all cells top to bottom |
| Run selected | Toolbar button | Execute multiple selected cells |
Execution Status
Cells show their execution state:Queued
[*] - Waiting to executeRunning
[*] - Currently executing (animated)Complete
[5] - Execution number shownCell Outputs
Alph renders various output types:- Text & Data
- Visualizations
- Rich Media
- Errors
- Print statements
- Return values
- Dataframe displays
- JSON output
- HTML rendering
Kernel Management
Kernel States
Your kernel can be in several states:- Idle: Ready to execute code
- Busy: Currently running code
- Starting: Kernel is initializing
- Dead: Kernel crashed or stopped
- Disconnected: Connection lost
Kernel Operations
Restart Kernel
Restart Kernel
Restart to clear all variables and reset state:
- Click Kernel menu
- Select Restart Kernel
- Optionally run all cells after restart
- After installing packages
- When variables are in unexpected state
- To ensure reproducibility
Interrupt Kernel
Interrupt Kernel
Stop currently running code:
- Click the Stop button (or press
I I) - Kernel attempts to interrupt execution
- Code is taking too long
- You notice an error and want to stop
- Infinite loop is running
Shutdown Kernel
Shutdown Kernel
Completely stop the kernel:
- Disconnect notebook
- Stop project (optional)
Installing Packages
Add Python packages to your project environment.Using pip
Using conda
Pre-installed Packages
Alph projects come with common data science packages:- Data: pandas, numpy, polars
- Viz: matplotlib, seaborn, plotly
- ML: scikit-learn, xgboost
- DL: tensorflow, pytorch (GPU projects)
- Utils: requests, beautifulsoup4, jupyter
Working with Data
Loading Data Files
- Upload Files
- From URLs
- From GitHub
- From Cloud Storage
Upload files through the project interface:
- Navigate to your project
- Click Files tab
- Drag and drop or click to upload
- Access from notebook:
Environment Variables
Set environment variables for API keys and configuration:Terminal Access
Projects provide full terminal access for advanced operations.Opening a Terminal
- Navigate to your project
- Click Terminals tab
- Click New Terminal
Common Terminal Tasks
Resource Management
Monitoring Usage
Track resource consumption:- CPU usage: Real-time CPU utilization
- Memory: RAM usage and available
- Disk: Storage used/available
- GPU (if applicable): GPU memory and utilization
Compute Limits
Different compute types have different limits:| Type | CPU | RAM | GPU | Storage |
|---|---|---|---|---|
| Micro | 0.5 core | 1GB | - | 10GB |
| Small | 2 cores | 4GB | - | 50GB |
| GPU | 4 cores | 16GB | T4 | 100GB |
Upgrade compute
Need more resources? Upgrade your plan
Auto-shutdown
Projects auto-shutdown after inactivity to save resources:- Hobby tier: 1 hour of inactivity
- Pro tier: 4 hours of inactivity
- Expert tier: 12 hours of inactivity
Troubleshooting
Kernel won't connect
Kernel won't connect
Possible causes:
- Project is stopped or starting
- Another notebook using the kernel
- Network connectivity issues
- Check project status
- Disconnect other notebooks
- Refresh the page
- Restart the project
Out of memory errors
Out of memory errors
Symptoms:
MemoryError or kernel crashesSolutions:- Process data in chunks
- Delete large unused variables with
del - Restart kernel to clear memory
- Upgrade to larger compute type
Slow execution
Slow execution
Causes: Insufficient resources, inefficient codeSolutions:
- Profile code to find bottlenecks
- Vectorize operations (use pandas/numpy)
- Upgrade compute type
- Use GPU for ML workloads
Package conflicts
Package conflicts
Issue: Packages won’t install or conflictSolutions:
- Create fresh conda environment
- Use virtual environment
- Pin package versions
- Check compatibility