Update local import for ppl (#11866)
Co-authored-by: jenniew <jenniewang123@gmail.com>
This commit is contained in:
parent
c3c058373f
commit
5df00869de
1 changed files with 1 additions and 1 deletions
|
|
@ -21,7 +21,6 @@ import argparse
|
|||
import torch
|
||||
from tqdm import tqdm
|
||||
from datasets import load_dataset
|
||||
from ipex_llm.utils.common import invalidInputError
|
||||
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
|
|
@ -63,6 +62,7 @@ elif args.data_path:
|
|||
data = f.read()
|
||||
encodings = tokenizer(data.decode("utf-8").strip("\n"), return_tensors="pt")
|
||||
else:
|
||||
from ipex_llm.utils.common import invalidInputError
|
||||
raise invalidInputError(False, "Must specify either dataset or datapath.")
|
||||
|
||||
if not args.max_length:
|
||||
|
|
|
|||
Loading…
Reference in a new issue