Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…oo-10
  • Loading branch information
qianyi-sun committed Apr 3, 2023
2 parents 557c76d + b0dcb47 commit 7cdc5c3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions cli/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ def run(
"""
from smarts.benchmark import BENCHMARK_LISTING_FILE, run_benchmark

benchmark_id, _, benchmark_version = benchmark_id.partition("==")
benchmark_name, _, benchmark_version = benchmark_id.partition("==")

run_benchmark(
benchmark_name=benchmark_id,
benchmark_name=benchmark_name,
benchmark_version=float(benchmark_version) if benchmark_version else None,
agent_locator=agent_locator,
benchmark_listing=Path(benchmark_listing)
Expand Down
8 changes: 4 additions & 4 deletions examples/rl/platoon/train/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ smarts:
agent_locator: inference:contrib-agent-v0
env_id: smarts.env:platoon-v0
scenarios:
# - scenarios/sumo/platoon/straight_agents_1
- scenarios/sumo/platoon/straight_agents_1
# - scenarios/sumo/platoon/fork_agents_1
# - scenarios/sumo/platoon/merge_exit_agents_1
## - scenarios/argoverse/platoon/map_1_agents_1
## - scenarios/argoverse/platoon/map_2_agents_1
- scenarios/argoverse/platoon/map_3_agents_1
- scenarios/argoverse/platoon/map_4_agents_1
- scenarios/argoverse/platoon/map_5_agents_1
# - scenarios/argoverse/platoon/map_3_agents_1
# - scenarios/argoverse/platoon/map_4_agents_1
# - scenarios/argoverse/platoon/map_5_agents_1
## - scenarios/argoverse/platoon/map_6_agents_1
## - scenarios/argoverse/platoon/map_7_agents_1
## - scenarios/argoverse/platoon/map_8_agents_1
Expand Down
2 changes: 1 addition & 1 deletion examples/rl/platoon/train/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def make_env(env_id, scenario, agent_interface, config, seed):
env = Reward(env)
env = Api021Reversion(env)
env = SingleAgent(env)
env = Preprocess(env, config, agent_interface)
env = Preprocess(env, agent_interface)
env = Monitor(env)

return env
4 changes: 2 additions & 2 deletions examples/rl/platoon/train/preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@


class Preprocess(gym.Wrapper):
def __init__(self, env: gym.Env, config, agent_interface: AgentInterface):
def __init__(self, env: gym.Env, agent_interface: AgentInterface):
super().__init__(env)

self._filter_obs = FilterObs(top_down_rgb=agent_interface.top_down_rgb)
self._frame_stack = FrameStack(
input_space=self._filter_obs.observation_space,
num_stack=config.num_stack,
num_stack=3,
stack_axis=0,
)
self._frame_stack.reset()
Expand Down

0 comments on commit 7cdc5c3

Please sign in to comment.