-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dataset load for benchmarking #75
base: main
Are you sure you want to change the base?
Conversation
Added a utility for loading dataset from hugging face
Awesome work @LuvvAggarwal . Could you add an example with the changes added from PR #72 for review? |
@@ -0,0 +1,44 @@ | |||
from datasets import load_dataset_builder,load_dataset,get_dataset_config_names, Dataset |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll want to guard prompttools
from requiring datasets
to be installed as part of the requirements.
Suggested change:
try:
from datasets import load_dataset_builder, load_dataset, get_dataset_config_names, Dataset
from datasets.dataset_dict import DatasetDict
except ImportError:
load_dataset = None
dataset_name: str, | ||
split: Literal["train","validation","test"] | None | ||
): | ||
self.dataset_name = dataset_name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change:
if load_dataset is None:
raise ModuleNotFoundError(
"Package `datasets` is required to be installed to use this experiment."
"Please use `pip install datasets` to install the package"
)
Added a utility for loading dataset from hugging face