Skip to content

Add a plain-language start guide and three Colab notebooks - #45

Merged
noelEOS merged 9 commits into
mainfrom
docs/reader-notebooks
Nov 8, 2026
Merged

noelEOS merged 9 commits into
mainfrom
docs/reader-notebooks

Conversation

@noelEOS

@noelEOS noelEOS commented Nov 8, 2026

Copy link
Copy Markdown
Owner

A plain-language start guide and three Colab notebooks, for readers who use neither the command line nor a coding agent. No library code changes.

Base: 7b1f5db.

Changed files

Docs

  • docs/start-here.md (new): what TensorEE does and does not do, three ways in (Code Editor demo, quickstart, bring your own model), a short glossary, and what a run costs in Earth Engine quota.
  • README.md, docs/README.md: link the guide and the notebooks first.

Notebooks (notebooks/, new)

  • 01_quickstart.ipynb:
    • Runs the trained water U-Net on one 224 × 224 Sentinel-1 chip at a place the reader picks, and shows it on a map.
    • Enter a project in one form field, then Run all.
    • Needs no checkpoint: it fills the Code Editor demo's stored computation, which reads the public weight tables.
    • Prints export progress. The map waits for the export and uses Esri base layers.
  • 02_is_my_model_supported.ipynb:
    • Fully offline.
    • Shows a supported SMP U-Net and refused LinkNet and DeepLabV3+ models, each with the reason.
    • Shows the converter's reports for SegFormer-B0/B1.
    • Has a cell for the reader's own model.
  • 03_bring_your_own_cnn.ipynb:
    • Takes an SMP U-Net checkpoint to Earth Engine: check, plan tiles, upload weights, export a test tile, compare with PyTorch, export a region.
    • One RUN_UP_TO setting chooses how far to go. Finished steps are skipped, so Run all is safe to repeat.
    • Without a checkpoint, it runs a small random-weight demo on public Sentinel-1. The notebook says the demo's map is meaningless.
    • The region export runs only after a comparison within 1e-4 in the same run.

Every notebook installs from the repository. Every cell prints one plain sentence. Settings say whether to change them.

Tests

  • tests/test_notebooks.py (new):
    • Runs each notebook's offline cells, with every Earth Engine data call refused.
    • Checks that 01's computation for the preset chip is byte-identical to the recorded library graph.
    • Exercises 03's skip and resume paths, and the upload progress, with stand-in tasks.
    • Scans the notebooks for IDs, paths and emails, uncleared outputs, a missing Colab badge, "billed" and "restart".

Checks

Check Result
G1 (--resources with the checkpoints) 45 of 45 graphs equal, none skipped
G1-ext 19 of 19 graphs equal
pytest -q 3738 passed, 5 skipped, 190 subtests passed
tools/block_catalogue.py --check in sync
Notebooks in a fresh Python 3.12 environment with Colab's usual packages (nbclient) 02 and 03 ran top to bottom; 01 ran up to its project field, as designed

No block or fixture changed, so there is no G3 selection and no live fixture plan. The notebooks' Earth Engine steps were run by the maintainer in Colab: notebook 01 end to end, and notebook 03's demo.

Limitations

  • Notebook 01 depends on demos/code_editor/segwater.js, so it clones the repository rather than installing from PyPI.
  • In Colab, the Earth Engine client version differs from the one the template was recorded with. The byte-identity check therefore runs in the tests, not in the notebook.
  • EECU for notebook 03's upload and exports has not been measured. The upload's time, about 7 minutes for the demo, comes from one run.
  • The "Open in Colab" badges point at main, so they work once this is merged.

docs/start-here.md explains what TensorEE does and does not do, gives three
ways to begin (the Code Editor demo, a Python quickstart, bring your own
model) and defines chip, tile, halo, weight asset, export and EECU cost.
README.md and docs/README.md link it first.

notebooks/01_quickstart.ipynb runs the trained water U-Net on one chip at a
place the reader picks, from the Code Editor module's template and the public
weight tables, so it needs no checkpoint. Offline, its graph for the preset
chip is byte-identical to the recorded predict_segwater graph.
notebooks/02_is_my_model_supported.ipynb checks models offline: a supported
U-Net, refused LinkNet and DeepLabV3+, the converter's report and a refusal,
and a cell for the reader's own model.
notebooks/03_bring_your_own_cnn.ipynb follows docs/own-model.md from an SMP
Unet checkpoint to a region, with every billed step behind its own switch.

tests/test_notebooks.py reads the notebooks with json, checks that outputs are
cleared and no private values appear, and runs the code cells offline with
every Earth Engine data call refused.
Notebook 01 now has one setting, the project, in a Colab form; an empty project
stops with a one-line message. Install, settings, sign in, place and scene,
build, export and map are one cell each, with the background in three short
bullets at the end. It no longer has an offline mode, a restart instruction or
the byte-identity check; the test supplies the offline signatures, the project
and the preset place itself, and keeps the identity assertion. The asset name
carries a timestamp, so a rerun does not collide.

Notebook 03 undoes its offline signatures when RUN_LIVE is switched on, so no
restart is needed, and the test checks it. Notebooks 02 and 03 and
docs/start-here.md use bullets and say that runs use the project's Earth Engine
quota: free on noncommercial projects, the plan's rate on commercial ones; the
quickstart's export used about 65 EECU-seconds.
… and loads in Colab

Step 5 says the model is set up for the chip and scene instead of listing bands.
Step 6 links the Earth Engine Tasks page and prints a short status every minute
while it waits. Step 7 waits for a running export, stops with one line if step 6
has not run, centres on the chip, and uses CartoDB Positron and Esri World
Imagery as base maps, since OpenStreetMap's tiles refuse Colab.
…e step, and a message from every cell

- 03: settings grouped, each line says whether to change it; USE_EARTH_ENGINE replaces RUN_LIVE;
  the four Earth Engine steps each get a checkbox in their own cell, run one at a time; the
  helper code moves into the titled connect cell; every cell prints what happened or why not;
  steps renumbered so titles, switches and text agree.
- 02: setup in one titled cell that says it is ready; terms explained where they first appear.
- 01: wording pass; install and settings cells now confirm.
- start-here: no coding agent needed; plainer wording of the checks.
- tests: follow the new 03 names, and check its four checkboxes.
…tinel-1, and finished steps skipped

- 03: RUN_UP_TO replaces USE_EARTH_ENGINE and the four checkboxes. Each Run all goes up to that
  step; an uploaded weights record, an existing asset or an export still running is reused, not
  an error. Without a checkpoint the Earth Engine steps run the small random-weight demo on a
  public Sentinel-1 scene at Sun Moon Lake, rescaled as (dB + 20) / 20, with demo-named assets.
  The region is exported only after a comparison within the target.
- All three notebooks install with !pip, so no restart note is printed.
- tests: the ladder, the skips (with stand-in tasks) and the absence of restart text.
- start-here: the new 03 description.
@noelEOS
noelEOS enabled auto-merge (squash) November 8, 2026 05:09
@noelEOS
noelEOS merged commit 84fd9ed into main Nov 8, 2026
3 checks passed
@noelEOS
noelEOS deleted the docs/reader-notebooks branch November 8, 2026 05:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant