shuinb's picture
Add files using upload-large-folder tool
df3939b verified
Raw History Blame Contribute Delete
632 Bytes
from collections import Counter
import argparse
import json
from pathlib import Path
run = Path(__file__).resolve().parent / 'run_20261025'
parser = argparse.ArgumentParser()
parser.add_argument('--run-dir', type=Path, default=run)
run = parser.parse_args().run_dir.resolve()
state = json.loads((run / 'state.json').read_text())
print('Jobs:', dict(Counter(job['status'] for job in state['jobs'])))
for gpu, worker in state.get('workers', {}).items():
print(f'GPU {gpu}: {worker}')
for job in state['jobs']:
if job['status'] in ('running', 'failed'):
print(job['id'], job['status'], job.get('stage'), job['work'])