From 7dc7cb0eac24618d75aa65bede06324204fd1a87 Mon Sep 17 00:00:00 2001 From: Adam Scibior Date: Thu, 25 Apr 2024 16:45:44 -0700 Subject: [PATCH 1/4] Update traffic-light to traffic_light --- torchdriveenv/gym_env.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torchdriveenv/gym_env.py b/torchdriveenv/gym_env.py index 4dcd5b4..c688d9c 100644 --- a/torchdriveenv/gym_env.py +++ b/torchdriveenv/gym_env.py @@ -180,7 +180,7 @@ def build_simulator(cfg: EnvConfig, map_cfg, device, ego_state, scenario=None, c with torch.no_grad(): traffic_light_controller = map_cfg.traffic_light_controller initial_light_state_name = traffic_light_controller.current_state_with_name - traffic_light_ids = [stopline.actor_id for stopline in map_cfg.stoplines if stopline.agent_type == 'traffic-light'] + traffic_light_ids = [stopline.actor_id for stopline in map_cfg.stoplines if stopline.agent_type == 'traffic_light'] driving_surface_mesh = map_cfg.road_mesh From a1070c9fa207a3b1c32d7ce753f1fd330206008f Mon Sep 17 00:00:00 2001 From: Adam Scibior Date: Thu, 25 Apr 2024 16:47:12 -0700 Subject: [PATCH 2/4] Set lower bounds on invertedai and torchdrivesim --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index bffddd8..6ae026c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,12 +22,12 @@ dependencies = [ "scipy", "imageio", "torch>=1.10.1", - "invertedai", + "invertedai>=0.0.16", "omegaconf", "opencv-python", "gymnasium", "lanelet2", - "torchdrivesim", + "torchdrivesim>=0.2.1", ] dynamic = ["version",] From bc1dbbeca4f768c21c6f7ef4bf3a4d484686fec7 Mon Sep 17 00:00:00 2001 From: Adam Scibior Date: Thu, 25 Apr 2024 17:16:10 -0700 Subject: [PATCH 3/4] Update installation instructions to use PyPI --- Dockerfile | 2 +- README.md | 10 +--------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index a3272fa..0d0599f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,4 +34,4 @@ RUN pip install jupyter notebook RUN pip install omegaconf scipy shapely RUN pip install invertedai RUN pip install torchdrivesim -RUN pip install "torchdriveenv[baselines] @ git+https://github.com/inverted-ai/torchdriveenv.git" +RUN pip install torchdriveenv[baselines] diff --git a/README.md b/README.md index ef4830f..433419b 100644 --- a/README.md +++ b/README.md @@ -6,18 +6,13 @@ The basic installation of torchdriveenv uses an OpenCV renderer, which is slower To install the “torchdriveenv” with opencv rendering: ``` -python3 -m venv $PHTHON_VIRTUAL_ENV_PATH -source .venv/bin/activate -pip install "torchdriveenv[baselines] @ git+https://github.com/inverted-ai/torchdriveenv.git" +pip install torchdriveenv ``` To run examples: Set the `$IAI_API_KEY` and `$WANDB_API_KEY` ``` -git clone git@github.com:inverted-ai/torchdriveenv.git -cd torchdriveenv cd examples -source $PHTHON_VIRTUAL_ENV_PATH/bin/activate python rl_training.py ``` @@ -25,15 +20,12 @@ python rl_training.py To install the “torchdriveenv” with Pytorch3d rendering: ``` -git clone git@github.com:inverted-ai/torchdriveenv.git -cd torchdriveenv docker build --target torchdriveenv-first-release -t torchdriveenv-first-release:latest . ``` To run examples: Set the `$IAI_API_KEY` and `$WANDB_API_KEY` ``` -cd torchdriveenv cd examples docker compose up rl-training ``` From 3bf732c7d68a6da7674914a39cd6b20b90122e1b Mon Sep 17 00:00:00 2001 From: Adam Scibior Date: Thu, 25 Apr 2024 17:28:44 -0700 Subject: [PATCH 4/4] Add instructions to install examples dependencies --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 433419b..fd88c69 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ pip install torchdriveenv To run examples: Set the `$IAI_API_KEY` and `$WANDB_API_KEY` ``` +pip install torchdriveenv[baselines] cd examples python rl_training.py ```