from pathlib import Path import re,json root=Path('/data/nyako-training-150') print((root/'status.json').read_text() if (root/'status.json').exists() else 'No status') p=root/'artifacts/logs/train.log' s=p.read_text(errors='replace') if p.exists() else '' # Only emit trainer progress/numeric diagnostics, never dataset/caption log lines. for pattern in [r'\d+%\|[^\r\n]*?(?:loss|avr_loss)[^\r\n]*',r'(?:torch\.[A-Za-z.]*Error|RuntimeError|ValueError|ImportError|ModuleNotFoundError|AssertionError|TypeError):[^\r\n]*',r'epoch \d+/\d+',r'num (?:train images|epochs|batches per epoch)[^\r\n]*']: matches=re.findall(pattern,s) for m in matches[-3:]: print(m) print('Log bytes:',p.stat().st_size if p.exists() else 0) print('Weight checkpoints:',len(list((root/'artifacts/output').glob('*.safetensors'))))