浏览代码

Fix seed in test

Matthias Reso 1 年之前
父节点
当前提交
97a7871f4b
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      tests/test_length_based_batch_sampler.py

+ 1 - 0
tests/test_length_based_batch_sampler.py

@@ -12,6 +12,7 @@ SAMPLES = 33
 
 @pytest.fixture
 def dataset():
+    random.seed(42)
     dataset = []
     def add_samples(ds, n, a, b):
         for _ in range(n):