[BUG]: review_ckpt.py passes a run that has .pt files no chain entry covers

Aperta Adatta ai principianti
#332 4 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@arshil42 ci sta già lavorando.

Dal 18/11/2026.

  • #335 di @MPoojaSiyag — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
84/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
backend, testing

Direzione di ricerca

Inizia da simple/review_ckpt.py, in particolare da main() e dal ciclo sulle voci della catena, poi esamina il flusso di scrittura dei checkpoint descritto nell’issue. Aggiungi test per i file .pt non coperti e ckpt.tmp, inclusi i casi elencati per i modelli base e di conversazione, e aggiorna simple/README.md. Il lavoro è completato quando i file non coperti vengono segnalati come findings e il comando termina con codice 1.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Bug Description

simple/review_ckpt.py RUN is the review that runs before checkpoints are published. Its docstring says it checks every ckpt-XXXXX.pt in RUN, but main() only reviews the files that chain entries point to:

for entry in chain:
    path = run / f"ckpt-{entry['index']:05d}.pt"
    if not path.exists():
        continue
    ...

Any other .pt file in RUN is skipped without a word, and the review still exits 0. That includes:

  • a checkpoint with no chain entry. train writes ckpt-NNNNN.pt before it appends the entry ("Checkpoint first, then the chain entry, so a crash between them is harmless"), so a crash between the two leaves exactly this file;
  • a leftover ckpt.tmp, from a crash during torch.save;
  • base-model.pt or conversation-model.pt when the chain has no base or final entry.

Those files are pickles that would be published with the run without the content review the script exists for.

Steps to Reproduce

On main, with a run holding an honest ckpt-00000.pt for entry 0 and a copy of it saved as ckpt-00001.pt (no entry 1):

$ python simple/review_ckpt.py RUN; echo exit $?
{"file": "ckpt-00000.pt", ..., "result": "PASS"}
exit 0

ckpt-00001.pt isn't mentioned.

Expected Behavior

Fail closed: every .pt file (and ckpt.tmp) in RUN that no chain entry covers is reported as a finding, and the script exits 1.

Impact

The publication review can pass a run that contains unreviewed checkpoint files.

I'd like to fix this in main(), with tests for each case and a note in simple/README.md. This was found with an AI coding agent (Claude Code, Claude Opus 5.5), and I checked it locally.

Environment Details

main at d9531ad, Windows, Python 3.12, CPU.

Lingua principale
Python
Stelle
26
Fork
64
Merge medio
2g 11h
PR unite (30g)
71

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di AOSSIE-Org/OpenVerifiableLLM

Tutte le issue di AOSSIE-Org/OpenVerifiableLLM

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.