()
| 58 | action_sample = action_space.sample() |
| 59 | |
| 60 | def code(): |
| 61 | ts = 0 |
| 62 | env.reset() |
| 63 | while True: |
| 64 | # If masking is used, try something like this: |
| 65 | # np.random.choice( |
| 66 | # action_space.n, p=(obs["action_mask"] / sum(obs["action_mask"]))) |
| 67 | _, _, done, _, _ = env.step(action_sample) |
| 68 | ts += 1 |
| 69 | if done: |
| 70 | break |
| 71 | |
| 72 | test = _test_some_code_for_memory_leaks( |
| 73 | desc="Looking for leaks in env, running through episodes.", |
no test coverage detected
searching dependent graphs…