Set fixed RNG seed for reconstruction pytests

This commit is contained in:
yoshikisd
2025-07-07 15:16:12 +00:00
parent 3516405954
commit 36de44565b
2 changed files with 6 additions and 0 deletions
+2
View File
@@ -5,6 +5,8 @@ import torch as t
import cdtools
from matplotlib import pyplot as plt
# Force all reconstructions to use the same RNG seed
t.manual_seed(0)
def test_center_probe(lab_ptycho_cxi):
dataset = cdtools.datasets.Ptycho2DDataset.from_cxi(lab_ptycho_cxi)
+4
View File
@@ -1,6 +1,10 @@
import pytest
import cdtools
from matplotlib import pyplot as plt
import torch as t
# Force all reconstructions to use the same RNG seed
t.manual_seed(0)
@pytest.mark.slow
def test_simple_ptycho(lab_ptycho_cxi, reconstruction_device, show_plot):