Skip to content

Commit

Permalink
Remove a redundant step in parallel env interface
Browse files Browse the repository at this point in the history
Remove a large log
  • Loading branch information
RedTachyon committed Jan 18, 2024
1 parent 25a6153 commit 6ea1d79
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion cogment_lab/envs/pettingzoo.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,6 @@ async def step(self, state: State, action: dict[str, Any]):
"""
logging.info("Stepping environment")

state.env.step(action)
obs, rewards, terminated, truncated, info = state.env.step(action)

frame = state.env.render() if state.session_cfg.render else None
Expand Down
10 changes: 5 additions & 5 deletions cogment_lab/humans/actor.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,11 @@ def __init__(self, send_queue: asyncio.Queue, recv_queue: asyncio.Queue):
self.recv_queue = recv_queue

async def act(self, observation: Any, rendered_frame: np.ndarray | None = None) -> int:
logging.info(
f"Getting an action with {observation=}" + f" and {rendered_frame.shape=}"
if rendered_frame is not None
else "no frame"
)
# logging.info(
# f"Getting an action with {observation=}" + f" and {rendered_frame.shape=}"
# if rendered_frame is not None
# else "no frame"
# )
await self.send_queue.put(rendered_frame)
action = await self.recv_queue.get()
return action
Expand Down

0 comments on commit 6ea1d79

Please sign in to comment.