[go: nahoru, domu]

Skip to content

Commit

Permalink
Merge pull request #691 from ymcui/typo_fix
Browse files Browse the repository at this point in the history
Fix a typo in the function name
  • Loading branch information
ymcui committed Jun 30, 2023
2 parents 64e93fc + 0efd0ff commit fd60e4b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion scripts/training/build_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"### Instruction:\n{instruction}\n\n### Response: "
)

def buid_instruction_dataset(data_path: Union[List[str],str],
def build_instruction_dataset(data_path: Union[List[str],str],
tokenizer: transformers.PreTrainedTokenizer,
max_seq_length: int, data_cache_dir = None,
preprocessing_num_workers = None,
Expand Down
6 changes: 3 additions & 3 deletions scripts/training/run_clm_sft_with_peft.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
from pathlib import Path
import datasets
import torch
from build_dataset import buid_instruction_dataset, DataCollatorForSupervisedDataset
from build_dataset import build_instruction_dataset, DataCollatorForSupervisedDataset
import transformers
from transformers import (
CONFIG_MAPPING,
Expand Down Expand Up @@ -312,7 +312,7 @@ def main():
path = Path(data_args.dataset_dir)
files = [os.path.join(path,file.name) for file in path.glob("*.json")]
logger.info(f"Training files: {' '.join(files)}")
train_dataset = buid_instruction_dataset(
train_dataset = build_instruction_dataset(
data_path=files,
tokenizer=tokenizer,
max_seq_length=data_args.max_seq_length,
Expand All @@ -325,7 +325,7 @@ def main():
with training_args.main_process_first(desc="loading and tokenization"):
files = [data_args.validation_file]
logger.info(f"Evaluation files: {' '.join(files)}")
eval_dataset = buid_instruction_dataset(
eval_dataset = build_instruction_dataset(
data_path=files,
tokenizer=tokenizer,
max_seq_length=data_args.max_seq_length,
Expand Down

0 comments on commit fd60e4b

Please sign in to comment.