Download scripts/check_tb.py from KCBtheone/SplatAtlas: direct link, hf CLI and curl.
- Browser
- Download file 880 Bytes
-
https://huggingface.co/KCBtheone/SplatAtlas/resolve/main/scripts/check_tb.py
- Command line
-
hf download hf://KCBtheone/SplatAtlas/scripts/check_tb.py
-
curl -L -o check_tb.py https://huggingface.co/KCBtheone/SplatAtlas/resolve/main/scripts/check_tb.py
880 Bytes
| 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}") | |