Install
$ agentstack add skill-phanghonghao-thu-awesome-skills-plot-train-z1 Open-source listing — not yet scanned by AgentStack. Follow the source repository for install instructions.
Security review
⚠ Flagged1 finding(s); flagged for manual review. · v0.1.0 How review works →
- • Prompt-injection patterns
- • Secret / credential exfiltration
- • Dangerous shell & filesystem operations
- • Untrusted network calls
- • Known-malicious package signatures
- high Destructive filesystem operation.
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
Plot Train Z1 — Learning Curve Plot Generator + PDF Report
Generate Z1 12DOF locomotion training plots from TensorBoard data on the RTX 6000 server, download locally, and compile a single-page A4 PDF report.
Platform
| Property | Value | |----------|-------| | SSH Host | phh@192.168.120.155 (VPN required) | | Conda Env | isaaclab | | Project Root (server) | ~/magiclab_rl_lab | | Log Root (server) | ~/magiclab_rl_lab/logs/rsl_rl/magiclab_z1_12dof_velocity | | Plot Script (server) | ~/magiclab_rl_lab/scripts/plot_learning_curves.py | | Output Dir (server) | ~/magiclab_rl_lab/plots | | Local Plots Dir | D:/Desktop_Files/GPU-Train/RTX6000/Magicbot_Z1/plots/phase/ | | Report Script (local) | D:/Desktop_Files/GPU-Train/RTX6000/Magicbot_Z1/scripts/gen_report_pdf.py | | bestmodels.json | D:/Desktop_Files/GPU-Train/RTX6000/Magicbot_Z1/best_models.json | | bestmodelphase.json | D:/Desktop_Files/GPU-Train/RTX6000/Magicbot_Z1/docs/tracking/bestmodel_phase.json |
VPN
RTX server requires VPN connection. Use aTrust VPN (shortcut: C:\Users\Public\Desktop\aTrust.lnk). If SSH connection fails, remind user to connect VPN first.
best_models.json Update (Pre-report)
Before generating any PDF report, always update best_models.json so the report has full metrics (peak reward, overfitting status, etc.) rather than relying on the SSH fallback.
Update step (run before gen_report_pdf.py):
# 1. Run train_monitor on RTX to regenerate best_models.json
ssh phh@192.168.120.155 "source ~/miniconda3/etc/profile.d/conda.sh && conda activate isaaclab && cd ~/magiclab_rl_lab && python -u scripts/train_monitor.py --once --terrain gentle 2>/dev/null"
# 2. Download updated best_models.json
scp phh@192.168.120.155:~/magiclab_rl_lab/logs/rsl_rl/magiclab_z1_12dof_velocity/best_models.json \
"D:/Desktop_Files/GPU-Train/RTX6000/Magicbot_Z1/best_models.json"
This ensures new pipeline runs (p1coarse, p1fine, p2_coarse, etc.) are tracked with proper overfitting detection data.
Local Directory Structure
Plots and reports are organized per-run:
plots/
├── phase_p1/
│ ├── 1_reward_trend.png
│ ├── 2_reward_decomposition.png
│ ├── 3_termination.png
│ ├── 4_efficiency.png
│ ├── report_phase_p1.pdf ← auto-generated A4 PDF
│ ├── report_phase_p1.tex ← preserved LaTeX source
│ └── report_phase_p1.md ← Markdown summary
├── s4_full/
│ ├── ...
│ └── report_s4_full.pdf
└── README.md
Re-running for the same run replaces old files (no accumulation).
Commands
The skill supports the following arguments (parsed from the user's invocation):
Default (no arguments)
Generate all 4 plots on the server + download + compile PDF report.
Steps:
- SSH to RTX server
- Check if
plot_learning_curves.pyexists at the expected path - Run the script on the server:
``bash ssh phh@192.168.120.155 "cd ~/magiclab_rl_lab && source ~/miniconda3/etc/profile.d/conda.sh && conda activate isaaclab && python scripts/plot_learning_curves.py --log_root logs/rsl_rl/magiclab_z1_12dof_velocity --output_dir plots" ``
- Download PNG files to temp directory, then organize into per-run folder:
```bash LOCALPLOTS="D:/DesktopFiles/GPU-Train/RTX6000/Magicbot_Z1/plots"
mkdir -p /tmp/z1plots scp phh@192.168.120.155:~/magiclabrllab/plots/*.png /tmp/z1plots/
ALIAS=$(ls /tmp/z1plots/.png 2>/dev/null | head -1 | sed 's/.\([a-z0-9]\)\.png/\1/' | xargs basename -s .png | sed 's/.//')
mkdir -p "$LOCALPLOTS/$ALIAS" rm -f "$LOCALPLOTS/$ALIAS/"*.png mv /tmp/z1plots/1rewardtrend${ALIAS}.png "$LOCALPLOTS/$ALIAS/1rewardtrend.png" mv /tmp/z1plots/2rewarddecomposition${ALIAS}.png "$LOCALPLOTS/$ALIAS/2rewarddecomposition.png" mv /tmp/z1plots/3termination${ALIAS}.png "$LOCALPLOTS/$ALIAS/3termination.png" mv /tmp/z1plots/4efficiency${ALIAS}.png "$LOCALPLOTS/$ALIAS/4efficiency.png" rm -rf /tmp/z1_plots ```
- Clean up old flat-format files (first run only):
``bash rm -f "$LOCAL_PLOTS/1_reward_comparison.png" rm -f "$LOCAL_PLOTS/2_reward_decomposition_"*.png rm -f "$LOCAL_PLOTS/3_termination_"*.png rm -f "$LOCAL_PLOTS/4_efficiency_"*.png ``
- Update best_models.json (before generating report):
```bash ssh phh@192.168.120.155 "source ~/miniconda3/etc/profile.d/conda.sh && conda activate isaaclab && cd ~/magiclabrllab && python -u scripts/train_monitor.py --once --terrain gentle 2>/dev/null"
scp phh@192.168.120.155:~/magiclabrllab/logs/rslrl/magiclabz112dofvelocity/bestmodels.json \ "D:/DesktopFiles/GPU-Train/RTX6000/MagicbotZ1/bestmodels.json" ```
- Generate PDF report (local):
``bash cd "D:/Desktop_Files/GPU-Train/RTX6000/Magicbot_Z1" python scripts/gen_report_pdf.py --alias $ALIAS ``
- Open the PDF for the user:
``bash start "" "$LOCAL_PLOTS/$ALIAS/report_$ALIAS.pdf" ``
--focus
Specify a focus run for all 4 plots + PDF report.
Run aliases (from plot script RUN_ALIASES):
5-phase pipeline runs:
p1_coarse→2026-05-06_15-47-12_p1_coarsep1_fine→2026-05-06_17-40-13_p1_finep2_coarse→2026-05-06_18-49-40_p2_coarsep2_fine→2026-05-06_19-33-51_p2_finep3_coarse→2026-05-07_03-56-16_p3_coarse
Legacy single-stage runs:
s1_flat→2026-04-30_04-53-17_s1_flats2_gentle→2026-05-01_04-50-05_s2_gentles3_rough_l2→2026-05-01_07-04-35_s3_rough_l2s4_full→2026-05-04_16-56-05_s4_full_terrains4_flat_deploy→2026-05-05_04-47-06_s4_flat_deploys5_explicit_pd→2026-05-05_13-57-30_s5_explicit_pd
Note: New pipeline runs are added as they start. Always check RUN_ALIASES in the server script for the latest list.
Steps:
- Resolve alias to full run dir name (check
RUN_ALIASESin the plot script) - Run with
--focus_run:
``bash ssh phh@192.168.120.155 "cd ~/magiclab_rl_lab && source ~/miniconda3/etc/profile.d/conda.sh && conda activate isaaclab && python scripts/plot_learning_curves.py --log_root logs/rsl_rl/magiclab_z1_12dof_velocity --output_dir plots --focus_run " ``
- Download and organize into per-run folder:
```bash LOCALPLOTS="D:/DesktopFiles/GPU-Train/RTX6000/Magicbot_Z1/plots" ALIAS=""
mkdir -p /tmp/z1plots scp phh@192.168.120.155:~/magiclabrllab/plots/*.png /tmp/z1plots/
mkdir -p "$LOCALPLOTS/$ALIAS" rm -f "$LOCALPLOTS/$ALIAS/"*.png mv /tmp/z1plots/1rewardtrend${ALIAS}.png "$LOCALPLOTS/$ALIAS/1rewardtrend.png" mv /tmp/z1plots/2rewarddecomposition${ALIAS}.png "$LOCALPLOTS/$ALIAS/2rewarddecomposition.png" mv /tmp/z1plots/3termination${ALIAS}.png "$LOCALPLOTS/$ALIAS/3termination.png" mv /tmp/z1plots/4efficiency${ALIAS}.png "$LOCALPLOTS/$ALIAS/4efficiency.png" rm -rf /tmp/z1_plots ```
- Update best_models.json (before generating report):
```bash ssh phh@192.168.120.155 "source ~/miniconda3/etc/profile.d/conda.sh && conda activate isaaclab && cd ~/magiclabrllab && python -u scripts/train_monitor.py --once --terrain gentle 2>/dev/null"
scp phh@192.168.120.155:~/magiclabrllab/logs/rslrl/magiclabz112dofvelocity/bestmodels.json \ "D:/DesktopFiles/GPU-Train/RTX6000/MagicbotZ1/bestmodels.json" ```
- Generate PDF report (local):
``bash cd "D:/Desktop_Files/GPU-Train/RTX6000/Magicbot_Z1" python scripts/gen_report_pdf.py --alias $ALIAS ``
- Open the PDF:
``bash start "" "$LOCAL_PLOTS/$ALIAS/report_$ALIAS.pdf" ``
--sync
Download latest TensorBoard data and regenerate all plots + PDF. Equivalent to default but forces re-read of all event files.
This is the same as the default flow — the script always reads from TensorBoard event files, so re-running naturally syncs.
--update-readme
Only update the local plots/README.md without regenerating plots.
Steps:
- Read
D:/Desktop_Files/GPU-Train/RTX6000/Magicbot_Z1/best_models.json - List existing PNG files in per-run subfolders under
plots/ - Update the overview table, key findings, and recommendations sections
- Ensure image references use
plots//paths
--all-runs
Generate all 4 plots + PDF reports for every run with >5000 data points.
Steps:
- SSH to server, list all run directories
- For each significant run, run with
--focus_run - For each run, download and organize into
plots//folder - Update best_models.json (once, before all reports):
```bash ssh phh@192.168.120.155 "source ~/miniconda3/etc/profile.d/conda.sh && conda activate isaaclab && cd ~/magiclabrllab && python -u scripts/train_monitor.py --once --terrain gentle 2>/dev/null"
scp phh@192.168.120.155:~/magiclabrllab/logs/rslrl/magiclabz112dofvelocity/bestmodels.json \ "D:/DesktopFiles/GPU-Train/RTX6000/MagicbotZ1/bestmodels.json" ```
- For each run, run
gen_report_pdf.py --aliaslocally - This may take several minutes — warn the user
--pipeline
Generate plots + PDF reports for all runs tracked in bestmodel_phase.json. This is the recommended way to batch-generate reports for 5-phase pipeline runs.
Steps:
- Read
D:/Desktop_Files/GPU-Train/RTX6000/Magicbot_Z1/docs/tracking/bestmodel_phase.jsonto get all run aliases - Update best_models.json (once, before all reports):
```bash ssh phh@192.168.120.155 "source ~/miniconda3/etc/profile.d/conda.sh && conda activate isaaclab && cd ~/magiclabrllab && python -u scripts/train_monitor.py --once --terrain gentle 2>/dev/null"
scp phh@192.168.120.155:~/magiclabrllab/logs/rslrl/magiclabz112dofvelocity/bestmodels.json \ "D:/DesktopFiles/GPU-Train/RTX6000/MagicbotZ1/bestmodels.json" ```
- For each run in bestmodel_phase.json (that has data), generate plots on server:
``bash ssh phh@192.168.120.155 "cd ~/magiclab_rl_lab && source ~/miniconda3/etc/profile.d/conda.sh && conda activate isaaclab && python scripts/plot_learning_curves.py --log_root logs/rsl_rl/magiclab_z1_12dof_velocity --output_dir plots --focus_run " ``
- Download and organize into per-run folders (same as
--focusflow) - Generate PDF report for each run:
``bash cd "D:/Desktop_Files/GPU-Train/RTX6000/Magicbot_Z1" python scripts/gen_report_pdf.py --alias ``
- Open all generated PDFs
Important: Server-side plot_learning_curves.py uses a smart x-axis formatter that adapts precision:
- Values = 10k →
.0fprecision (e.g. "12k, 15k, 20k")
--pdf-only
Only regenerate the PDF report from existing plot PNGs (skip server plot generation).
Steps:
- Verify all 4 PNGs exist in
plots// - Update best_models.json:
```bash ssh phh@192.168.120.155 "source ~/miniconda3/etc/profile.d/conda.sh && conda activate isaaclab && cd ~/magiclabrllab && python -u scripts/train_monitor.py --once --terrain gentle 2>/dev/null"
scp phh@192.168.120.155:~/magiclabrllab/logs/rslrl/magiclabz112dofvelocity/bestmodels.json \ "D:/DesktopFiles/GPU-Train/RTX6000/MagicbotZ1/bestmodels.json" ```
- Run:
``bash cd "D:/Desktop_Files/GPU-Train/RTX6000/Magicbot_Z1" python scripts/gen_report_pdf.py --alias ``
- Open the PDF
Error Handling
| Error | Action | |-------|--------| | SSH connection refused | Remind user to connect aTrust VPN | | plot_learning_curves.py not found | Script may not be uploaded yet; offer to create it from local copy at D:/Desktop_Files/GPU-Train/RTX6000/Magicbot_Z1/scripts/plot_learning_curves.py | | No TensorBoard events | Run may not have started or crashed; check training log | | Python import error (tensorboard) | Install: pip install tensorboard matplotlib | | SCP fails | Check VPN, try with -o StrictHostKeyChecking=no | | gen_report_pdf.py fails | Check MikTeX is installed, all 4 PNGs exist, best_models.json is valid | | pdflatex not found | Check MikTeX installation at C:\MiKTeX\miktex\bin\x64\pdflatex.exe |
Output Files
After successful generation, the following files should exist in plots//:
| File | Description | |------|-------------| | 1_reward_trend.png | Single run reward trend with peak/best annotations + progress bar | | 2_reward_decomposition.png | Reward components + curriculum progress | | 3_termination.png | Termination reasons + episode length | | 4_efficiency.png | Throughput, time, entropy, LR | | report_.pdf | Single-page A4 PDF with 4 plots + data summary + analysis | | report_.tex | LaTeX source (preserved for reference) | | report_.md | Markdown summary with metrics table and analysis |
References
See references/plots.md for detailed plot type descriptions and interpretation guide.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: phanghonghao
- Source: phanghonghao/THU-Awesome-Skills
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.