test_criterion.test_psd_loss in the deepclean.trainer library uses random data to test the PSD and relies on statistics to keep its values in an acceptable range, causing random failures. This test should be made more deterministic and test for the expected behavior more directly.