This commit is contained in:
Eugene Mironov
2024-12-17 02:42:53 +07:00
committed by AdilZouitine
parent 76234b7d14
commit df57d372d6
3 changed files with 5 additions and 5 deletions
@@ -130,12 +130,12 @@ def predict_action(observation, policy, device, use_amp):
def init_keyboard_listener(assign_rewards=False):
"""
Initializes a keyboard listener to enable early termination of an episode
or environment reset by pressing the right arrow key ('->'). This may require
Initializes a keyboard listener to enable early termination of an episode
or environment reset by pressing the right arrow key ('->'). This may require
sudo permissions to allow the terminal to monitor keyboard events.
Args:
assign_rewards (bool): If True, allows annotating the collected trajectory
assign_rewards (bool): If True, allows annotating the collected trajectory
with a binary reward at the end of the episode to indicate success.
"""
events = {}