This commit is contained in:
Simon Alibert
2024-03-21 23:20:50 +01:00
parent b10960140d
commit cfbbb4e80a
2 changed files with 128 additions and 9 deletions

View File

@@ -1,3 +1,4 @@
# ruff: noqa
from pprint import pprint
from hydra import compose, initialize
@@ -29,3 +30,31 @@ def config_notebook(
pprint(OmegaConf.to_container(cfg))
return cfg
def notebook():
"""tmp"""
from pathlib import Path
from examples.notebook_utils import config_notebook
from lerobot.scripts.eval import eval
# Select policy and env
POLICY = "act" # "tdmpc" | "diffusion"
ENV = "aloha" # "pusht" | "simxarm"
# Select device
DEVICE = "mps" # "cuda" | "mps"
# Generated videos will be written here
OUT_DIR = Path("./outputs")
OUT_EXAMPLE = OUT_DIR / "eval" / "eval_episode_0.mp4"
# Setup config
cfg = config_notebook(policy=POLICY, env=ENV, device=DEVICE, print_config=False)
eval(cfg, out_dir=OUT_DIR)
if __name__ == "__main__":
notebook()