Skip to content

Commit f96c4d2

Browse files
committed
Resolve PR comments
1 parent cac221d commit f96c4d2

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

maro/common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ class BaseDecisionEvent:
99
- CascadeEvent & AtomEvent: used to drive the MARO Env / business engine.
1010
- DecisionEvent: exposed to users as a means of communication.
1111
12-
The latter one serves the `payload` of the former ones inside of MARO Env.
12+
The latter one serves as the `payload` of the former ones inside of MARO Env.
1313
1414
Therefore, the related namings might be a little bit tricky.
15-
- Inside MARO Env: `decision_event` is actually a CascadeEvent or AtomEvent. DecisionEvent is the payload of them.
15+
- Inside MARO Env: `decision_event` is actually a CascadeEvent. DecisionEvent is the payload of them.
1616
- Outside MARO Env (for users): `decision_event` is a DecisionEvent.
1717
"""
1818

maro/event_buffer/event_buffer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def gen_cascade_event(self, tick: int, event_type: object, payload: object) -> C
137137
Returns:
138138
CascadeEvent: Cascade event object.
139139
"""
140-
return cast(CascadeEvent, self._event_pool.gen(tick, event_type, payload, is_cascade=False))
140+
return cast(CascadeEvent, self._event_pool.gen(tick, event_type, payload, is_cascade=True))
141141

142142
def gen_decision_event(self, tick: int, payload: BaseDecisionEvent) -> CascadeEvent:
143143
"""Generate a decision event that will stop current simulation, and ask agent for action.

maro/simulator/core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def step(
9696
"""Push the environment to next step with action.
9797
9898
Under Sequential mode:
99-
- If `action` is None, a empty list will be assigned to the decision event.
99+
- If `action` is None, an empty list will be assigned to the decision event.
100100
- Otherwise, the action(s) will be assigned to the decision event.
101101
102102
Under Joint mode:
@@ -120,7 +120,7 @@ def step(
120120
since the latter one will assign the n actions to the first n decision events.
121121
122122
Args:
123-
action (Union[BaseAction, List[ActionPayload], None]): Action(s) from agent.
123+
action (Union[BaseAction, List[BaseAction], None]): Action(s) from agent.
124124
125125
Returns:
126126
tuple: a tuple of (metrics, decision event, is_done).

0 commit comments

Comments
 (0)