Skip to content
Snippets Groups Projects
Commit 04b45d2d authored by Florian Schröder's avatar Florian Schröder
Browse files

fix merge

parent 386dcdb2
No related branches found
No related tags found
1 merge request!52Resolve "gym env"
Pipeline #46138 passed
......@@ -162,18 +162,18 @@ extra_setup_functions:
callback_class_kwargs:
log_path: USER_LOG_DIR/ENV_NAME/LOG_RECORD_NAME.jsonl
add_hook_ref: true
info_msg:
func: !!python/name:overcooked_simulator.recording.class_recording_with_hooks ''
kwargs:
hooks: [ cutting_board_100 ]
log_class: !!python/name:overcooked_simulator.info_msg.InfoMsgManager ''
log_class_kwargs:
msg: Glückwunsch du hast was geschnitten!
fire_msg:
func: !!python/name:overcooked_simulator.recording.class_recording_with_hooks ''
kwargs:
hooks: [ new_fire ]
log_class: !!python/name:overcooked_simulator.info_msg.InfoMsgManager ''
log_class_kwargs:
msg: Feuer, Feuer, Feuer
level: Warning
# info_msg:
# func: !!python/name:overcooked_simulator.hooks.hooks_via_callback_class ''
# kwargs:
# hooks: [ cutting_board_100 ]
# log_class: !!python/name:overcooked_simulator.info_msg.InfoMsgManager ''
# log_class_kwargs:
# msg: Glückwunsch du hast was geschnitten!
# fire_msg:
# func: !!python/name:overcooked_simulator.hooks.hooks_via_callback_class ''
# kwargs:
# hooks: [ new_fire ]
# log_class: !!python/name:overcooked_simulator.info_msg.InfoMsgManager ''
# log_class_kwargs:
# msg: Feuer, Feuer, Feuer
# level: Warning
......@@ -432,13 +432,6 @@ class EnvironmentHandler:
/ 1_000_000_000
)
)
(
grid,
player,
env_time,
orders,
) = env_data.environment.get_vectorized_state("0")
env_data.last_step_time = step_start
if env_data.environment.game_ended:
log.info(f"Env {env_id} ended. Set env to STOPPED.")
......
......@@ -111,6 +111,8 @@ NEW_FIRE = "new_fire"
FIRE_SPREADING = "fire_spreading"
DROP_OFF_ON_COOKING_EQUIPMENT = "drop_off_on_cooking_equipment"
class Hooks:
def __init__(self, env):
......
......@@ -52,7 +52,7 @@ from overcooked_simulator.order import (
OrderConfig,
)
from overcooked_simulator.player import Player, PlayerConfig
from overcooked_simulator.state_representation import StateRepresentation, InfoMsg
from overcooked_simulator.state_representation import InfoMsg
from overcooked_simulator.utils import create_init_env_time, get_closest
log = logging.getLogger(__name__)
......@@ -277,7 +277,7 @@ class Environment:
self.counter_positions = np.array([c.pos for c in self.counters])
self.order_and_score.create_init_orders(self.env_time)
self.order_manager.create_init_orders(self.env_time)
self.start_time = self.env_time
"""The relative env time when it started."""
self.env_time_end = self.env_time + timedelta(
......
......@@ -131,21 +131,21 @@ extra_setup_functions:
callback_class_kwargs:
static_score: 0.15
# json_states:
# func: !!python/name:overcooked_simulator.recording.class_recording_with_hooks ''
# func: !!python/name:overcooked_simulator.hooks.hooks_via_callback_class ''
# kwargs:
# hooks: [ json_state ]
# log_class: !!python/name:overcooked_simulator.recording.LogRecorder ''
# log_class_kwargs:
# log_path: USER_LOG_DIR/ENV_NAME/json_states.jsonl
# actions:
# func: !!python/name:overcooked_simulator.recording.class_recording_with_hooks ''
# func: !!python/name:overcooked_simulator.hooks.hooks_via_callback_class ''
# kwargs:
# hooks: [ pre_perform_action ]
# log_class: !!python/name:overcooked_simulator.recording.LogRecorder ''
# log_class_kwargs:
# log_path: USER_LOG_DIR/ENV_NAME/LOG_RECORD_NAME.jsonl
# random_env_events:
# func: !!python/name:overcooked_simulator.recording.class_recording_with_hooks ''
# func: !!python/name:overcooked_simulator.hooks.hooks_via_callback_class ''
# kwargs:
# hooks: [ order_duration_sample, plate_out_of_kitchen_time ]
# log_class: !!python/name:overcooked_simulator.recording.LogRecorder ''
......@@ -153,7 +153,7 @@ extra_setup_functions:
# log_path: USER_LOG_DIR/ENV_NAME/LOG_RECORD_NAME.jsonl
# add_hook_ref: true
# env_configs:
# func: !!python/name:overcooked_simulator.recording.class_recording_with_hooks ''
# func: !!python/name:overcooked_simulator.hooks.hooks_via_callback_class ''
# kwargs:
# hooks: [ env_initialized, item_info_config ]
# log_class: !!python/name:overcooked_simulator.recording.LogRecorder ''
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment