pet icon indicating copy to clipboard operation
pet copied to clipboard

load_dataset function missing

Open YerongLi opened this issue 3 years ago • 2 comments

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?

YerongLi avatar Dec 15 '21 23:12 YerongLi

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 avatar Jan 04 '22 14:01 andreazaninello

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

andreazaninello avatar Jan 10 '22 18:01 andreazaninello