Install
openclaw skills install model-resource-profilerAnalyze model training or inference resource behavior from profiler artifacts, with focus on GPU memory (VRAM) and CPU hotspots. Uses JSON/JSON.GZ artifacts only to avoid unsafe deserialization.
openclaw skills install model-resource-profilerUse this skill to produce a reproducible resource report from one or both inputs:
traceEvents)scripts/analyze_profile.py for summary extraction.references/interpretation.md.Run memory + CPU together:
python3 scripts/analyze_profile.py \
--memory-json /path/to/memory_snapshot.json \
--cpu-trace /path/to/trace.json.gz \
--md-out /tmp/profile_report.md \
--json-out /tmp/profile_report.json
Run CPU-only:
python3 scripts/analyze_profile.py \
--cpu-trace /path/to/trace.json.gz \
--md-out /tmp/cpu_report.md
Run memory-only:
python3 scripts/analyze_profile.py \
--memory-json /path/to/memory_snapshot.json \
--md-out /tmp/memory_report.md
Trusted environment conversion example (if user currently has pickle workflow):
import json
import torch
snapshot = torch.cuda.memory._snapshot()
with open("memory_snapshot.json", "w", encoding="utf-8") as f:
json.dump(snapshot, f)
Always provide:
references/interpretation.mdscripts/analyze_profile.py