diff options
| author | YurenHao0426 <Blackhao0426@gmail.com> | 2026-09-01 00:21:14 -0500 |
|---|---|---|
| committer | YurenHao0426 <Blackhao0426@gmail.com> | 2026-09-01 00:21:14 -0500 |
| commit | 8d0f5efe86dfa5dcf6b4135ad76a3a6f93535ac2 (patch) | |
| tree | 17611ca7360be64af7302e99d66b7e5933375525 /scripts | |
| parent | 0a090e3f597ee0994ea16f0675135a33bf051441 (diff) | |
prepare_data: hard-exit after DONE — HF streaming prefetch threads hang interpreter shutdown after breakHEADmain
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GkgLsACEF6CCP7EUfA5fZe
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/prepare_data.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/prepare_data.py b/scripts/prepare_data.py index b7684b8..8036a47 100644 --- a/scripts/prepare_data.py +++ b/scripts/prepare_data.py @@ -35,4 +35,6 @@ for i, ex in enumerate(ds): break ftr.close(); fva.close() os.rename(train_path + ".partial", train_path); os.rename(val_path + ".partial", val_path) -print(f"DONE train {n_tr/1e6:.1f}M val {n_va/1e6:.1f}M -> {a.out}") +print(f"DONE train {n_tr/1e6:.1f}M val {n_va/1e6:.1f}M -> {a.out}", flush=True) +sys.stdout.flush(); sys.stderr.flush() +os._exit(0) # hard-exit: HF streaming leaves non-daemon prefetch threads after `break` that hang interpreter shutdown |
