Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

1.9 HW1: Set Up Your Workbench

This page is Homework 1. It walks you through setting up the tools you will use all quarter: pixi for environments, git and GitHub for version control, and JupyterLab for notebooks. Each step ends in a state you can verify, so you always know whether it worked before moving on. Budget two to three hours, including about 45 minutes for the verification in step 8; ask for help early if a step fails.

By the end you will have: pixi and git installed, a GitHub account, your personal course repository MLGEO2026_UWNETID (replace UWNETID with your UW NetID), the course book running locally, a commit pushed to your own repository, an AGENTS.md that tells coding agents how to keep the repository reproducible, a VERIFICATION.md that compares how a person, an agent and two chatbots judged it, and an AI_logs/ folder that records every AI session behind the work.

AI logs: keep them from the first step

If an AI tool helps you with any part of this homework, keep the conversation. Git records what changed; the log records what you asked, what the tool proposed, and what you kept or rejected (see 6.4). Step 8 requires at least three AI sessions (one coding agent, two Purple models), so every repository will have logs.

Once your repository exists (step 3), create a folder AI_logs/ at its top. For each session, add one Markdown file named YYYY-MM-DD_tool_task.md, for example 2026-10-12_claude-code_agents-md.md, with this structure:

# 2026-10-12, Claude Code (model: <name>), HW1 Step 7: draft AGENTS.md
Commit before the session: <hash>   Commit after: <hash>

## Transcript
<the full conversation, exported or pasted>

## What I did with it
- Accepted: <what you kept as is>
- Changed: <what you edited, and why>
- Rejected: <what you threw out, and why>
- Verified: <how you checked what you kept>

Use the tool’s export where it has one (in Claude Code, /export saves the conversation); otherwise copy the conversation from the chat window. Then add AI_logs/README.md with the course disclosure table, one row per log file:

| Log | Tool | Task | What I verified |
|---|---|---|---|
| 2026-10-12_claude-code_agents-md.md | Claude Code | drafted AGENTS.md rules | ran each rule's check on one commit |

