Loading natural_questions requires apache_beam even with existing preprocessed data
Author: albertvillanova
State: closed
Labels: name: bug

## Describe the bug
When loading "natural_questions", the package "apache_beam" is required:
```
ImportError: To be able to use natural_questions, you need to install the following dependency: apache_beam.
Please install it using 'pip install apache_beam' for instance'
```

This requirement is unnecessary, once there exists preprocessed data and the script just needs to download it.

## Steps to reproduce the bug
```python
load_dataset("natural_questions", "dev", split="validation", revision="main")
```

## Expected results
No ImportError raised.

## Actual results
```
ImportError                               Traceback (most recent call last)
[<ipython-input-3-c938e7c05d02>](https://localhost:8080/#) in <module>()
----> 1 from datasets import load_dataset; ds = load_dataset("natural_questions", "dev", split="validation", revision="main")

[/usr/local/lib/python3.7/dist-packages/datasets/load.py](https://localhost:8080/#) in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, **config_kwargs)
   1732         revision=revision,
   1733         use_auth_token=use_auth_token,
-> 1734         **config_kwargs,
   1735     )
   1736 

[/usr/local/lib/python3.7/dist-packages/datasets/load.py](https://localhost:8080/#) in load_dataset_builder(path, name, data_dir, data_files, cache_dir, features, download_config, download_mode, revision, use_auth_token, **config_kwargs)
   1504         download_mode=download_mode,
   1505         data_dir=data_dir,
-> 1506         data_files=data_files,
   1507     )
   1508 

[/usr/local/lib/python3.7/dist-packages/datasets/load.py](https://localhost:8080/#) in dataset_module_factory(path, revision, download_config, download_mode, dynamic_modules_path, data_dir, data_files, **download_kwargs)
   1245                         f"Couldn't find '{path}' on the Hugging Face Hub either: {type(e1).__name__}: {e1}"
   1246                     ) from None
-> 1247                 raise e1 from None
   1248     else:
   1249         raise FileNotFoundError(

[/usr/local/lib/python3.7/dist-packages/datasets/load.py](https://localhost:8080/#) in dataset_module_factory(path, revision, download_config, download_mode, dynamic_modules_path, data_dir, data_files, **download_kwargs)
   1180                     download_config=download_config,
   1181                     download_mode=download_mode,
-> 1182                     dynamic_modules_path=dynamic_modules_path,
   1183                 ).get_module()
   1184             elif path.count("/") == 1:  # community dataset on the Hub

[/usr/local/lib/python3.7/dist-packages/datasets/load.py](https://localhost:8080/#) in get_module(self)
    490             base_path=hf_github_url(path=self.name, name="", revision=revision),
    491             imports=imports,
--> 492             download_config=self.download_config,
    493         )
    494         additional_files = [(config.DATASETDICT_INFOS_FILENAME, dataset_infos_path)] if dataset_infos_path else []

[/usr/local/lib/python3.7/dist-packages/datasets/load.py](https://localhost:8080/#) in _download_additional_modules(name, base_path, imports, download_config)
    214         _them_str = "them" if len(needs_to_be_installed) > 1 else "it"
    215         raise ImportError(
--> 216             f"To be able to use {name}, you need to install the following {_depencencies_str}: "
    217             f"{', '.join(needs_to_be_installed)}.\nPlease install {_them_str} using 'pip install "
    218             f"{' '.join(needs_to_be_installed.values())}' for instance'"

ImportError: To be able to use natural_questions, you need to install the following dependency: apache_beam.
Please install it using 'pip install apache_beam' for instance'
```

## Environment info
Colab notebook.