Skip to content

Commit

Permalink
Update local import for ppl (#11866)
Browse files Browse the repository at this point in the history
Co-authored-by: jenniew <[email protected]>
  • Loading branch information
RyuKosei and jenniew authored Aug 20, 2024
1 parent c3c0583 commit 5df0086
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/llm/dev/benchmark/perplexity/run_wikitext.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import torch
from tqdm import tqdm
from datasets import load_dataset
from ipex_llm.utils.common import invalidInputError


parser = argparse.ArgumentParser()
Expand Down Expand Up @@ -63,6 +62,7 @@ def parse_kwargs(kwstr):
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:
Expand Down

0 comments on commit 5df0086

Please sign in to comment.