soldermaskdocs

Routing on a bigger machine

The router is freerouting: one Java process of about two cores per route, five seconds to three minutes each, and a corpus pass is thousands of them. learn relabel --rules on 1,423 examples is about 17 core-hours; on this laptop that is six routes at a time and an evening, on 64 vCPUs it is thirty at a time and half an hour. Nothing in the code changes between the two — every harness already takes --workers — only the machine.

tools/remote_route.sh puts that machine in Azure and brings the corpus home:

az login                                                   # once, in a browser
tools/remote_route.sh quota                                # what the subscription allows in the region
tools/remote_route.sh up                                   # resource group, spot VM, Java 25, Python, the package
tools/remote_route.sh push                                 # code, jar, every DSN, the corpus: ~170 MB
tools/remote_route.sh run learn relabel --rules --workers 30 --hours 2
tools/remote_route.sh tail                                 # what it is doing
tools/remote_route.sh pull                                 # the corpus back, newer files only
tools/remote_route.sh down                                 # deallocate: the disk stays, the meter stops

AZ_RG, AZ_LOC, AZ_VM, AZ_SIZE, AZ_USER, AZ_KEY and AZ_SPOT override the defaults (soldermask-route, uksouth, soldermask-router, Standard_F64als_v6, soldermask, ~/.ssh/id_ed25519.pub, spot). destroy deletes the resource group; start wakes a deallocated machine; ssh gives a shell.

What goes up. soldermask/, tools/, tests/, vendor/ (the 60 MB jar), pyproject.toml, priors_blocks.json, every *.dsn under the repository at its own relative path — the corpus names its sources that way (eval-rev5/gemini/.../board.dsn, .cache/boards/kicad/....dsn), so a relabel needs them where it expects them — .cache/corpus, and each bank's boards.jsonl. Not the 6 GB of .kicad_pcb sources under .cache/boards/*/src, not the projects, not the eval trees beyond their DSNs. About 170 MB.

What comes back. .cache/corpus, file by file, only where the remote copy is newer. Every example is one .npz written whole (corpus.save moves a temporary file into place), so a partial run — a spot eviction, a budget that ran out — merges cleanly, and a second run of the same command picks up where the first stopped. The one rule: nothing local may be writing the same examples while the remote runs. learn generate writes new ids and is safe beside a remote relabel; two relabels of the same corpus are not.

Quota. Free-trial and startup subscriptions cap a region at 10 or 20 vCPUs. quota prints the F-family line; if it is below the size you asked for, request an increase in the portal (usually hours) or set AZ_SIZE=Standard_F16s_v2 meanwhile — sixteen vCPUs still route eight at a time and leave the laptop free.

Cost. A 64-vCPU F-series machine is about $3 an hour on demand and a third of that spot; a relabel of the size above is a dollar. A GPU buys nothing here: the router is Java on CPU, and the network the corpus trains is small enough that its training pins itself to the CPU too.

Java. The VM gets Temurin 25 from Adoptium's apt repository; cli.find_java() tries Homebrew's cellars first and then java on the path, and runs each candidate before trusting it, so the same code finds the right Java on both machines.