File size: 880 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 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
import os
from tensorboard.backend.event_processing.event_accumulator import EventAccumulator
target_dir = "/root/autodl-tmp/SplatAtlas/outputs/2dgs_barn"
if not os.path.exists(target_dir):
print("Directory not found.")
exit()
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 TensorBoard files found.")
exit()
ea = EventAccumulator(tb_files[0])
ea.Reload()
print("Recorded Scalars:")
for tag in ea.Tags().get('scalars', []):
print(f" - {tag}")
print("\nRecorded Histograms:")
for tag in ea.Tags().get('histograms', []):
print(f" - {tag}")
if 'peak_vram_GB' in ea.Tags().get('scalars', []):
vram_events = ea.Scalars('peak_vram_GB')
print(f"\nLast recorded VRAM: {vram_events[-1].value:.2f} GB at step {vram_events[-1].step}")
|