mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-05 02:51:59 +00:00
refactor evaluation
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
from typing import Callable
|
||||
|
||||
import torch
|
||||
from torch.utils.data import Dataset
|
||||
|
||||
|
||||
@@ -18,7 +17,7 @@ class DummyLLMDataset(Dataset):
|
||||
if key in self.gen_fn:
|
||||
data[key] = self.gen_fn[key]
|
||||
else:
|
||||
data[key] = torch.ones(self.seq_len, dtype=torch.long)
|
||||
data[key] = [1] * self.seq_len
|
||||
return data
|
||||
|
||||
def __len__(self):
|
||||
|
Reference in New Issue
Block a user