From 234f374327700f9c67745ad3857bc31b116721e1 Mon Sep 17 00:00:00 2001 From: Tucker Date: Tue, 12 Jul 2022 09:10:19 -0400 Subject: [PATCH] Do final updates. --- examples/demo_test.py | 30 ------------------- .../create_run_visualize.ipynb} | 2 +- 2 files changed, 1 insertion(+), 31 deletions(-) delete mode 100644 examples/demo_test.py rename examples/{demo_mock.ipynb => env/create_run_visualize.ipynb} (97%) diff --git a/examples/demo_test.py b/examples/demo_test.py deleted file mode 100644 index 991a52809e..0000000000 --- a/examples/demo_test.py +++ /dev/null @@ -1,30 +0,0 @@ -import sys - -sys.path.insert(0, "./") -import gym - -import examples.env.figure_eight_env -import zoo.policies.keep_lane_agent - -from smarts.core.utils.episodes import episode_range -from smarts.env.wrappers.episode_logger import EpisodeLogger -from smarts.env.wrappers.record_video import RecordVideo -from smarts.zoo import registry - -if __name__ == "__main__": - # FormatObs should already be applied - env = gym.make("figure_eight-v0") - env: gym.Env = RecordVideo( - env, video_folder="videos", video_length=40, step_trigger=lambda s: s % 100 == 0 - ) - env: gym.Env = EpisodeLogger(env) - - agent = registry.make_agent("zoo.policies:keep-lane-agent-v0") - for episode in episode_range(max_steps=450): - observation = env.reset() - reward, done, info = None, False, None - while episode.continues(observation, reward, done, info): - action = agent.act(observation) - observation, reward, done, info = env.step(action) - - env.close() diff --git a/examples/demo_mock.ipynb b/examples/env/create_run_visualize.ipynb similarity index 97% rename from examples/demo_mock.ipynb rename to examples/env/create_run_visualize.ipynb index c6ff2215ee..f78c8497ef 100644 --- a/examples/demo_mock.ipynb +++ b/examples/env/create_run_visualize.ipynb @@ -22,7 +22,7 @@ "outputs": [], "source": [ "!git clone https://github.com/huawei-noah/SMARTS 2> /dev/null\n", - "!cd SMARTS && ls && git checkout ipynb-test-deps && pip install .[camera-obs,remote_agent]" + "!cd SMARTS && ls && git checkout develop && pip install .[camera-obs,remote_agent]" ] }, {