Skip to content

Phase 1 of #7: inference/learning roles, one engine, label-routed backends - #9

Merged
andre-merzky merged 1 commit into
develfrom
feature/roles-phase1
Aug 24, 2026
Merged

Phase 1 of #7: inference/learning roles, one engine, label-routed backends#9
andre-merzky merged 1 commit into
develfrom
feature/roles-phase1

Conversation

@andre-merzky

Copy link
Copy Markdown
Member

Phase 1 of the #7 sequence, per the design comments there.

  • One engine per session, two named backends (inference, learning); asyncflow 0.5.1 routes per task on target_backend. Service-side only: the label rides ROSE's decor_kwargs seam, no ROSE change.
  • learn_flow removed; the service injects learn_backend (the label). Engine build machinery (dedup, per-role locks, cancelled-caller survival, close disposal, R8 loss mapping) keeps its semantics, keyed by role.
  • Rename is clean, no aliases (one internal demo behind us): config keys, DT_INFERENCE_ENDPOINT/DT_LEARNING_ENDPOINT, endpoint-name examples, dashboard lanes and both bundled recordings, demos, docs. Dashboard VERSION 0.6.0 — old recordings carry old role keys and would draw empty lanes; the badge makes that visible.
  • Conflict rule for open PRs touching these files (Changed the UI to better match the different abstractions #6 included): resolve toward inference/learning — see Change the M2 PR to use pools from Task Dispatcher #7.

Verified: 164 unit + 29 integration locally; the dual-endpoint learner test proves label routing end to end (trained_on: learning-endpoint, served_by: inference-endpoint).

Phase 2 (dispatcher pools) follows per #7.

🤖 Generated with Claude Code

Phase 1 of #7.  One engine per session now carries two named backends,
and asyncflow routes per task on its label -- the mechanism shipped in
asyncflow 0.5.1 (`function_task(backend=...)` -> `target_backend`),
so the whole change is service-side.

  * session: `_create_engine` becomes `_create_backend`; the engine is
    created once around the 'inference' backend, a configured 'learning'
    backend attaches to it (asyncflow `_attach_backend`; the public
    spelling is an upstream ask).  Build dedup, per-role locks,
    cancelled-caller survival, close-during-build disposal and the R8
    loss mapping all keep their semantics, now keyed by role.
  * learn: `learn_flow` is gone.  The service injects `learn_backend`
    (the label), and the investigator staples it onto ROSE's own
    registration seam -- `_register_task` forwards `decor_kwargs` into
    `function_task`, so no ROSE change and no engine proxy (ROSE
    type-checks the engine argument; a proxy does not pass).
  * naming: the reserved roles are `inference` and `learning` --
    function, not placement ('insitu'/'exsitu' broke the moment
    inference ran remotely).  No compatibility aliases: config keys,
    env vars (`DT_INFERENCE_ENDPOINT` / `DT_LEARNING_ENDPOINT`),
    endpoint examples, dashboard lanes, demos, docs and both bundled
    recordings renamed in one sweep.  Dashboard VERSION 0.6.0: an old
    recording's role keys would draw empty lanes, and the badge says so.

Verified: 164 unit + 29 integration, including the dual-endpoint
learner test that proves the label routing end to end (training on the
learning endpoint, inference served from the inference endpoint).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@andre-merzky
andre-merzky merged commit a448568 into devel Aug 24, 2026
2 checks passed
@andre-merzky
andre-merzky deleted the feature/roles-phase1 branch August 24, 2026 11:53
andre-merzky added a commit that referenced this pull request Aug 24, 2026
devel brings the merged stack and the phase-1 role rename (#9).  Per
the rule in #7, every conflict resolves toward `inference`/`learning`:
the pool cards keep their new table+graph body and say 'Pool:
inference' / 'Pool: learning', `poolHistory` and the lane colour checks
follow, and the page version supersedes both sides as 0.7.0.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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