Skip to content

Commit

Permalink
Merge pull request #17 from shutcode/main
Browse files Browse the repository at this point in the history
Fix  download ptb warning
  • Loading branch information
Harahan authored Jul 30, 2024
2 parents babad86 + 4784c0a commit ddc9048
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tools/download_calib_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def download(calib_dataset_name, path):
calib_dataset.save_to_disk(save_path)
logger.info("download wikitext2 for calib finished.")
if "ptb" in calib_dataset_name:
calib_dataset = load_dataset("ptb_text_only", "penn_treebank", split="train")
calib_dataset = load_dataset("ptb_text_only", "penn_treebank", split="train", trust_remote_code=True)
save_path = os.path.join(path, "ptb")
calib_dataset.save_to_disk(save_path)
logger.info("download ptb for calib finished.")
Expand Down
2 changes: 1 addition & 1 deletion tools/download_eval_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def download(calib_dataset_name, path):
calib_dataset.save_to_disk(save_path)
logger.info("download wikitext2 for eval finished.")
if "ptb" in calib_dataset_name:
calib_dataset = load_dataset("ptb_text_only", "penn_treebank", split="test")
calib_dataset = load_dataset("ptb_text_only", "penn_treebank", split="test", trust_remote_code=True)
save_path = os.path.join(path, "ptb")
calib_dataset.save_to_disk(save_path)
logger.info("download ptb for eval finished.")
Expand Down

0 comments on commit ddc9048

Please sign in to comment.