Your repository is public, so read each log before you commit it: remove tokens, passwords and personal details. A quick check is grep -n -i "token\|password\|ghp_" AI_logs/*.md. If you used no AI tool outside Step 8, say so in AI_logs/README.md; an honest “none” earns the points.

Step 1 — Install pixi

macOS / Linux / WSL2, in a terminal:

curl -fsSL https://pixi.sh/install.sh | sh

On macOS with Homebrew, brew install pixi works too. After installing, close and reopen the terminal so your shell picks up the new PATH.

Verify:

pixi --version

Success looks like: a version number prints, e.g. pixi 0.48.0. If the command is not found, restart the terminal; if it is still not found, the installer prints the line to add to your shell profile — add it and restart again.

Step 2 — Install git and create a GitHub account

Check whether git is already installed:

git --version

If not: on macOS, running that command triggers the Xcode Command Line Tools installer (accept it); on Ubuntu/WSL2, sudo apt install git.

Then:

  1. Create an account at github.com and set up two-factor authentication (see 1.5).

  2. Tell git who you are, using the same user name and email as the GitHub account:

    git config --global user.name "superseismo"
    git config --global user.email "superseismo@uw.edu"
  3. Install the GitHub CLI and authenticate:

    gh auth login

    Accept the defaults (GitHub.com, HTTPS, login with a web browser) and follow the browser prompts.

Verify:

git --version
gh auth status

Success looks like: git prints a version 2.40 or newer, and gh auth status reports Logged in to github.com with your user name.

Step 3 — Create your course repository

Create your personal course repository, named MLGEO2026_UWNETID (your NetID in capitals, e.g. MLGEO2026_SUPERSEISMO). This repository holds your homeworks and project work for the quarter. Create it once, with one command:

gh repo create MLGEO2026_UWNETID --public --add-readme --license mit --clone

This creates the repository on GitHub with a README and an MIT license, and clones it into a folder of the same name. Run it from the directory where you keep course work — outside cloud-synced folders such as Dropbox or Google Drive.

(No terminal? The browser equivalent is in 1.5; then clone it.)

Verify: open https://github.com/YOURUSERNAME/MLGEO2026_UWNETID in a browser.

Success looks like: the repository page loads and shows a README and a LICENSE file, and ls MLGEO2026_UWNETID on your computer shows the same files.

Step 4 — Clone the course book and install its environment

Clone the course repository and let pixi build the environment from the lockfile:

git clone https://github.com/geo-smart/mlgeo-book.git
cd mlgeo-book
pixi install

The first pixi install downloads a few gigabytes of packages; expect several minutes on a fast connection. Then launch JupyterLab from inside the environment:

pixi run jupyter lab

Verify: JupyterLab opens in your browser (or prints a http://localhost:8888/lab?token=... URL to open).

Success looks like: the JupyterLab interface loads and its file browser shows the book/ folder. Stop it later with Ctrl-C in the terminal.

Step 5 — Smoke test: run a notebook

A smoke test is a short, fast check that the basic machinery runs from start to finish: the packages import, a small calculation with a known answer returns that answer, and output appears. The name comes from hardware testing: switch the new device on and check that nothing starts smoking. A smoke test cannot show that a scientific result is right. It shows that the setup does not fail at once, in seconds instead of an hour into a real run. Run it first on any new machine and after every environment change. It is also the first thing another person runs to find out whether your repository works on their computer. This step smoke-tests the course book’s environment. Step 6 adds a smoke test to your own repository.

In JupyterLab, open any Chapter 1 notebook — for example book/Chapter1-GettingStarted/1.7_get_geodetic_gnss.ipynb — and run the first few cells (Shift-Enter).

Success looks like: the import cells complete without ModuleNotFoundError, and the first data or plot cell produces output. If imports fail, you are probably running a kernel outside the pixi environment: check that you launched JupyterLab with pixi run jupyter lab from the mlgeo-book directory.

Step 6 — Push a change to your own repository

Close the loop by pushing a commit to MLGEO2026_UWNETID. In a terminal, go to your repository from step 3, edit README.md (add a title line, your name, and one sentence on what you want out of this course), then:

git add README.md
git commit -m "Introduce myself in the README"
git push

While you are at it, add the course environment to your repository, so your own work is reproducible from day one. The book keeps a manifest written for student repositories in its environments/student/ folder. Copy it and its lockfile to the top of your repository, then install:

cp ../mlgeo-book/environments/student/pixi.toml ../mlgeo-book/environments/student/pixi.lock .
pixi install

(Adjust the ../mlgeo-book/ path if your folders live elsewhere.) Do not copy the book’s top-level pixi.toml instead. It installs the book’s own mlgeo_synth package from the book’s folder, which does not exist in your repository, so every pixi run there fails with “does not appear to be a Python project”; its build tasks also expect the book’s folders. The student manifest pins the same package versions as the book’s lockfile, installs mlgeo_synth from a snapshot of the book on GitHub, leaves out the tools that build the book, and adds pixi run lab to start JupyterLab in your repository. Because pixi reuses the packages it downloaded in step 4, this install takes a minute or two rather than several.

Now give your repository its own smoke test. Save this as smoke_test.py in the repository:

"""Smoke test: check that the course environment runs before doing real work."""
import platform

import numpy as np
import pandas as pd
import xarray as xr

# A calculation with a known answer: a line rising 2.5 mm/yr must give slope 2.5.
t = np.arange(0.0, 10.0, 0.1)
slope = np.polyfit(t, 2.5 * t + 1.0, 1)[0]
assert abs(slope - 2.5) < 1e-9, f"expected slope 2.5, got {slope}"

print(f"Python {platform.python_version()} on {platform.system()} {platform.machine()}")
print(f"numpy {np.__version__}, pandas {pd.__version__}, xarray {xr.__version__}")
print("smoke test passed")

Register it as a pixi task and run it:

pixi task add smoke "python smoke_test.py"
pixi run smoke

Success looks like: the last line printed is smoke test passed. Add a How to run section to README.md that names the command (pixi run smoke) and records the operating system and machine type from the first printed line, for example Tested on Darwin arm64. Then commit and push:

git add pixi.toml pixi.lock smoke_test.py README.md
git commit -m "Add course environment and smoke test"
git push

Verify: reload the repository page on GitHub.

Success looks like: your README edit, the two pixi files, and smoke_test.py are visible on GitHub, and the commits appear under Commits with your user name attached. In class on Wednesday Oct 7, a classmate will clone your repository and run pixi run smoke with only your README as a guide.

Step 7 — Write an AGENTS.md

An instruction file tells your coding agent how work is done in your repository. AGENTS.md is plain Markdown with no required fields (agents.md); what makes one useful is its structure and whether its rules can be checked. Session 3 derived one from the class rubric; now give MLGEO2026_UWNETID its own, organized around one goal: any result in this repository can be regenerated from a fresh clone with commands written down in the repository. An agent that follows the file should leave your repository more reproducible than it found it, never less.

Create AGENTS.md at the top of the repository with these six headings, in this order. The first is a short paragraph; each of the other five holds rules and maps onto a dimension of rubric v0.1 (Session 2):

HeadingRubric v0.1 dimension it servesWhat its rules control
ProjectScientific claimwhat the repository is for and what “reproducible” means here
Environment and computeEnvironment and computehow packages are installed and code is run
Data and provenanceData and provenancewhere data and published values come from, and how that is recorded
Code and workflowCode and workflowpaths, notebooks, and the commands that regenerate outputs
Reporting and creditPublication and credithow numbers are stated and how AI help is credited
VerificationEvaluationwhat the agent must run and show before it reports a result

Write at least five rules in total, with at least one under each of the five rule headings. Start from this template and adapt it:

# AGENTS.md for MLGEO2026_UWNETID

## Project
Course repository for ESS 469/569, Autumn 2026: homeworks and the final project.
Every number and figure here must be regenerated from a fresh clone using
the commands in README.md.

## Environment and compute
- Run all code through `pixi run`; add packages only with `pixi add`, and
  commit pixi.toml and pixi.lock together.
- Do not install packages with pip or conda outside pixi.

## Data and provenance
- Fetch values that a provider publishes (station coordinates, velocities,
  catalogs) and cite the URL and retrieval date; do not recompute or retype them.
- Download data with a script in this repository, not by hand, and record the
  dataset DOI or URL, version, and retrieval date in README.md.
- Never modify raw data files; write processed data to a separate folder.

## Code and workflow
- Use paths relative to the repository root; no absolute paths such as /Users/...
- Every notebook must run top to bottom after Restart Kernel and Run All Cells.
- Every reported number and figure comes from a command listed in README.md.

## Reporting and credit
- State the reference frame, units, and time window of every number.
- Mark AI-drafted commits: "AI-assisted: <tool>, <what it drafted>".

## Verification
- Run `pixi run smoke` before reporting any result, and show its last line.
- Report the exact commands you ran and the commit hash they ran on.
- If a check fails or a value cannot be fetched, say so; do not substitute an estimate.

Test each rule with two questions before you keep it. Can someone settle it yes or no by reading the agent’s transcript or your commits? Does it protect a rerun from a fresh clone? “Write clean code” fails the first question and does not count; “use descriptive variable names” passes the first and fails the second, so it belongs in a style section, not in these five.

Claude Code reads AGENTS.md when the repository has no CLAUDE.md; if you keep a CLAUDE.md as well, add the line @AGENTS.md to it so that both load. agents.md lists the other agents that read the file and how to configure them.

git add AGENTS.md
git commit -m "Add agent instructions from the class rubric"
git push

Success looks like: AGENTS.md is visible on GitHub with the six headings and at least five checkable rules, at least one under each rule heading. Later in the quarter, 6.3 turns a specification like this one into an evaluation set and measures whether an agent follows it.

Step 8 — Verify your repository three ways

A score of 2 on the class rubric means another team can verify it. In this step you collect three kinds of verification of the same commit and compare them: a person who reruns your repository, a coding agent that reruns it, and chatbots that only read it. They will not agree, and the disagreements are the point. Budget about 45 minutes.

Write down the commit that all three will check:

git rev-parse --short HEAD

Every verifier scores the same four rubric dimensions on the 0/1/2 scale (0 missing, 1 present but incomplete, 2 another team can verify it): Environment and compute, Code and workflow, Data and provenance, Publication and credit. Your repository has no dataset yet, so “Data and provenance” may honestly be N/A; a verifier that gives it a 2 is telling you something about the verifier.

8a. Human verification (runs the code). In class on Wednesday Oct 7, a classmate cloned your repository and ran pixi run smoke from your README. Record who it was, the date, the commit, what they ran, whether it passed, and where the README left them guessing. If you missed that session, ask a classmate now. Rerunning it yourself in an empty folder is the fallback, and you should say that you did, because the author is the weakest possible verifier.

8b. Agent verification (runs the code). Clone your repository into a fresh folder, so the agent cannot use anything on your machine that a stranger would not have, and start your coding agent there:

cd /tmp
git clone https://github.com/YOURUSERNAME/MLGEO2026_UWNETID verify_hw1
cd verify_hw1

Give it this prompt:

You are verifying that this repository is reproducible. Use only README.md and AGENTS.md as instructions. Install the environment, run the documented commands, and list every command you ran with the last line of its output. Then score the repository 0, 1, 2 or N/A on Environment and compute, Code and workflow, Data and provenance, and Publication and credit (0 missing, 1 present but incomplete, 2 another team can verify it), quoting the file and line that supports each score. Do not edit any file.

Then check the agent, not just its answer: do the commands it lists appear in its actual tool calls, and does git status in verify_hw1 show no changes? Save the session to AI_logs/ in your own repository, not in verify_hw1.

8c. Chatbot verification with UW Purple (reads, does not run). Purple is UW’s own AI platform: sign in at purple.uw.edu with your UW NetID. UW-IT states that what you enter is not used to train public models, and that Purple gives access to several models in one place. Run the prompt below with at least two different models and save each conversation as its own file in AI_logs/:

Here is the public GitHub repository https://github.com/YOURUSERNAME/MLGEO2026_UWNETID at commit . First, quote the first line of README.md and the first line of smoke_test.py exactly. If you cannot open the repository, say so and stop. Then score it 0, 1, 2 or N/A on Environment and compute, Code and workflow, Data and provenance, and Publication and credit (0 missing, 1 present but incomplete, 2 another team can verify it), quoting the file and line that supports each score.

The first request is a reading check. Compare the quoted lines with your files: a model that quotes lines your repository does not contain has scored a repository it never saw. Record that as a finding about the model, not as a failure of yours. If a model says it cannot open the link, upload README.md, AGENTS.md, pixi.toml and smoke_test.py as files and ask again. Share only what is already public in your repository; never paste tokens or passwords.

8d. Compare and report. Create VERIFICATION.md at the top of the repository with the commit hash and this table:

VerifierTool and modelRan the code?Read the repo correctly?Environment and computeCode and workflowData and provenancePublication and credit
Human: namenoneyesyes
Agente.g. Claude Code, model nameyes
ChatbotPurple, model 1no
ChatbotPurple, model 2no

Below the table, write three to five sentences: where the verifiers disagree; which one you trust for Environment and compute, and why; and one change you made to README.md or AGENTS.md because of what they found. Commit that change and VERIFICATION.md:

git add VERIFICATION.md README.md AGENTS.md AI_logs/
git commit -m "Record human, agent and chatbot verification of HW1"
git push

Success looks like: VERIFICATION.md is visible on GitHub with the commit hash, four rows (one human, one agent, two Purple models), and your comparison. The same comparison returns in 6.2 on Oct 23, where model graders get bias controls, and in 6.3 on Nov 13, where one run becomes many.

Done — and what to submit

You now have a working workbench: a pinned environment that runs the book’s notebooks, and a repository that records your work, states how to check that it runs, and tells an agent how to work in it. Submit the URL of your MLGEO2026_UWNETID repository on Canvas by Wednesday October 14, 11:59 pm; the link is the submission for this assignment. The grader clones the repository as it stands at the deadline and reads its commit history, README.md, AGENTS.md, VERIFICATION.md and AI_logs/.

Two follow-ups:

Grading rubric (10 points)

Five criteria, each scored on the class rubric scale: 0 missing, 1 present but incomplete, 2 another team can verify it. The score is the points, so the total is out of 10.

A 2 does not simply mean “it works”. It means someone other than you can confirm the criterion from the repository alone, without asking you. For criterion 1, that does mean the code runs in a fresh clone; “it works on my laptop” scores 1 at most. For the records (criteria 3 to 5), it means the record is complete enough to check, even when what it records is a failure: a VERIFICATION.md showing, with evidence, that a model scored a repository it never read earns a 2. A claim without inspectable evidence, such as “verified everything”, scores 1. The grader works from a fresh clone of your repository at the deadline, so evidence that exists only on your laptop scores 0.

#CriterionWhat earns a 2StepsPoints
1Reproducible workbenchPublic MLGEO2026_UWNETID with a LICENSE; the student pixi.toml and pixi.lock committed together; in a fresh clone, pixi install then pixi run smoke prints smoke test passed; the README “How to run” section names the command and the machine it was tested on3, 62
2AGENTS.mdThe six headings in order, the Project paragraph stating the reproducibility goal, and at least five rules, at least one under each rule heading, each settled yes or no from a transcript or a commit72
3Verification recordVERIFICATION.md names the commit and fills four rows (human, agent, two Purple models), including the reading check for each model8a to 8c2
4Comparison and fixThree to five sentences on where the verifiers disagree and which one you trust and why, and one resulting change committed to README.md or AGENTS.md8d2
5AI logs and commit historyAI_logs/ holds one file per AI session, each ending with what you accepted, changed, rejected and verified, and AI_logs/README.md has the disclosure table; work is committed as it happened, with AI-drafted commits marked “AI-assisted: , ”all2
Total10