Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

127 changes: 0 additions & 127 deletions promptsource/custom_datasets/story_cloze/story_cloze.py

This file was deleted.

8 changes: 0 additions & 8 deletions promptsource/seqio_tasks/utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import re

import datasets
import pkg_resources
import tensorflow as tf

import promptsource.utils
Expand Down Expand Up @@ -64,13 +63,6 @@ def filter_fn(ex):


def get_dataset_splits(dataset_name, subset_name=None):
# `datasets.get_dataset_infos` pulls infos from hf/datasets's master.
# story_cloze hasn't been merged yet (https://github.com/huggingface/datasets/pull/2907)
# This is a temporary fix to be able to do `import promptsource.seqio_tasks`
# Once PR 2907 is merged, we can remove this if condition (along with the `custom_datasets` folder)
# Also see `promptsource.utils.get_dataset_builder`
if dataset_name == "story_cloze":
dataset_name = pkg_resources.resource_filename("promptsource", "custom_datasets/story_cloze")
info = datasets.get_dataset_infos(dataset_name)
subset_name = subset_name or list(info.keys())[0]
return info[subset_name].splits
Expand Down
8 changes: 0 additions & 8 deletions promptsource/utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# coding=utf-8

import datasets
import pkg_resources
import requests

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

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