Skip to content

fix(server): report why a tokenizer/detokenizer worker died during load - #269

Open
sime2408 wants to merge 1 commit into
FlashML-org:mainfrom
sime2408:fix/tokenizer-worker-startup-error-reporting
Open

fix(server): report why a tokenizer/detokenizer worker died during load#269
sime2408 wants to merge 1 commit into
FlashML-org:mainfrom
sime2408:fix/tokenizer-worker-startup-error-reporting

Conversation

@sime2408

Copy link
Copy Markdown

_run_scheduler wraps startup and pushes an ("error", reason) ack before dying, so the supervisor can report the real cause. _run_tokenize_worker did not, so every tokenizer-side startup failure reached the parent only as a dead process and surfaced as the generic "backend worker freetoken-detokenizer-0 exited during load" — the actionable reason (unreadable tokenizer.json, missing checkpoint file, ZMQ bind clash) was lost.

Wrap tokenize_worker in the same try/report/re-raise the scheduler already uses. The traceback still prints and the process still exits non-zero; only the ack is added. No ack_queue (direct call) stays a plain propagate.

Adds tests/server/test_launch_worker_errors.py, which fails before this change.

_run_scheduler wraps startup and pushes an ("error", reason) ack before dying,
so the supervisor can report the real cause. _run_tokenize_worker did not, so
every tokenizer-side startup failure reached the parent only as a dead process
and surfaced as the generic "backend worker freetoken-detokenizer-0 exited
during load" — the actionable reason (unreadable tokenizer.json, missing
checkpoint file, ZMQ bind clash) was lost.

Wrap tokenize_worker in the same try/report/re-raise the scheduler already uses.
The traceback still prints and the process still exits non-zero; only the ack is
added. No ack_queue (direct call) stays a plain propagate.

Adds tests/server/test_launch_worker_errors.py, which fails before this change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant