Skip to content

Commit

Permalink
Resolve PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
lihuoran committed Aug 31, 2022
1 parent cac221d commit f96c4d2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions maro/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ class BaseDecisionEvent:
- CascadeEvent & AtomEvent: used to drive the MARO Env / business engine.
- DecisionEvent: exposed to users as a means of communication.
The latter one serves the `payload` of the former ones inside of MARO Env.
The latter one serves as the `payload` of the former ones inside of MARO Env.
Therefore, the related namings might be a little bit tricky.
- Inside MARO Env: `decision_event` is actually a CascadeEvent or AtomEvent. DecisionEvent is the payload of them.
- Inside MARO Env: `decision_event` is actually a CascadeEvent. DecisionEvent is the payload of them.
- Outside MARO Env (for users): `decision_event` is a DecisionEvent.
"""

Expand Down
2 changes: 1 addition & 1 deletion maro/event_buffer/event_buffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def gen_cascade_event(self, tick: int, event_type: object, payload: object) -> C
Returns:
CascadeEvent: Cascade event object.
"""
return cast(CascadeEvent, self._event_pool.gen(tick, event_type, payload, is_cascade=False))
return cast(CascadeEvent, self._event_pool.gen(tick, event_type, payload, is_cascade=True))

def gen_decision_event(self, tick: int, payload: BaseDecisionEvent) -> CascadeEvent:
"""Generate a decision event that will stop current simulation, and ask agent for action.
Expand Down
4 changes: 2 additions & 2 deletions maro/simulator/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def step(
"""Push the environment to next step with action.
Under Sequential mode:
- If `action` is None, a empty list will be assigned to the decision event.
- If `action` is None, an empty list will be assigned to the decision event.
- Otherwise, the action(s) will be assigned to the decision event.
Under Joint mode:
Expand All @@ -120,7 +120,7 @@ def step(
since the latter one will assign the n actions to the first n decision events.
Args:
action (Union[BaseAction, List[ActionPayload], None]): Action(s) from agent.
action (Union[BaseAction, List[BaseAction], None]): Action(s) from agent.
Returns:
tuple: a tuple of (metrics, decision event, is_done).
Expand Down

0 comments on commit f96c4d2

Please sign in to comment.