From f41240ffc6e380bf962b15ad1a7f4f7fce41f618 Mon Sep 17 00:00:00 2001 From: Karl Pertsch Date: Fri, 19 Jan 2024 18:20:41 -0500 Subject: [PATCH 1/2] fix aloha sim env registration imports --- examples/03_eval_finetuned.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/examples/03_eval_finetuned.py b/examples/03_eval_finetuned.py index a6964fda..77c4b17b 100644 --- a/examples/03_eval_finetuned.py +++ b/examples/03_eval_finetuned.py @@ -6,16 +6,25 @@ Then run: pip3 install opencv-python modern_robotics pyrealsense2 h5py_cache pyquaternion pyyaml rospkg pexpect mujoco==2.3.3 dm_control==1.0.9 einops packaging h5py -Finally modify the sys.path.append statement below to add the ACT repo to your path and start a virtual display: +Finally, modify the `sys.path.append` statement below to add the ACT repo to your path. +If you are running this on a head-less server, start a virtual display: Xvfb :1 -screen 0 1024x768x16 & export DISPLAY=:1 + +To run this script, run: + cd examples + python3 03_eval_finetuned.py --filetuned_path= """ from absl import app, flags, logging import gym import jax import numpy as np +import sys import wandb +sys.path.append("path/to/your/act") + +from envs.aloha_sim_env import AlohaGymEnv # keep this to register ALOHA sim env from octo.model.octo_model import OctoModel from octo.utils.gym_wrappers import HistoryWrapper, RHCWrapper, UnnormalizeActionProprio From 57cc7d44c86eac389dedd0a04a2476999f511d03 Mon Sep 17 00:00:00 2001 From: Karl Pertsch Date: Fri, 19 Jan 2024 18:26:55 -0500 Subject: [PATCH 2/2] fix pre-commit --- .pre-commit-config.yaml | 2 +- examples/03_eval_finetuned.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7c796637..adcb5435 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -24,7 +24,7 @@ repos: rev: 6.1.0 hooks: - id: flake8 - exclude: ^experiments/ + exclude: ^experiments/|^examples/03_eval_finetuned.py - repo: https://github.com/pycqa/isort rev: 5.12.0 hooks: diff --git a/examples/03_eval_finetuned.py b/examples/03_eval_finetuned.py index 77c4b17b..b5211c04 100644 --- a/examples/03_eval_finetuned.py +++ b/examples/03_eval_finetuned.py @@ -15,16 +15,18 @@ cd examples python3 03_eval_finetuned.py --filetuned_path= """ +import sys + from absl import app, flags, logging import gym import jax import numpy as np -import sys import wandb sys.path.append("path/to/your/act") -from envs.aloha_sim_env import AlohaGymEnv # keep this to register ALOHA sim env +from envs.aloha_sim_env import AlohaGymEnv # keep this to register ALOHA sim env + from octo.model.octo_model import OctoModel from octo.utils.gym_wrappers import HistoryWrapper, RHCWrapper, UnnormalizeActionProprio