MCPcopy Index your code
hub / github.com/ray-project/ray / code

Function code

rllib/utils/debug/memory.py:60–70  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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.",

Callers 1

Calls 6

resetMethod · 0.45
stepMethod · 0.45
sampleMethod · 0.45
get_metricsMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…