planetbridging example: 06_showcase_everything
script:   06_showcase_everything.py
started:  2026-07-01T09:57:01Z
command:  python /Users/openfluke/git/endgame/loom/planetbridging/examples/06_showcase_everything.py --quick
cwd:      /Users/openfluke/git/endgame/loom/planetbridging
────────────────────────────────────────────────────────────────

planetbridging showcase — everything the package can do
  mode: quick  welvet: on

────────────────────────────────────────────────────────────────────────
  1. Catalog — what planetbridging knows about
────────────────────────────────────────────────────────────────────────
  version:          0.7.1
  repo root:        /Users/openfluke/git/endgame/loom/planetbridging
  loom-stream:      /Users/openfluke/git/endgame/loom/planetbridging/bin/loom-stream
  bedrock count:    13
  bedrock ids:      dense, cnn1, cnn2, cnn3, mha, lstm, rnn, layernorm, embedding, rmsnorm, swiglu, residual, mixer

  Default stream models (multi-layer where noted):
    dense        mlp_32_64_32_16_8_relu        4 layers  [pytorch, tensorflow, jax, sklearn]
    cnn1         conv1_32_8_4_2layer           2 layers  [pytorch, tensorflow, jax]
    cnn2         conv2_8_4_2layer              2 layers  [pytorch, tensorflow, jax]
    cnn3         conv3_4_4_2layer              2 layers  [pytorch, tensorflow, jax]
    mha          mha_8_2_4                     1 layers  [pytorch, tensorflow, jax]
    lstm         lstm_4_4_4                    1 layers  [pytorch, tensorflow, jax]
    rnn          rnn_4_4_4                     1 layers  [pytorch, tensorflow, jax]
    layernorm    layernorm_8                   1 layers  [pytorch, tensorflow, jax]
    embedding    embedding_16_4_4              1 layers  [pytorch, tensorflow, jax]
    rmsnorm      rmsnorm_8                     1 layers  [pytorch, tensorflow, jax]
    swiglu       swiglu_8_16_4                 1 layers  [pytorch, tensorflow, jax]
    residual     residual_8                    1 layers  [pytorch, tensorflow, jax]
    mixer        mixer_all_v2                 16 layers  [pytorch, tensorflow, jax]

────────────────────────────────────────────────────────────────────────
  2. Numpy reference smoke — stream_bedrock without live AI engines
────────────────────────────────────────────────────────────────────────
  API: run_bedrock_smoke(), run_all_bedrock_smokes()
  Uses fixture weights + native numpy forward → loom-stream CLI

  ✓ dense         4L  PASS    max=5.96e-08
  ✓ mha           1L  PASS    max=3.30e-10
  ✓ layernorm     1L  PASS    max=4.64e-06

────────────────────────────────────────────────────────────────────────
  3. Compare ladder — numpy native → loom-stream → welvet reload
────────────────────────────────────────────────────────────────────────
  API: run_bedrock_ladder(), run_all_bedrock_ladders(), engines.ladder()
  welvet OK:  cnn1, cnn2, cnn3, dense, embedding, layernorm, mha, rmsnorm, swiglu
  welvet skip: lstm, mixer, residual, rnn

  ✓ dense        native→loom PASS    welvet: DIFF
  ✓ mha          native→loom PASS    welvet: PASS
  ✓ layernorm    native→loom PASS    welvet: PASS

────────────────────────────────────────────────────────────────────────
  4. Live AI engine streaming — engines.stream() / absorb.stream()
────────────────────────────────────────────────────────────────────────
  POC handlers patch urllib → loom-stream (no compare-host HTTP)

  ✓ engines.stream('swiglu', 'pytorch') → PASS  entity=swiglu_8_16_4.entity
  ✓ absorb.stream('swiglu', 'pytorch') → PASS  entity=swiglu_8_16_4.entity
[pytorch] mlp_32_64_32_16_8_relu: onnx present but onnxruntime missing; run: conda run -n pb-dense-pytorch pip install onnxruntime
[pytorch] mlp_32_64_32_16_8_relu loom stream ok entity=/Users/openfluke/git/endgame/loom/planetbridging/.planetbridging/examples/showcase/live/multilayer/mlp_32_64_32_16_8_relu.entity
  ✓ engines.stream('dense', 'pytorch') → mlp_32_64_32_16_8_relu (4 layers) PASS

────────────────────────────────────────────────────────────────────────
  5. Batch APIs — all bedrocks / all planets
────────────────────────────────────────────────────────────────────────
  (--quick: skipping stream_all_bedrocks; tried 3 smokes above)


  engines.stream_all_planets('layernorm') — installed: pytorch:

    ✓ pytorch      PASS

  engines.available_planets('dense'): ('pytorch', 'tensorflow', 'jax', 'sklearn')
  engines.installed_planets('dense'): ('pytorch',)

────────────────────────────────────────────────────────────────────────
  6. Low-level stream API — stream_dense / stream_bedrock
────────────────────────────────────────────────────────────────────────
  API: stream_dense(), stream_bedrock(), stream_<layer>()
  absorb.pytorch/keras/jax/sklearn wrap stream_dense for live modules

  ✓ stream_dense  layers=2  PASS  entity=synthetic.entity
  ✓ absorb.pytorch (live nn.Module)  PASS

────────────────────────────────────────────────────────────────────────
  7. Welvet entity reload — engines.stream(..., try_welvet=True)
────────────────────────────────────────────────────────────────────────

=== cnn1 (live engine + welvet) ===
  native → loom-stream:  PASS    max=2.980232e-08  mean=6.614482e-09
  native → welvet:       PASS    max=3.616829e-08  mean=6.781442e-09
  loom-stream → welvet:  PASS    max=1.127625e-08  mean=1.208387e-09

=== layernorm (live engine + welvet) ===
  native → loom-stream:  PASS    max=2.787237e-06  mean=2.569920e-07
  native → welvet:       PASS    max=2.787255e-06  mean=2.579718e-07
  loom-stream → welvet:  PASS    max=5.703735e-08  mean=1.461984e-08

  engines.ladder('mha', 'numpy'): native→loom PASS  native→welvet PASS

────────────────────────────────────────────────────────────────────────
  8. Compare utilities
────────────────────────────────────────────────────────────────────────
  API: compare_outputs(), diff_label(), welvet_infer.print_compare_ladder()
  compare_outputs demo:  max=1.00e-07  mean=3.33e-08  exact=False
  diff_label:            PASS

────────────────────────────────────────────────────────────────────────
  9. Summary
────────────────────────────────────────────────────────────────────────
Package surface demonstrated:
  • BEDROCK_IDS, BEDROCKS, STREAM_MODEL_IDS, BEDROCK_PLANETS
  • find_loom_stream / repo_root
  • run_bedrock_smoke, run_all_bedrock_smokes     (numpy → loom-stream)
  • run_bedrock_ladder, run_all_bedrock_ladders   (+ welvet reload)
  • engines.stream, stream_all_bedrocks, stream_all_planets, ladder
  • engines.available_planets, installed_planets
  • absorb.stream, absorb.pytorch                   (low-level dense)
  • stream_bedrock, stream_dense, stream_<layer>    (via smoke runners)
  • compare_outputs, diff_label, print_compare_ladder
  • WELVET_RELOAD_BEDROCKS / WELVET_RELOAD_SKIP

  (ran with --quick; use full run for all 13 bedrocks in batch sections)

  ✓ Showcase complete — planetbridging APIs exercised successfully.

────────────────────────────────────────────────────────────────
exit: 0
