Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions test/test_transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# LICENSE file in the root directory of this source tree.
import argparse
from copy import copy
from time import sleep

import pytest
import torch
Expand Down Expand Up @@ -154,6 +155,8 @@ def test_vecnorm_parallel(nprc):
for idx in range(nprc):
queues[idx][1].put(msg)
del queues
for p in prcs:
p.join()


def _test_vecnorm_subproc_auto(idx, make_env, queue_out: mp.Queue, queue_in: mp.Queue):
Expand Down Expand Up @@ -219,6 +222,9 @@ def test_vecnorm_parallel_auto(nprc):
for idx in range(nprc):
queues[idx][1].put(msg)

sleep(0.01) # Further fix for flacky test: vecnorm should have a locking
# mechanism

obs_sum = td.get("next_observation_sum").clone()
obs_ssq = td.get("next_observation_ssq").clone()
obs_count = td.get("next_observation_count").clone()
Expand Down