From 5df00869deaf27412dd681241029cbd35a3b4558 Mon Sep 17 00:00:00 2001 From: RyuKosei <70006706+RyuKosei@users.noreply.github.com> Date: Tue, 20 Aug 2024 18:50:00 +0800 Subject: [PATCH] Update local import for ppl (#11866) Co-authored-by: jenniew --- python/llm/dev/benchmark/perplexity/run_wikitext.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/llm/dev/benchmark/perplexity/run_wikitext.py b/python/llm/dev/benchmark/perplexity/run_wikitext.py index 50991558f35..92426a86fb1 100644 --- a/python/llm/dev/benchmark/perplexity/run_wikitext.py +++ b/python/llm/dev/benchmark/perplexity/run_wikitext.py @@ -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() @@ -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: