lerobot/examples/pretrained.ipynb

57 lines
1.2 KiB
Plaintext

{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from pathlib import Path\n",
"\n",
"from IPython.display import Video\n",
"\n",
"from examples.notebook_utils import config_notebook\n",
"from lerobot.scripts.eval import eval\n",
"\n",
"OUT_DIR = Path(\"./outputs\")\n",
"POLICY = \"act\"\n",
"ENV = \"aloha\"\n",
"\n",
"# setup config\n",
"cfg = config_notebook(policy=POLICY, env=ENV, device=\"cpu\", print_config=True)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"eval(cfg, out_dir=OUT_DIR)\n",
"Video(OUT_DIR / \"eval\" / \"eval_episode_0.mp4\", embed=True)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "lerobot",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.13"
}
},
"nbformat": 4,
"nbformat_minor": 2
}