tensorflow / tensorflow/datasets
Wrong metadata produced for tfds-nightly
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 1.6k
- Avg merge
- 3h 54m
- Merged PRs (30d)
- 1
Description
Short description
When trying to download the C4 dataset with apache-beam on google cloud dataflow, this exception gets thrown:
Traceback (most recent call last):
File "/mnt/pccfs/backed_up/crytting/persuasion/createc4/lib/python3.6/site-packages/apache_beam/utils/processes.py", line 91, in check_output
out = subprocess.check_output(*args, **kwargs)
File "/usr/lib/python3.6/subprocess.py", line 356, in check_output
**kwargs).stdout
File "/usr/lib/python3.6/subprocess.py", line 438, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/mnt/pccfs/backed_up/crytting/persuasion/createc4/bin/python3', '-m', 'pip', 'download', '--dest', '/tmp/dataflow-requirements-cache', '-r', '/tmp/beam_requirements.txt', '--exists-action', 'i', '--no-binary', ':all:']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/mnt/pccfs/backed_up/crytting/persuasion/createc4/bin/tfds", line 8, in <module>
sys.exit(launch_cli())
File "/mnt/pccfs/backed_up/crytting/persuasion/createc4/lib/python3.6/site-packages/tensorflow_datasets/scripts/cli/main.py", line 86, in launch_cli
app.run(main, flags_parser=_parse_flags)
File "/mnt/pccfs/backed_up/crytting/persuasion/createc4/lib/python3.6/site-packages/absl/app.py", line 300, in run
_run_main(main, args)
File "/mnt/pccfs/backed_up/crytting/persuasion/createc4/lib/python3.6/site-packages/absl/app.py", line 251, in _run_main
sys.exit(main(argv))
File "/mnt/pccfs/backed_up/crytting/persuasion/createc4/lib/python3.6/site-packages/tensorflow_datasets/scripts/cli/main.py", line 81, in main
args.subparser_fn(args)
File "/mnt/pccfs/backed_up/crytting/persuasion/createc4/lib/python3.6/site-packages/tensorflow_datasets/scripts/cli/build.py", line 198, in _build_datasets
_download_and_prepare(args, builder)
File "/mnt/pccfs/backed_up/crytting/persuasion/createc4/lib/python3.6/site-packages/tensorflow_datasets/scripts/cli/build.py", line 353, in _download_and_prepare
download_config=dl_config,
File "/mnt/pccfs/backed_up/crytting/persuasion/createc4/lib/python3.6/site-packages/tensorflow_datasets/core/dataset_builder.py", line 434, in download_and_prepare
download_config=download_config,
File "/mnt/pccfs/backed_up/crytting/persuasion/createc4/lib/python3.6/site-packages/tensorflow_datasets/core/dataset_builder.py", line 1163, in _download_and_prepare
in utils.tqdm(split_generators.items(), unit=" splits", leave=False)
File "/usr/lib/python3.6/contextlib.py", line 88, in __exit__
next(self.gen)
File "/mnt/pccfs/backed_up/crytting/persuasion/createc4/lib/python3.6/site-packages/tensorflow_datasets/core/split_builder.py", line 177, in maybe_beam_pipeline
self._beam_pipeline.__exit__(None, None, None)
File "/mnt/pccfs/backed_up/crytting/persuasion/createc4/lib/python3.6/site-packages/apache_beam/pipeline.py", line 568, in __exit__
self.result = self.run()
File "/mnt/pccfs/backed_up/crytting/persuasion/createc4/lib/python3.6/site-packages/apache_beam/pipeline.py", line 518, in run
allow_proto_holders=True).run(False)
File "/mnt/pccfs/backed_up/crytting/persuasion/createc4/lib/python3.6/site-packages/apache_beam/pipeline.py", line 547, in run
return self.runner.run_pipeline(self, self._options)
File "/mnt/pccfs/backed_up/crytting/persuasion/createc4/lib/python3.6/site-packages/apache_beam/runners/dataflow/dataflow_runner.py", line 493, in run_pipeline
artifacts=environments.python_sdk_dependencies(options)))
File "/mnt/pccfs/backed_up/crytting/persuasion/createc4/lib/python3.6/site-packages/apache_beam/transforms/environments.py", line 626, in python_sdk_dependencies
skip_prestaged_dependencies=skip_prestaged_dependencies))
File "/mnt/pccfs/backed_up/crytting/persuasion/createc4/lib/python3.6/site-packages/apache_beam/runners/portability/stager.py", line 180, in create_job_resources
setup_options.requirements_file, requirements_cache_path)
File "/mnt/pccfs/backed_up/crytting/persuasion/createc4/lib/python3.6/site-packages/apache_beam/utils/retry.py", line 236, in wrapper
return fun(*args, **kwargs)
File "/mnt/pccfs/backed_up/crytting/persuasion/createc4/lib/python3.6/site-packages/apache_beam/runners/portability/stager.py", line 571, in _populate_requirements_cache
processes.check_output(cmd_args, stderr=processes.STDOUT)
File "/mnt/pccfs/backed_up/crytting/persuasion/createc4/lib/python3.6/site-packages/apache_beam/utils/processes.py", line 99, in check_output
.format(traceback.format_exc(), args[0][6], error.output))
RuntimeError: Full traceback: Traceback (most recent call last):
File "/mnt/pccfs/backed_up/crytting/persuasion/createc4/lib/python3.6/site-packages/apache_beam/utils/processes.py", line 91, in check_output
out = subprocess.check_output(*args, **kwargs)
File "/usr/lib/python3.6/subprocess.py", line 356, in check_output
**kwargs).stdout
File "/usr/lib/python3.6/subprocess.py", line 438, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/mnt/pccfs/backed_up/crytting/persuasion/createc4/bin/python3', '-m', 'pip', 'download', '--dest', '/tmp/dataflow-requirements-cache', '-r', '/tmp/beam_requirements.txt', '--exists-action', 'i', '--no-binary', ':all:']' returned non-zero exit status 1.
Pip install failed for package: -r
Output from execution of subprocess: b"Collecting tfds-nightly[c4]\n Using cached tfds-nightly-4.1.0.dev202012030107.tar.gz (3.1 MB)\n WARNING: Generating metadata for package tfds-nightly produced metadata for project name tensorflow-datasets. Fix your #egg=tfds-nightly fragments.\nERROR: Requested tensorflow-datasets from https://files.pythonhosted.org/packages/c3/da/b28fdd59fb35feedcee53bbffc00d6afdcd10a4aa52daccff50919c0b093/tfds-nightly-4.1.0.dev202012030107.tar.gz#sha256=fb453c00f65e8033153d5038999857b801e2cbad0a3d62796aaee35a3523d640 (from -r /tmp/beam_requirements.txt (line 1)) has different name in metadata: 'tensorflow-datasets'\n"
Environment information
-
Operating System: Ubuntu 18.04
-
Python version: 3.6.9
-
tensorflow-datasets/tfds-nightlyversion: tfds-nightly==4.1.0.dev202012030107 -
tensorflow/tf-nightlyversion: tensorflow==2.3.1 -
Does the issue still exists with the last
tfds-nightlypackage (pip install --upgrade tfds-nightly) ?
Yes
Reproduction instructions
python3 -m venv createc4
source createc4/bin/activate
pip install --upgrade pip
pip install tensorflow
pip install 'tfds-nightly[c4]'
pip install 'apache-beam[gcp]'
export GOOGLE_APPLICATION_CREDENTIALS="/mnt/pccfs/backed_up/crytting/persuasion/CreateC4-credential.json"
MY_PROJECT="createc4"
MY_BUCKET="create-c4"
MY_REGION="us-west1"
python3 -m tensorflow_datasets.scripts.download_and_prepare \
#tfds build \
--datasets=c4/en \
--data_dir=gs://$MY_BUCKET/tensorflow_datasets \
--beam_pipeline_options="project=$MY_PROJECT,job_name=c4,staging_location=gs://$MY_BUCKET/binaries,temp_location=gs://$MY_BUCKET/temp,runner=DataflowRunner,requirements_file=/tmp/beam_requirements.txt,experiments=shuffle_mode=service,region=$MY_REGION,max_num_workers=448"
Expected behavior
My google cloud dataflow job to spin up a bunch of workers!
Additional context
I'm trying to follow the instructions here to process and download C4. Every time I try this again (by deleting my virtualenv and following the instructions from scratch), I run into a different problem with every up-to-date version of pip, tensorflow, tfds-nightly, and apache-beam.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the tfds-nightly installation and Dataflow dependency-staging failure from the commands and versions in the issue. Trace how the tfds-nightly distribution metadata is generated and compare its declared project name with the package name requested by pip; done means the dependency download completes without the metadata-name error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, tensorflow
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100