@@ -320,7 +320,7 @@ def test_build_train_valid_test_data_loaders_uses_eval_dp_group(
320320 dataset_root = "/tmp/dataset" ,
321321 seq_length = 512 ,
322322 seed = 4321 ,
323- shuffle = False ,
323+ train_shuffle = False ,
324324 num_workers = 0 ,
325325 persistent_workers = False ,
326326 )
@@ -356,14 +356,14 @@ def test_build_train_valid_test_data_loaders_uses_eval_dp_group(
356356 assert train_call .kwargs ["seed" ] == expected_seed
357357 assert valid_call .kwargs ["seed" ] == expected_seed
358358 assert test_call .kwargs ["seed" ] == expected_seed
359- assert train_call .kwargs ["shuffle" ] is cfg .dataset .shuffle
360- assert valid_call .kwargs ["shuffle" ] is cfg . dataset . shuffle
361- assert test_call .kwargs ["shuffle" ] is cfg . dataset . shuffle
359+ assert train_call .kwargs ["shuffle" ] is cfg .dataset .train_shuffle
360+ assert valid_call .kwargs ["shuffle" ] is False
361+ assert test_call .kwargs ["shuffle" ] is False
362362
363363 @mock .patch ("torch.distributed.broadcast" )
364364 @mock .patch ("torch.distributed.get_world_size" , return_value = 1 )
365365 @mock .patch ("torch.distributed.get_rank" , return_value = 0 )
366- def test_gpt_sft_batch_eval_preserves_split_smaller_than_global_batch (
366+ def test_gpt_sft_batch_eval_is_unshuffled_and_preserves_split_smaller_than_global_batch (
367367 self , _mock_rank , _mock_world_size , _mock_broadcast
368368 ):
369369 class PaddingAwareDataset :
@@ -404,8 +404,8 @@ def __getitem__(self, index):
404404 test_batch = next (iter (test_dataloader ))
405405 assert valid_batch .shape == (cfg .validation .eval_global_batch_size ,)
406406 assert test_batch .shape == (cfg .validation .eval_global_batch_size ,)
407- assert - 1 in valid_batch
408- assert - 1 in test_batch
407+ assert valid_batch . tolist () == [ 0 , 1 , 2 , - 1 ]
408+ assert test_batch . tolist () == [ 0 , 1 , 2 , - 1 ]
409409
410410 @mock .patch ("torch.distributed.broadcast" )
411411 @mock .patch ("torch.distributed.get_world_size" , return_value = 1 )
0 commit comments