Skip to main content

Running Code

To execute code cells, your notebook needs a kernel — a computational engine provided by a project.

Connecting to a Project

  1. Open your notebook
  2. Select Organization
  3. Select Project
Once connected, run cells with Shift + Enter.

Execution Methods

MethodShortcutBehavior
Run cellShift + EnterExecute and select next
Run in placeCtrl/Cmd + EnterExecute without moving
Run and insertAlt + EnterExecute and add cell below
Run allToolbar buttonExecute all cells

Cell Outputs

Alph renders various output types:
  • Text & data: print statements, return values, dataframes
  • Visualizations: matplotlib, plotly, seaborn, altair
  • Rich media: LaTeX, images, HTML, widgets
  • Errors: tracebacks with highlighted source

Kernel Management

Restart kernel: Clear all variables and reset state. Use after installing packages. Interrupt: Stop a running cell using the toolbar button. Kernel states:
  • Idle — ready to execute
  • Busy — running code
  • Dead — crashed, needs restart

Installing Packages

# pip
!pip install pandas numpy

# conda
!conda install -c conda-forge xgboost
Restart the kernel after installing packages.

Troubleshooting

Kernel won’t connect:
  • Check that the project is running
  • Disconnect other notebooks using the kernel
  • Restart the project
Out of memory:
  • Delete large unused variables with del
  • Process data in chunks
  • Upgrade compute type
Slow execution:
  • Use vectorized operations (pandas/numpy)
  • Profile code to find bottlenecks
  • Consider GPU compute for ML workloads