Skip to content

Commit

Permalink
Don't compute checksums if not necessary in datasets-cli test (#5603)
Browse files Browse the repository at this point in the history
don't compute checksums if not necessary
  • Loading branch information
lhoestq authored Mar 3, 2023
1 parent 6569014 commit 24fb01b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/datasets/commands/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@ def get_builders() -> Generator[DatasetBuilder, None, None]:

for j, builder in enumerate(get_builders()):
print(f"Testing builder '{builder.config.name}' ({j + 1}/{n_builders})")
builder._record_infos = True
builder._record_infos = os.path.exists(
os.path.join(builder.get_imported_module_dir(), datasets.config.DATASETDICT_INFOS_FILENAME)
) # record checksums only if we need to update a (deprecated) dataset_infos.json
builder.download_and_prepare(
download_mode=DownloadMode.REUSE_CACHE_IF_EXISTS
if not self._force_redownload
Expand Down

0 comments on commit 24fb01b

Please sign in to comment.