Course · Setup & first stepsPhase 00 · Study guide

Can someone else reproduce your first result?

Onboarding · Local CPULaptop CPU4 lessons (~3.2h)

Revision v0.18.1 ·

Your first goal is to make one saved program produce an answer you can predict. When a notebook and a terminal disagree, the cause may be the interpreter, working folder or input file before JAX itself enters the picture. Record those choices beside the result so you can explain what actually ran. Follow the local CPU route first. The optional virtual-device branch later makes array ownership visible; the cloud branch adds an explicitly requested target and its runtime receipt. A matching answer establishes the checked arithmetic, while the backend and device fields explain where it happened.

Preparation: Basic Python; no previous JAX experience.

Runtime: CPU; the TPU bridge is optional accelerator practice

Tools, project folders and experiment organization: prepare a run directory and keep its configuration and evidence together.

Check your starting point

You saved a script in your course folder, but the terminal reports that the file does not exist. Which observation should you check first?

Compare your reasoning

Check the terminal’s current folder and the exact filename, including its extension. Then run the environment’s Python explicitly. Reinstalling JAX will not repair a wrong path. After the first array lesson, a CPU learner can continue to Arrays & pure functions. Virtual-device and cloud setup can wait until the placement and transformation concepts are familiar.

If this is unfamiliar, work through Set up your learning workspace before attempting the project.

Build in stages

1. Make one reproducible result

Run the row-sum example as a saved file. Record the Python executable, package versions, backend, input shape and computed sums. Explain why a package version alone cannot identify which interpreter ran the file.

2. Separate local practice from parallel TPU execution

Optional advanced branch: start a fresh process for virtual CPU devices and compare row-sharded versus replicated placement receipts. Beginners can continue directly from welcome-02 to Arrays & pure functions on CPU, then return after the transformation and sharding lessons. For physical TPU practice use only the named source-reviewed targets, pinned environments and explicit expected backend/topology checks; classify any additional script before staging it.

Try a changed condition

Make a prediction before opening the reasoning. Keep your answer and the evidence you would collect.

You have identical predictions on two computers, but one receipt says CPU and the other TPU. Which statements can you keep?

Compare an approach

Keep the tested numerical agreement and both environment records. Reject any claim of equal device performance: different compilation, synchronization and timing boundaries could explain differences. Reproduce one changed input before expanding the numerical claim.

Diagnose a likely failure

Symptom: Import works in a notebook but fails in the terminal.

Check next: Compare interpreter paths before changing packages; launch both from the intended environment.

Decide what is ready

Keep a saved script, its command and actual output, plus an explanation of one repaired setup error. Use foundation-toolkit stage 1. A screenshot without a rerunnable file is incomplete.

Where to put your project code

Write your code in: projects/welcome-audit/starter/model.py (copy projects/welcome-audit/starter/model.py first: cp projects/welcome-audit/starter/model.py projects/welcome-audit/starter/model.py).

Verify your implementation: python3 projects/welcome-audit/tests/check.py --stage all --impl projects/welcome-audit/starter/model.py

Run the staged project checks on your implementation in projects/welcome-audit/starter/model.py and record your transfer experiment results in your portfolio.

Open Check the CPU environment and a saved matrix arithmetic identity

Open Connect arrays, transformations and explicit state

What still needs further work

Fresh-machine Windows/Linux/macOS walkthroughs and novice usability sessions remain unverified; accelerator setup needs a separately observed device run. The optional placement branch is not a prerequisite for ordinary CPU lessons. Before taking it, explain which axis is split, what a replica holds and why jit input shapes affect specialization.