AgentStack
SKILL unreviewed MIT Self-run

Plot Train Z1

skill-phanghonghao-thu-awesome-skills-plot-train-z1 · by phanghonghao

Generate and sync Z1 12DOF training learning curve plots from TensorBoard data on the RTX server, then compile a single-page A4 PDF report with plots + data analysis. Use when user mentions "plot training", "learning curve", "generate plots", "update plots", "学习曲线", "生成图表", "训练曲线", "训练报告", "生成报告".

No reviews yet
0 installs
10 views
0.0% view→install

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

⚠ Flagged

1 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.

Are you the author of Plot Train Z1? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

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:

  1. SSH to RTX server
  2. Check if plot_learning_curves.py exists at the expected path
  3. 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" ``

  1. 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 ```

  1. 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 ``

  1. 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" ```

  1. Generate PDF report (local):

``bash cd "D:/Desktop_Files/GPU-Train/RTX6000/Magicbot_Z1" python scripts/gen_report_pdf.py --alias $ALIAS ``

  1. 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_coarse2026-05-06_15-47-12_p1_coarse
  • p1_fine2026-05-06_17-40-13_p1_fine
  • p2_coarse2026-05-06_18-49-40_p2_coarse
  • p2_fine2026-05-06_19-33-51_p2_fine
  • p3_coarse2026-05-07_03-56-16_p3_coarse

Legacy single-stage runs:

  • s1_flat2026-04-30_04-53-17_s1_flat
  • s2_gentle2026-05-01_04-50-05_s2_gentle
  • s3_rough_l22026-05-01_07-04-35_s3_rough_l2
  • s4_full2026-05-04_16-56-05_s4_full_terrain
  • s4_flat_deploy2026-05-05_04-47-06_s4_flat_deploy
  • s5_explicit_pd2026-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:

  1. Resolve alias to full run dir name (check RUN_ALIASES in the plot script)
  2. 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 " ``

  1. 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 ```

  1. 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" ```

  1. Generate PDF report (local):

``bash cd "D:/Desktop_Files/GPU-Train/RTX6000/Magicbot_Z1" python scripts/gen_report_pdf.py --alias $ALIAS ``

  1. 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:

  1. Read D:/Desktop_Files/GPU-Train/RTX6000/Magicbot_Z1/best_models.json
  2. List existing PNG files in per-run subfolders under plots/
  3. Update the overview table, key findings, and recommendations sections
  4. Ensure image references use plots// paths

--all-runs

Generate all 4 plots + PDF reports for every run with >5000 data points.

Steps:

  1. SSH to server, list all run directories
  2. For each significant run, run with --focus_run
  3. For each run, download and organize into plots// folder
  4. 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" ```

  1. For each run, run gen_report_pdf.py --alias locally
  2. 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:

  1. Read D:/Desktop_Files/GPU-Train/RTX6000/Magicbot_Z1/docs/tracking/bestmodel_phase.json to get all run aliases
  2. 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" ```

  1. 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 " ``

  1. Download and organize into per-run folders (same as --focus flow)
  2. Generate PDF report for each run:

``bash cd "D:/Desktop_Files/GPU-Train/RTX6000/Magicbot_Z1" python scripts/gen_report_pdf.py --alias ``

  1. Open all generated PDFs

Important: Server-side plot_learning_curves.py uses a smart x-axis formatter that adapts precision:

  • Values = 10k → .0f precision (e.g. "12k, 15k, 20k")

--pdf-only

Only regenerate the PDF report from existing plot PNGs (skip server plot generation).

Steps:

  1. Verify all 4 PNGs exist in plots//
  2. 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" ```

  1. Run:

``bash cd "D:/Desktop_Files/GPU-Train/RTX6000/Magicbot_Z1" python scripts/gen_report_pdf.py --alias ``

  1. 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.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.