Skip to content

Commit

Permalink
added inline comments
Browse files Browse the repository at this point in the history
  • Loading branch information
josephdviviano committed Feb 20, 2024
1 parent f1ecd50 commit b14cc05
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/gflownet/envs/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ def test__trajectories_are_reversible(self, n_repeat=1):
while not self.env.done:
state, action, valid = self.env.step_random(backward=False)
if valid:
# Copy prevents mutation by next step.
states_trajectory_fw.append(copy(state))
actions_trajectory_fw.append(action)

Expand All @@ -265,6 +266,7 @@ def test__trajectories_are_reversible(self, n_repeat=1):
actions_trajectory_fw_copy.pop()
)
if valid:
# Copy prevents mutation by next step.
states_trajectory_bw.append(copy(state))
actions_trajectory_bw.append(action)

Expand Down

0 comments on commit b14cc05

Please sign in to comment.