bc1856fe140e6a08198c4a72af94ee0543987847,tensorflow_datasets/scripts/download_and_prepare.py,,main,#Any#,69
Before Change
def main(_):
// TODO(b/116270825): Add flag to force extraction / preparation.
mode = tfds.download.GenerateMode.REUSE_DATASET_IF_EXISTS
for dataset_name in FLAGS.datasets:
if dataset_name in FLAGS.exclude_datasets:
continue
print("Download and prepare dataset %s ..." % dataset_name)
builder = tfds.builder(dataset_name, data_dir=FLAGS.data_dir)
builder.download_and_prepare(download_dir=FLAGS.download_dir,
extract_dir=FLAGS.extract_dir,
manual_dir=FLAGS.manual_dir,
compute_stats=FLAGS.compute_stats,
mode=mode)
termcolor.cprint(str(builder.info.as_proto), attrs=["bold"])
if FLAGS.debug:
dataset = builder.as_dataset(split=tfds.Split.TRAIN)
After Change
for config in builder.BUILDER_CONFIGS:
download_and_prepare(dataset_name, config)
else:
download_and_prepare(dataset_name)
if __name__ == "__main__":
tf.enable_eager_execution()
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances Project Name: tensorflow/datasets
Commit Name: bc1856fe140e6a08198c4a72af94ee0543987847
Time: 2018-12-10
Author: rsepassi@google.com
File Name: tensorflow_datasets/scripts/download_and_prepare.py
Class Name:
Method Name: main
Project Name: tensorflow/datasets
Commit Name: 913a1e33a8bc3dc90a8863660992c0d6e21e0a1e
Time: 2020-09-22
Author: epot@google.com
File Name: tensorflow_datasets/core/dataset_info_test.py
Class Name: DatasetInfoTest
Method Name: test_statistics_generation
Project Name: tensorflow/datasets
Commit Name: 913a1e33a8bc3dc90a8863660992c0d6e21e0a1e
Time: 2020-09-22
Author: epot@google.com
File Name: tensorflow_datasets/core/dataset_info_test.py
Class Name: DatasetInfoTest
Method Name: test_schema_generation_variable_sizes