File size: 1,066 Bytes
23e73f9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import os
from tensorboard.backend.event_processing.event_accumulator import EventAccumulator

target_dir = "/root/autodl-tmp/SplatAtlas/outputs/2dgs_barn"
tb_files = [os.path.join(target_dir, f) for f in os.listdir(target_dir) if "events.out.tfevents" in f]

if not tb_files:
    print("No events found.")
    exit()

ea = EventAccumulator(tb_files[0])
ea.Reload()

# 检查几个关键标量的值
interesting_scalars = [
    'train/loss', 
    'train/num_gaussians', 
    'train/peak_vram_GB', 
    'train/grad_cos_sim'
]

print(f"{'Metric':<25} | {'Last Value':<15} | {'Step':<10}")
print("-" * 55)

for tag in interesting_scalars:
    if tag in ea.Tags().get('scalars', []):
        events = ea.Scalars(tag)
        if events:
            last_event = events[-1]
            print(f"{tag:<25} | {last_event.value:<15.6f} | {last_event.step:<10}")

# 检查直方图是否有数据点
print("\nHistogram Status:")
for tag in ea.Tags().get('histograms', []):
    hist_events = ea.Histograms(tag)
    print(f"  - {tag:<30}: {len(hist_events)} snapshots recorded")