Skip to content

Add live gamma sweep visualization for safeMPPI vs CFM-MPPI - #1

Open
DHLeexpress wants to merge 11 commits into
masterfrom
feature/live-gamma-visualization
Open

Add live gamma sweep visualization for safeMPPI vs CFM-MPPI#1
DHLeexpress wants to merge 11 commits into
masterfrom
feature/live-gamma-visualization

Conversation

@DHLeexpress

Copy link
Copy Markdown
Owner

Summary

Adds a gamma-sweep visualization workflow comparing Mizuta CFM-MPPI against online safeMPPI across gamma in [0, 1].

What changed

  • Adds rollout utilities for Mizuta CFM-MPPI and safeMPPI gamma sweeps.
  • Streams per-episode records to gamma_sweep_records.jsonl.
  • Writes summary.csv, summary.json, and summary.md.
  • Renders a three-panel animation with trajectory, success/collision over gamma, and safety/performance/compute over gamma.
  • Adds scripts/run_gamma_sweep.sh.
  • Adds scripts/train_gpc_then_gamma_sweep.sh to train safe contextual CFM/GPC before running the sweep.
  • Adds docs/GAMMA_SWEEP.md with the overnight commands.

Verification

  • Static syntax check was run locally on the added Python modules with python -m py_compile.
  • A lightweight gamma-grid check is included under checks/gamma_grid_check.py.

Notes

safeMPPI itself is not trained. Mizuta's pretrained model is expected at output_dir/cfm_transformer/checkpoint.pth. The GPC/safe contextual CFM training step requires the local canonical dataset files and should be run on the target Ubuntu machine.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 46a40d863e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@@ -0,0 +1,26 @@
#!/usr/bin/env bash

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Make the sweep script executable

This script is documented and invoked as scripts/run_gamma_sweep.sh, but the new file is committed with mode 100644 while the existing runnable scripts in this repo are 100755. On a fresh checkout, both the documented command and the chained call from train_gpc_then_gamma_sweep.sh fail with Permission denied; commit it executable or invoke it via bash.

Useful? React with 👍 / 👎.

Comment on lines +17 to +21
python -m cfm_mppi.training.train_safe_cfm \
--epochs "$GPC_EPOCHS" \
--batch-size "$GPC_BATCH_SIZE" \
--device "$GPC_DEVICE" \
$GPC_EXTRA_ARGS 2>&1 | tee logs/train_gpc_overnight.log

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Do not train a checkpoint the sweep never loads

When SKIP_GPC_TRAIN is unset, this overnight path trains output_dir/safe_contextual_cfm/checkpoint_best.pth, but the subsequent gamma sweep only runs rollout_mizuta and online rollout_safemppi with SafeMPPIAdapter; the --safe-cfm-checkpoint value is not used on that path. This can spend hours training a model whose checkpoint cannot affect the reported comparison, making experiment results misleading unless the sweep actually evaluates the trained policy or the training step is removed.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant