Skip to content

dragon+orbit backends: idempotent cancels; dragon failure tracebacks - #91

Open
andre-merzky wants to merge 4 commits into
mainfrom
fix/dragon-cancel-and-traceback
Open

dragon+orbit backends: idempotent cancels; dragon failure tracebacks#91
andre-merzky wants to merge 4 commits into
mainfrom
fix/dragon-cancel-and-traceback

Conversation

@andre-merzky

@andre-merzky andre-merzky commented Sep 1, 2026

Copy link
Copy Markdown
Member

Two fixes from the first remote DT demo (dragon endpoint on Perlmutter, ROSE ParallelActiveLearner on top):

  1. cancel_task of an untracked uid is a no-op, not an error. A cancel can race a task that already finished or was never dispatched — ROSE cancels its losing candidate branch exactly this way. Raising broke the caller's teardown and turned a clean branch-cancel into a DependencyFailureError on the surviving pipeline. The concurrent backend treats this as idempotent; dragon now does too.
  2. _deliver_batch logs the remote traceback on failure. The worker captures it, it lands in task_desc, and nothing ever printed it — a failing function task surfaced to the consumer as a bare exception message. Debugging the demo required exactly this log line to find a TypeError three libraries deep.

Related: the joblib/sklearn n_jobs != 1 failure inside dragon workers is tracked separately in #92.

Cherry-picked from the demo-pinned branch fix/dragon-cancel-idempotent (e491cd2-based). Unit suite: 191 passed, 23 skipped.

🤖 Generated with Claude Code

https://claude.ai/code/session_016Npyz3Hbnwos12ESsdJ2YU

andre-merzky and others added 2 commits September 1, 2026 09:24
A cancel can race a task that already finished or was never
dispatched -- ROSE's ParallelActiveLearner cancels its losing
candidate branch exactly this way.  Raising broke the caller's
teardown and turned a clean branch-cancel into a
DependencyFailureError on the surviving pipeline (first observed on
the remote DT demo: rf branch trained, mlp branch's cancel raised,
twin failed).  The concurrent backend treats this as idempotent;
dragon now does too.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016Npyz3Hbnwos12ESsdJ2YU
The worker captures it, _deliver_batch drops it into task_desc and
nothing ever prints it -- a failing function task surfaces to the
consumer as a bare exception message.  Log it endpoint-side.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016Npyz3Hbnwos12ESsdJ2YU
andre-merzky and others added 2 commits September 1, 2026 10:01
The full dragon test module skips without the runtime, so CI never ran
these paths; the new file drives them on a bare instance.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016Npyz3Hbnwos12ESsdJ2YU
Same defect class as the dragon fix in this PR, other backend: the
uid passes the early registry check, the remote cancel awaits, the
completion notification prunes the task -- and the post-await lookup
raised KeyError ("Task exception was never retrieved" noise on every
twin teardown under load; observed converting the xGFabric twin to
service mode).  The lookup is now a get; a completed task answers
False, its terminal callback already fired via the notification.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016Npyz3Hbnwos12ESsdJ2YU
@andre-merzky andre-merzky changed the title dragon: idempotent cancel, failure tracebacks in the endpoint log dragon+orbit backends: idempotent cancels; dragon failure tracebacks Sep 1, 2026
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