Skip to content

Add src/scripts/run_policy.py#50

Draft
Arcilios with Copilot wants to merge 2 commits into
mainfrom
copilot/find-run-policy-file
Draft

Add src/scripts/run_policy.py#50
Arcilios with Copilot wants to merge 2 commits into
mainfrom
copilot/find-run-policy-file

Conversation

Copilot AI commented Feb 21, 2026

Copy link
Copy Markdown

run_policy.py was absent from every branch in the repository. This adds it as a first-class sibling to play.py and train.py in src/scripts/.

Changes

  • src/scripts/run_policy.py — CLI script to load and execute a trained PPO policy in MuJoCo/MJX simulation
    • Reuses get_rollout / save_rollout from src/tools/rollouts.py — no duplicated rollout logic
    • Optional --save_video flag renders and saves side/back camera footage via the existing render pipeline
    • Loads env config from the run's .hydra/config.yaml, matching the pattern in train.py

Usage

# Run policy, print frame count
python src/scripts/run_policy.py --run_dir /path/to/run --checkpoint 5000000

# Run policy and save video
python src/scripts/run_policy.py --run_dir /path/to/run --checkpoint 5000000 \
    --save_video --output my_rollout --num_steps 500

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: Arcilios <190793348+Arcilios@users.noreply.github.com>
Copilot AI changed the title [WIP] Locate run_policy.py in all branches Add src/scripts/run_policy.py Feb 21, 2026
Copilot AI requested a review from Arcilios February 21, 2026 23:07
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.

2 participants