Skip to content

Commit ecb62b6

Browse files
committed
change variable name
1 parent e988cf5 commit ecb62b6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

paddlenlp/data/indexed_dataset.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def make_sft_dataset(path, dataclass, skip_warmup=False, impl="mmap"):
7575

7676
print_rank_0(" > building dataset index ...")
7777
start_time = time.time()
78-
sft_indexed_dataset = SftMMapIndexedDataset(path, dataclass, skip_warmup)
78+
sft_indexed_dataset = SFTMMapIndexedDataset(path, dataclass, skip_warmup)
7979
print_rank_0(" > finished creating SFT indexed dataset in {:4f} " "seconds".format(time.time() - start_time))
8080
print_rank_0(" number of samples: {}".format(len(sft_indexed_dataset.doc_idx) - 1))
8181

@@ -574,7 +574,7 @@ def exists(path):
574574
return os.path.exists(index_file_path(path)) and os.path.exists(data_file_path(path))
575575

576576

577-
class SftMMapIndexedDataset(paddle.io.Dataset):
577+
class SFTMMapIndexedDataset(paddle.io.Dataset):
578578
class Index(object):
579579
_HDR_MAGIC = b"MMIDIDX\x00\x00"
580580

@@ -798,7 +798,7 @@ def make_builder(out_file, impl, save_dtype, loss_mask_file=None):
798798
return IndexedDatasetBuilder(out_file, dtype=save_dtype)
799799

800800

801-
class SftMMapIndexedDatasetBuilder(object):
801+
class SFTMMapIndexedDatasetBuilder(object):
802802
def __init__(self, output_file_dict, dtype):
803803
self._data_file_dict = {}
804804
for key, filename in output_file_dict.items():
@@ -823,7 +823,7 @@ def end_document(self):
823823
def finalize(self, index_file):
824824
for key, filename in self._data_file_dict.items():
825825
filename.close()
826-
with SftMMapIndexedDataset.Index.writer(index_file, self._dtype) as index:
826+
with SFTMMapIndexedDataset.Index.writer(index_file, self._dtype) as index:
827827
index.write(self._sizes, self._doc_idx)
828828

829829

0 commit comments

Comments
 (0)