[BUG]: bench_sizes.py leaks prefetch threads on early break and crashes on short streams or CPU
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Ambito
- performance
Direzione di ricerca
Start in simple/bench_sizes.py, lines 34-51, where the prefetch loop breaks early and calls torch.cuda functions. Compare with how ovl.py closes its prefetch iterator after #308. Done means the iterator is closed on break, short streams fail with a clear message, and CUDA calls are guarded by ovl.DEV. Pull request #382 is already open against this issue, so check it before starting.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
simple/bench_sizes.py has two bugs when iterating over ovl.prefetch(...) across the 5 model sizes in SIZES:
- Leaked
prefetchproducer threads on earlybreak:for b, _ in ovl.prefetch(a.data, "wikipedia", [0, 0]):breaks out of the loop aftera.secondswithout closing theprefetchiterator (unlikeovl.py, which was fixed in #308). Becausebench_sizes.pyloops over 5 progressively larger models in one process, each timed break leaves a live producer thread blocked inq.put()holding queued batch tensors. - Crash on short streams (
<= 30updates): Ifovl.prefetch(...)yields 30 or fewer batches,t0remainsNone(orn - 30 == 0), soms = 1000 * (time.time() - t0) / (n - 30)crashes withTypeError: unsupported operand type(s) for -: 'float' and 'NoneType'orZeroDivisionError. - Unconditional CUDA calls:
torch.cuda.synchronize(),torch.cuda.max_memory_allocated(),torch.cuda.empty_cache(), andtorch.cuda.reset_peak_memory_stats()are called without checkingovl.DEV == "cuda".
Source
simple/bench_sizes.py(lines 34–51)
Expected Behavior
- Wrap the
ovl.prefetch(...)iterator incontextlib.closing(...)so the producer thread is cancelled and joined when the loop breaks or exits. - Fail cleanly with a clear error message if fewer than 31 updates are available in the stream.
- Guard
torch.cuda.*calls withovl.DEV == "cuda".
- Lingua principale
- Python
- Stelle
- 27
- Fork
- 72
- Merge medio
- 2g 19h
- PR unite (30g)
- 45
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di AOSSIE-Org/OpenVerifiableLLM
-
[BUG]: ovl.py verify --weights crashes with AttributeError on checkpoint .pt filesForse già presa @Anurag1428 l’ha presa 1 giorno fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
AOSSIE-Org/OpenVerifiableLLM#387 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG]: verify_segment accepts empty, wrong-phase, or non-positive fork exclusions as MATCHForse già presa @Arnav0107 l’ha presa 1 giorno fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
AOSSIE-Org/OpenVerifiableLLM#385 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG]: preparation.lock install fails on macOSForse già presa @darshith2527-sketch l’ha presa 5 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
AOSSIE-Org/OpenVerifiableLLM#357 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG]: Forked runs omit timestamps for inherited chain entriesForse già presa @pavithra-r06 l’ha presa 9 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
AOSSIE-Org/OpenVerifiableLLM#334 · 3 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG]: review_ckpt.py passes a run that has .pt files no chain entry coversForse già presa @arshil42 l’ha presa 9 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
AOSSIE-Org/OpenVerifiableLLM#332 · 4 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di AOSSIE-Org/OpenVerifiableLLM
Issue simili
-
S2-12 Atualizar README.mdAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
-
bug help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
cofade/open-garden-planner#1044 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
python-commandline-toolsAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 68/100
codecrafters-io/build-your-own-x#2126 ·
I maintainer di solito rispondono entro 5 giorni
-
documentation good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
julianleno/cortai#10 ·
-
difficulty:easy func:python os:windows prio:high type:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
NatronGitHub/Natron#2029 ·
I maintainer di solito rispondono entro 1 giorno