Currently, the gradient test cases may fail intermittently due to torch equal tolerance issue. Adding retries to avoid this to keep main branch stable.
Merging unit test cases into a single file for utils.
Testing Done
./juice/scr/wuzhengx/pyvene/pyvene/models/interventions.py:421: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor).
mask_sigmoid = torch.sigmoid(self.mask / torch.tensor(self.temperature))
.........Removing testing dir ./test_output_dir_prefix-0037c3
Removing testing dir ./test_output_dir_prefix-ddd423
Removing testing dir ./test_output_dir_prefix-ffb32e
Removing testing dir ./test_output_dir_prefix-045942
Removing testing dir ./test_output_dir_prefix-a95c17
----------------------------------------------------------------------
Ran 18 tests in 5.667s
OK
Checklist:
[x] My PR title strictly follows the format: [Your Priority] Your Title
Description
Currently, the gradient test cases may fail intermittently due to torch equal tolerance issue. Adding retries to avoid this to keep main branch stable.
Merging unit test cases into a single file for utils.
Testing Done
Checklist:
[Your Priority] Your Title