Skip to content
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

load_dataset function missing #73

Open
YerongLi opened this issue Dec 15, 2021 · 2 comments
Open

load_dataset function missing #73

YerongLi opened this issue Dec 15, 2021 · 2 comments

Comments

@YerongLi
Copy link

Hi I am trying to run the generative model on CNN-dailymail, however I find this file is missing: datasets.py and in the tasks.py file we need load_dataset() function

# from datasets import load_dataset
class AeslcProcessor(GenerativeDataProcessor):
@staticmethod
def load_and_split_dataset(dataset_name: Union[str, Tuple[str]]):
    if isinstance(dataset_name, tuple):
        ds = load_dataset(*dataset_name)
    elif isinstance(dataset_name, dict):
        ds = load_dataset(**dataset_name)
    else:
        ds = load_dataset(dataset_name)

Anyone knows how to bypass this? where I can find the file datasets.py?

@andreazaninello
Copy link

andreazaninello commented Jan 4, 2022

Hi, I have the exact same issue while trying to reproduce the experiments for GenPET, as the 'datasets' module is missing. @timoschick could you help us with this? Thanks a lot

File "/home/azaninello/pet-feature-genpet/cli.py", line 24, in <module>
    import pet.config
  File "/home/azaninello/pet-feature-genpet/pet/__init__.py", line 1, in <module>
    from pet.modeling import *
  File "/home/azaninello/pet-feature-genpet/pet/modeling.py", line 25, in <module>
    from datasets import load_metric
ModuleNotFoundError: No module named 'datasets'

@andreazaninello
Copy link

Hi, I have the exact same issue while trying to reproduce the experiments for GenPET, as the 'datasets' module is missing. @timoschick could you help us with this? Thanks a lot

File "/home/azaninello/pet-feature-genpet/cli.py", line 24, in <module>
    import pet.config
  File "/home/azaninello/pet-feature-genpet/pet/__init__.py", line 1, in <module>
    from pet.modeling import *
  File "/home/azaninello/pet-feature-genpet/pet/modeling.py", line 25, in <module>
    from datasets import load_metric
ModuleNotFoundError: No module named 'datasets'

In fact, I realized that datasets is a Python library from Huggingface
https://pypi.org/project/datasets/

If requirements.txt are correctly installed it should work fine. I realized that I had to set an environment with Python 3.6 to get the right versions of the required libraries.

Hope this helps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants