2626
2727
2828@pytest .fixture (scope = "session" , params = (True , False ))
29- def element_refs (dummy_binary_dataset , max_num_elements , request ):
29+ def element_refs (dummy_binary_db_dataset , max_num_elements , request ):
3030 return fit_linear_references (
3131 ["energy" ],
32- dataset = dummy_binary_dataset ,
32+ dataset = dummy_binary_db_dataset ,
3333 batch_size = 16 ,
3434 shuffle = False ,
3535 max_num_elements = max_num_elements ,
@@ -39,12 +39,12 @@ def element_refs(dummy_binary_dataset, max_num_elements, request):
3939
4040
4141def test_apply_linear_references (
42- element_refs , dummy_binary_dataset , dummy_element_refs
42+ element_refs , dummy_binary_db_dataset , dummy_element_refs
4343):
4444 max_noise = 0.05 * dummy_element_refs .mean ()
4545
4646 # check that removing element refs keeps only values within max noise
47- batch = data_list_collater (list (dummy_binary_dataset ), otf_graph = True )
47+ batch = data_list_collater (list (dummy_binary_db_dataset ), otf_graph = True )
4848 energy = batch .energy .clone ().view (len (batch ), - 1 )
4949 deref_energy = element_refs ["energy" ].dereference (energy , batch )
5050 assert all (deref_energy <= max_noise )
@@ -96,14 +96,14 @@ def test_create_element_references(element_refs, tmp_path):
9696
9797
9898def test_fit_linear_references (
99- element_refs , dummy_binary_dataset , max_num_elements , dummy_element_refs
99+ element_refs , dummy_binary_db_dataset , max_num_elements , dummy_element_refs
100100):
101101 # create the composition matrix
102- energy = np .array ([d .energy for d in dummy_binary_dataset ]).reshape (- 1 )
102+ energy = np .array ([d .energy for d in dummy_binary_db_dataset ]).reshape (- 1 )
103103 cmatrix = np .vstack (
104104 [
105105 np .bincount (d .atomic_numbers .int ().numpy (), minlength = max_num_elements + 1 )
106- for d in dummy_binary_dataset
106+ for d in dummy_binary_db_dataset
107107 ]
108108 )
109109 mask = cmatrix .sum (axis = 0 ) != 0.0
@@ -130,30 +130,30 @@ def test_fit_linear_references(
130130 )
131131
132132
133- def test_fit_seed_no_seed (dummy_binary_dataset , max_num_elements ):
133+ def test_fit_seed_no_seed (dummy_binary_db_dataset , max_num_elements ):
134134 refs_seed = fit_linear_references (
135135 ["energy" ],
136- dataset = dummy_binary_dataset ,
136+ dataset = dummy_binary_db_dataset ,
137137 batch_size = 16 ,
138- num_batches = len (dummy_binary_dataset ) // 16 - 2 ,
138+ num_batches = len (dummy_binary_db_dataset ) // 16 - 2 ,
139139 shuffle = True ,
140140 max_num_elements = max_num_elements ,
141141 seed = 0 ,
142142 )
143143 refs_seed1 = fit_linear_references (
144144 ["energy" ],
145- dataset = dummy_binary_dataset ,
145+ dataset = dummy_binary_db_dataset ,
146146 batch_size = 16 ,
147- num_batches = len (dummy_binary_dataset ) // 16 - 2 ,
147+ num_batches = len (dummy_binary_db_dataset ) // 16 - 2 ,
148148 shuffle = True ,
149149 max_num_elements = max_num_elements ,
150150 seed = 0 ,
151151 )
152152 refs_noseed = fit_linear_references (
153153 ["energy" ],
154- dataset = dummy_binary_dataset ,
154+ dataset = dummy_binary_db_dataset ,
155155 batch_size = 16 ,
156- num_batches = len (dummy_binary_dataset ) // 16 - 2 ,
156+ num_batches = len (dummy_binary_db_dataset ) // 16 - 2 ,
157157 shuffle = True ,
158158 max_num_elements = max_num_elements ,
159159 seed = 1 ,
0 commit comments