Goal: Tune the training environment to make the reach policy work!
Make accounts (or use existing accounts):
- Tailscale (use a non-utexas.edu email)
- Follow the instructions on account creation to install Tailscale on your local machine
- When prompted to add a second device, skip the tutorial
- Github
- wandb (select Models under "What do you want to try first?", if prompted)
Install:
- Visual Studio Code or an IDE of your choosing
- git
- uv
Add the server machine to your Tailnet (get link from class recording, 11/13).
Fork this repository, then clone your forked repository. Also clone the robot_rl feature/barebones branch.
git clone https://github.com/<username>/so101_isaac.git
git clone https://github.com/KyleM73/robot_rl.gitFill out scripts/local_ray/.env.ray and scripts/local_ray/job_config.yaml. Use absolute paths (should start with /home/<user>/...)
A couple of notes:
- All commands below are run from the
so101/scriptsdirectory.- If you are in a conda environment, deactivate it first with
conda deactivate.- Some of the commands below may be different on Windows. See below for command equivalents.
Install Python dependencies:
uv syncActivate the uv environment. You will need to do this each time you open a new shell, before running any of the scripts.
source .venv/bin/activateEnsure connectivity to the server with
./ray.sh listThis should display a blank table.
- Sends a job to the server.
- You can modify the script that runs (e.g. between
train.pyandplay.py) in thepython_scriptfield ofjob_config.yaml
- You can modify the script that runs (e.g. between
- Can be followed by any arguments you'd like to pass to the script (e.g.
--task reach-v0) - Note that once you start a job, the program will output the logs from the job into your shell. You can exit this (Ctrl-C) without affecting the job
- Stop a running job
- Can provide additional arguments (see
ray job stopdocs)
- List your currently running jobs, ascending by start time
- View all users' runs with
--all_users - View the status of all runs with
--all_statuses
- Download and print logs for a job
- Can provide additional arguments (see
ray job logsdocs) - You can redirect the output to a file with the
>operator:./ray.sh logs <job_id> > <file_path> - Generally, you can use W&B to view your run logs and metrics. This function is mainly for when your job fails before it can deploy, or if you aren't using W&B
tasks/reach_env_cfg.py: the main environment configagents/rsl_rl_ppo_cfg.py: config for the PPO runnermdp/rewards.py: definitions for reward functionsscripts/train.pyandscripts/play.py: train and play scripts
When you commit changes to your branch, DON'T push the changes in .env.ray (never push API keys to Github).