Skip to content

Commit 00b0f0b

Browse files
authored
remove custom datasets (story_cloze) (#549)
* remove custom datasets (story_cloze) * remove pkg
1 parent c8bacde commit 00b0f0b

File tree

4 files changed

+0
-144
lines changed

4 files changed

+0
-144
lines changed

promptsource/custom_datasets/story_cloze/dataset_infos.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

promptsource/custom_datasets/story_cloze/story_cloze.py

Lines changed: 0 additions & 127 deletions
This file was deleted.

promptsource/seqio_tasks/utils.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import re
22

33
import datasets
4-
import pkg_resources
54
import tensorflow as tf
65

76
import promptsource.utils
@@ -64,13 +63,6 @@ def filter_fn(ex):
6463

6564

6665
def get_dataset_splits(dataset_name, subset_name=None):
67-
# `datasets.get_dataset_infos` pulls infos from hf/datasets's master.
68-
# story_cloze hasn't been merged yet (https://github.com/huggingface/datasets/pull/2907)
69-
# This is a temporary fix to be able to do `import promptsource.seqio_tasks`
70-
# Once PR 2907 is merged, we can remove this if condition (along with the `custom_datasets` folder)
71-
# Also see `promptsource.utils.get_dataset_builder`
72-
if dataset_name == "story_cloze":
73-
dataset_name = pkg_resources.resource_filename("promptsource", "custom_datasets/story_cloze")
7466
info = datasets.get_dataset_infos(dataset_name)
7567
subset_name = subset_name or list(info.keys())[0]
7668
return info[subset_name].splits

promptsource/utils.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# coding=utf-8
22

33
import datasets
4-
import pkg_resources
54
import requests
65

76
from promptsource.templates import INCLUDED_USERS
@@ -34,13 +33,6 @@ def renameDatasetColumn(dataset):
3433

3534
def get_dataset_builder(path, conf=None):
3635
"Get a dataset builder from name and conf."
37-
# `datasets.load.prepare_module` pulls infos from hf/datasets's master.
38-
# story_cloze hasn't been merged yet (https://github.com/huggingface/datasets/pull/2907)
39-
# This is a temporary fix for the tests (more specifically test_templates.py)
40-
# Once PR 2907 is merged, we can remove this if condition (along with the `custom_datasets` folder)
41-
# Also see `promptsource.seqio_tasks.utils.get_dataset_splits`
42-
if path == "story_cloze":
43-
path = pkg_resources.resource_filename("promptsource", "custom_datasets/story_cloze")
4436
module_path = datasets.load.prepare_module(path, dataset=True)
4537
builder_cls = datasets.load.import_main_class(module_path[0], dataset=True)
4638
if conf:

0 commit comments

Comments
 (0)