Spaces:
Runtime error
Runtime error
deploy: update Space from deploy_preflight --push
Browse files- README.md +46 -21
- assets/screenshots/README.md +17 -0
README.md
CHANGED
|
@@ -22,18 +22,28 @@ tags:
|
|
| 22 |
|
| 23 |
# Microfactory Node: 3D Printer
|
| 24 |
|
| 25 |
-
*The 3D-printing node of the Microfactory
|
| 26 |
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
> machine shop attached. He spent a lifetime accumulating skill that lived in his hands. Then
|
| 29 |
> Alzheimer's took him, the shop was sold, and all of it just⦠went. The Chief Engineer is the
|
| 30 |
> opposite of that: a small AI that runs on my own machine and learns the craft of 3D printing
|
| 31 |
-
> the way a shop veteran would
|
| 32 |
> tells me where a print will fail *before* it runs.
|
| 33 |
|
| 34 |
**Build Small hackathon Β· Backyard AI track.** A small local **Gemma** model that has accumulated
|
| 35 |
expert 3D-printing knowledge across prior jobs and applies it **proactively** to a new one.
|
| 36 |
-
Knowledge **compounds**
|
| 37 |
*judgment*: the model evaluates what prior jobs transfer to this one, applies precedent when it
|
| 38 |
fits, and says *"no close precedent"* when it doesn't.
|
| 39 |
|
|
@@ -48,11 +58,11 @@ Job (geometry + material) + Environment (temp, humidity)
|
|
| 48 |
β reflect β distill an environment-keyed lesson β ledger grows β next job is smarter
|
| 49 |
```
|
| 50 |
|
| 51 |
-
The model **never grades its own outcome**
|
| 52 |
run the **simulated world** (a deterministic stand-in for the printer + sensors). Either way the
|
| 53 |
outcome comes from outside the model. The honest signal is what makes the compounding real.
|
| 54 |
|
| 55 |
-
**This is more than a lookup.** Two knowledge sources feed every recommendation
|
| 56 |
prior jobs the LLM reasons over) and a **learned parametric policy** (`learn/policy.py`) that stores
|
| 57 |
setting offsets per (material, geometry, *environment-bucket*) and updates from each outcome. Because
|
| 58 |
cells are bucketed, a lesson from one humid PETG bridge **generalizes** to the next, not-identical
|
|
@@ -83,44 +93,59 @@ Falls back to a deterministic advisor if Ollama is unreachable, so the demo neve
|
|
| 83 |
UI always shows which model ran. Set `CHIEF_ENGINEER_MODEL=gemma4:e2b` if CPU latency is high.
|
| 84 |
|
| 85 |
**Resetting demo state.** `data/lessons.jsonl` is now the **durable knowledge base** (12 seed +
|
| 86 |
-
|
| 87 |
at runtime, and `data/policy.json` is the derived learned policy. For a clean curve between demos,
|
| 88 |
-
**don't delete the ledger**
|
| 89 |
|
| 90 |
```bash
|
| 91 |
git checkout -- data/lessons.jsonl # discard this session's runtime lessons, keep seed + ingested
|
| 92 |
rm -f data/policy.json # drop the learned policy (re-derives from the loop)
|
| 93 |
```
|
| 94 |
|
| 95 |
-
On the **live Space** (no shell), use the **βΊ RESET TO BASELINE** button in the **Review** tab
|
| 96 |
it clears this session's accumulated runs + learned policy back to the curated baseline.
|
| 97 |
|
| 98 |
-
## Workspaces
|
| 99 |
|
| 100 |
-
1. **Studio**
|
| 101 |
-
mesh (the engineer *infers* the part class itself
|
| 102 |
simulated **environment** (temp/humidity/plate position on a Creality Ender 3 V2) populates.
|
| 103 |
-
2. **Build**
|
| 104 |
print, the engineer's precedent read + reasoning + predicted failure regions, the Spine-validated
|
| 105 |
settings + G-code (terminal readout), and a **second opinion** from a separate QA Inspector.
|
| 106 |
-
3. **Print**
|
| 107 |
Engineer proposes β the Spine vetoes β a simulated world prints β the **Inspector grades each
|
| 108 |
run** β policy + ledger learn. Simulate one print, or record a real outcome.
|
| 109 |
-
4. **Review**
|
| 110 |
mesh, and the Inspector's verdict on the whole run.
|
| 111 |
|
| 112 |
-
**The hybrid evaluator (honest by design).** The Engineer
|
| 113 |
its own work. The deterministic world (`sim/outcome.py`) produces the ground-truth pass/fail; a
|
| 114 |
*separate* **QA Inspector** persona, *La Forge* (`core/inspector.py`), reads what O'Brien claimed vs
|
| 115 |
-
what actually happened and writes the verdict
|
| 116 |
-
**Print**, a run verdict in **Review**. Physics
|
| 117 |
own homework.
|
| 118 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 119 |
## Badges
|
| 120 |
|
| 121 |
Off the Grid (local Ollama/Gemma) Β· Llama Champion (Ollama runs on llama.cpp) Β·
|
| 122 |
Sharing is Caring ([ledger trace β](https://huggingface.co/datasets/kylebrodeur/chief-engineer-ledger)) Β· Field Notes (build writeup). Off-Brand if the
|
| 123 |
-
Astrometrics UI lands (see `../DESIGN.md`). **Not** Well-Tuned
|
| 124 |
|
| 125 |
## What's real vs frontier (honest claims)
|
| 126 |
|
|
@@ -129,7 +154,7 @@ Astrometrics UI lands (see `../DESIGN.md`). **Not** Well-Tuned β fine-tuning i
|
|
| 129 |
proactive geometric risk flags, fully local Gemma inference, human-reported + simulated outcomes,
|
| 130 |
knowledge ingestion from slicer/firmware configs.
|
| 131 |
- **Simulated (the one boundary):** print outcomes, via a deterministic physics-lite stand-in for the
|
| 132 |
-
printer + sensors (`sim/outcome.py`)
|
| 133 |
- **Frontier (not built):** weight-level fine-tuning on the accumulated ledger, real distributed
|
| 134 |
multi-node execution, the physical interfaces (g-code streaming, env sensors, camera defect CV).
|
| 135 |
|
|
@@ -144,7 +169,7 @@ Astrometrics UI lands (see `../DESIGN.md`). **Not** Well-Tuned β fine-tuning i
|
|
| 144 |
|
| 145 |
## License
|
| 146 |
|
| 147 |
-
MIT. **No OrcaSlicer/PrusaSlicer code** (AGPL-3.0)
|
| 148 |
|
| 149 |
## Source
|
| 150 |
|
|
|
|
| 22 |
|
| 23 |
# Microfactory Node: 3D Printer
|
| 24 |
|
| 25 |
+
*The 3D-printing node of the Microfactory. Its resident expert is **the Chief Engineer**, a small local model that learns the craft job by job.*
|
| 26 |
|
| 27 |
+
**It predicts where a 3D print will fail before it runs, learns from every job, and runs entirely on your own machine for $0 a month.**
|
| 28 |
+
|
| 29 |
+
<!-- HERO IMAGE (the strongest single frame; capture at ~1600px wide, save to assets/screenshots/). -->
|
| 30 |
+
<!-- Recommended: the BUILD page mid-reasoning: Chief Engineer O'Brien's precedent read on the left,
|
| 31 |
+
a predicted failure region called out, the filled LAYER cross-section below. -->
|
| 32 |
+

|
| 33 |
+
|
| 34 |
+
`Local Gemma via Ollama` Β· `two agents: O'Brien proposes, La Forge inspects` Β· `knowledge that compounds` Β· `honest about what it doesn't know`
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
> My grandfather had a shop. An electrical engineer who tinkered, a home RadioShack with a
|
| 38 |
> machine shop attached. He spent a lifetime accumulating skill that lived in his hands. Then
|
| 39 |
> Alzheimer's took him, the shop was sold, and all of it just⦠went. The Chief Engineer is the
|
| 40 |
> opposite of that: a small AI that runs on my own machine and learns the craft of 3D printing
|
| 41 |
+
> the way a shop veteran would, job by job, remembering what worked in which conditions, and
|
| 42 |
> tells me where a print will fail *before* it runs.
|
| 43 |
|
| 44 |
**Build Small hackathon Β· Backyard AI track.** A small local **Gemma** model that has accumulated
|
| 45 |
expert 3D-printing knowledge across prior jobs and applies it **proactively** to a new one.
|
| 46 |
+
Knowledge **compounds**: job N+1 is better-informed than job N. The proactive part is the
|
| 47 |
*judgment*: the model evaluates what prior jobs transfer to this one, applies precedent when it
|
| 48 |
fits, and says *"no close precedent"* when it doesn't.
|
| 49 |
|
|
|
|
| 58 |
β reflect β distill an environment-keyed lesson β ledger grows β next job is smarter
|
| 59 |
```
|
| 60 |
|
| 61 |
+
The model **never grades its own outcome**: you click *Printed clean / Sagged / Stringing*, or
|
| 62 |
run the **simulated world** (a deterministic stand-in for the printer + sensors). Either way the
|
| 63 |
outcome comes from outside the model. The honest signal is what makes the compounding real.
|
| 64 |
|
| 65 |
+
**This is more than a lookup.** Two knowledge sources feed every recommendation, *RAG* (retrieved
|
| 66 |
prior jobs the LLM reasons over) and a **learned parametric policy** (`learn/policy.py`) that stores
|
| 67 |
setting offsets per (material, geometry, *environment-bucket*) and updates from each outcome. Because
|
| 68 |
cells are bucketed, a lesson from one humid PETG bridge **generalizes** to the next, not-identical
|
|
|
|
| 93 |
UI always shows which model ran. Set `CHIEF_ENGINEER_MODEL=gemma4:e2b` if CPU latency is high.
|
| 94 |
|
| 95 |
**Resetting demo state.** `data/lessons.jsonl` is now the **durable knowledge base** (12 seed +
|
| 96 |
+
14 ingested lessons, *tracked*, not disposable); the Print loop appends earned/sim lessons to it
|
| 97 |
at runtime, and `data/policy.json` is the derived learned policy. For a clean curve between demos,
|
| 98 |
+
**don't delete the ledger**: restore it to the committed baseline and clear only the derived policy:
|
| 99 |
|
| 100 |
```bash
|
| 101 |
git checkout -- data/lessons.jsonl # discard this session's runtime lessons, keep seed + ingested
|
| 102 |
rm -f data/policy.json # drop the learned policy (re-derives from the loop)
|
| 103 |
```
|
| 104 |
|
| 105 |
+
On the **live Space** (no shell), use the **βΊ RESET TO BASELINE** button in the **Review** tab:
|
| 106 |
it clears this session's accumulated runs + learned policy back to the curated baseline.
|
| 107 |
|
| 108 |
+
## Workspaces: the real print workflow
|
| 109 |
|
| 110 |
+
1. **Studio**. Define and preview the job: quick-load 3DBenchy, generate a primitive, or drop a
|
| 111 |
+
mesh (the engineer *infers* the part class itself, you don't pick it); choose material; the
|
| 112 |
simulated **environment** (temp/humidity/plate position on a Creality Ender 3 V2) populates.
|
| 113 |
+
2. **Build**. The pre-flight check, **before it prints**: the slicer / layer-by-layer virtual
|
| 114 |
print, the engineer's precedent read + reasoning + predicted failure regions, the Spine-validated
|
| 115 |
settings + G-code (terminal readout), and a **second opinion** from a separate QA Inspector.
|
| 116 |
+
3. **Print**. Run *this* job through the closed loop and watch quality compound failβclean: the
|
| 117 |
Engineer proposes β the Spine vetoes β a simulated world prints β the **Inspector grades each
|
| 118 |
run** β policy + ledger learn. Simulate one print, or record a real outcome.
|
| 119 |
+
4. **Review**. The compounding made visible: the live ledger (seed β earned β sim), the capability
|
| 120 |
mesh, and the Inspector's verdict on the whole run.
|
| 121 |
|
| 122 |
+
**The hybrid evaluator (honest by design).** The Engineer, *Chief Engineer O'Brien*, never grades
|
| 123 |
its own work. The deterministic world (`sim/outcome.py`) produces the ground-truth pass/fail; a
|
| 124 |
*separate* **QA Inspector** persona, *La Forge* (`core/inspector.py`), reads what O'Brien claimed vs
|
| 125 |
+
what actually happened and writes the verdict: a second opinion in **Build**, a per-print grade in
|
| 126 |
+
**Print**, a run verdict in **Review**. Physics plus a skeptical second voice, never the proposer marking its
|
| 127 |
own homework.
|
| 128 |
|
| 129 |
+
<!-- SCREENSHOT: the Print loop: the quality curve climbing failβclean with La Forge's per-run grades.
|
| 130 |
+
The compounding payoff in one frame. Save to assets/screenshots/print-loop.png -->
|
| 131 |
+

|
| 132 |
+
|
| 133 |
+
<!-- βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 134 |
+
MEDIA TODO (capture from the live Space at ~1600px wide; drop PNGs in assets/screenshots/):
|
| 135 |
+
β’ hero-build.png: Build page mid-reasoning: O'Brien's precedent read + a 3D risk flag + LAYER scrubber (the hero, top).
|
| 136 |
+
β’ print-loop.png: Print, the failβclean quality curve + La Forge's per-iteration grades (above).
|
| 137 |
+
β’ second-opinion.png: Build, La Forge's π second-opinion card disputing a plan (the two-agent moment).
|
| 138 |
+
β’ studio.png: Studio, Benchy loaded, material + simulated environment (optional, for the writeup).
|
| 139 |
+
β’ review-ledger.png: Review, the ledger growing seed β earned β sim (optional).
|
| 140 |
+
Demo video + social post go in the Links section below once recorded/published.
|
| 141 |
+
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ -->
|
| 142 |
+
|
| 143 |
+
|
| 144 |
## Badges
|
| 145 |
|
| 146 |
Off the Grid (local Ollama/Gemma) Β· Llama Champion (Ollama runs on llama.cpp) Β·
|
| 147 |
Sharing is Caring ([ledger trace β](https://huggingface.co/datasets/kylebrodeur/chief-engineer-ledger)) Β· Field Notes (build writeup). Off-Brand if the
|
| 148 |
+
Astrometrics UI lands (see `../DESIGN.md`). **Not** Well-Tuned: fine-tuning is named as frontier.
|
| 149 |
|
| 150 |
## What's real vs frontier (honest claims)
|
| 151 |
|
|
|
|
| 154 |
proactive geometric risk flags, fully local Gemma inference, human-reported + simulated outcomes,
|
| 155 |
knowledge ingestion from slicer/firmware configs.
|
| 156 |
- **Simulated (the one boundary):** print outcomes, via a deterministic physics-lite stand-in for the
|
| 157 |
+
printer + sensors (`sim/outcome.py`): the model never grades its own work.
|
| 158 |
- **Frontier (not built):** weight-level fine-tuning on the accumulated ledger, real distributed
|
| 159 |
multi-node execution, the physical interfaces (g-code streaming, env sensors, camera defect CV).
|
| 160 |
|
|
|
|
| 169 |
|
| 170 |
## License
|
| 171 |
|
| 172 |
+
MIT. **No OrcaSlicer/PrusaSlicer code** (AGPL-3.0): trimesh/PySLM/manifold3d/pyclipr only.
|
| 173 |
|
| 174 |
## Source
|
| 175 |
|
assets/screenshots/README.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Screenshots (Space card + writeup)
|
| 2 |
+
|
| 3 |
+
Drop PNGs here, captured from the live Space at ~1600px wide. The Space `README.md` and the
|
| 4 |
+
writeup reference these paths. Until a file exists its image link shows a broken icon, so add
|
| 5 |
+
them before deploying the card for submission.
|
| 6 |
+
|
| 7 |
+
| File | What to capture | Used by |
|
| 8 |
+
|---|---|---|
|
| 9 |
+
| `hero-build.png` | **Build** page mid-reasoning: O'Brien's precedent read on the left, a predicted failure region called out, the filled LAYER cross-section below. The hero. | README top |
|
| 10 |
+
| `print-loop.png` | **Print**: the quality curve climbing failβclean with La Forge's per-iteration grades. | README |
|
| 11 |
+
| `second-opinion.png` | **Build**: La Forge's π second-opinion card disputing a plan (the two-agent moment). | writeup / social |
|
| 12 |
+
| `studio.png` | **Studio**: Benchy loaded, material + simulated environment. | optional |
|
| 13 |
+
| `review-ledger.png` | **Review**: the ledger growing seed β earned β sim. | optional |
|
| 14 |
+
|
| 15 |
+
Tip: full-screen the browser (drop the tab/URL/taskbar), bump zoom to ~110% so the LCARS
|
| 16 |
+
monospace reads on playback. Use a climbing job (PETG overhang ~30C/65%) so the Print curve
|
| 17 |
+
actually climbs.
|