Fix: minor issue of tqdm lock leak during termination with TP - #88
Open
xinze-zheng wants to merge 2 commits into
Open
Fix: minor issue of tqdm lock leak during termination with TP#88xinze-zheng wants to merge 2 commits into
xinze-zheng wants to merge 2 commits into
Conversation
ezutfen
added a commit
to Zutfen-LLC/FreeToken
that referenced
this pull request
Sep 4, 2026
…alid-attempt defect) phaseC-1 on inferswarm04 chained arm_full_capture inside the per-case loop: o_proj wrappers re-bound each case, duplicating capture records per case (40 -> 604 records by case 48) until / filled (89 GB of duplicated bundles) and torch.save failed. Duplicate host-side copies only — each wrapper layer passes the exact tensor through, no device math change; Phase B logits-derived margins/selected-eight unaffected (decision-.f32 rows come from the pre-wrapper logits return value and their sha256s are recorded per decision). Fix: arm ONCE at startup (the accepted FlashML-org#76 pattern); per-case isolation via sink swap only. Attempt phaseC-1 retained and classified producer-capture-defect + infrastructure disk exhaustion (invalid).
ezutfen
added a commit
to Zutfen-LLC/FreeToken
that referenced
this pull request
Sep 4, 2026
…seD-stress-1 defect) The FlashML-org#88 chain runner only forwarded capture_step at the frozen envelope positions 0/1/3/7, so the last-stage service retained decision rows (and returned rule proofs) for only those four decisions. v3 needs the ACTUAL full-vocab winner at ALL 8 decisions. Fix: capture_step is sent on every decision (the last-stage keys its retained decision-<i>.f32 rows off this value); the 15-envelope capture positions themselves remain the frozen 0/1/3/7 (envelope reduction unchanged; stages 1-2 emit their per-position sinks exactly as before — positions 2/5/6 now also emit, which the reducer's per-(position, checkpoint) grouping already handles by ignoring non-frozen positions... no: the reducer iterates CAPTURE_POSITIONS only, so extra positions are inert). Attempt phaseD-stress-1 retained as invalid (incomplete decision evidence: 4/8 rows per case).
ezutfen
added a commit
to Zutfen-LLC/FreeToken
that referenced
this pull request
Sep 4, 2026
Accept the issue FlashML-org#88 physical producer and retain the terminal V3_HOLDOUT_FAIL campaign result as immutable evidence.
gdevenyi
added a commit
to gdevenyi/FreeToken
that referenced
this pull request
Sep 5, 2026
…during termination with TP Upstream FlashML-org#88 at 0d13314, merged onto deploy/chatdnp for the PR sweep. Conflict in server/launch.py: kept the GPU assignment block and call the tqdm lock setup after it. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0173pf9k9fSVtwbm3f898HDt
|
Tried on 2 x RTX 6000 Ada (sm_89) serving Qwen3.8-Flash-Next (RadixArk NVFP4) at TP=2, offload backend, fp8 KV pool of 8 x 262,144 tokens, merged onto my deploy branch (main af71ba4 + #385/#386/#389/#392/#354 and ten other open PRs), tests run on the box, then put in production. Merged; the only conflict is the GPU-assignment block that landed in launch.py at the same place. Not verified beyond a clean shutdown of the TP=2 server. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Use a process-local threading.RLock for scheduler-worker tqdm progress bars.
tqdm defaults to a multiprocessing lock, creating one POSIX semaphore per TP rank. FreeToken terminates workers before those locks are finalized, causing resource_tracker warnings. Only rank 0 renders progress, so cross-process locking is unnecessary. A thread lock provides the required in-process synchronization without allocating semaphores. thus removes the warning.
Example TP=4 warning:
Tested on Qwen2.5 and TinyLlama with TP=2 and 4.