File tree 4 files changed +6
-4
lines changed
4 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 44
44
DATASET_INFO_FILENAME = 'dataset_info.json'
45
45
LICENSE_FILENAME = 'LICENSE'
46
46
METADATA_FILENAME = 'metadata.json'
47
+ CHECKSUMS_FILENAME = 'checksums.tsv'
47
48
48
49
# Filepath for mapping between TFDS datasets and PapersWithCode entries.
49
50
PWC_FILENAME = 'tfds_to_pwc_links.json'
Original file line number Diff line number Diff line change @@ -445,7 +445,7 @@ def _checksums_path(cls) -> Optional[epath.Path]:
445
445
# * To save the checksums (in DownloadManager)
446
446
if not cls .code_path :
447
447
return None
448
- new_path = cls .code_path .parent / "checksums.tsv"
448
+ new_path = cls .code_path .parent / constants . CHECKSUMS_FILENAME
449
449
# Checksums of legacy datasets are located in a separate dir.
450
450
legacy_path = utils .tfds_path () / "url_checksums" / f"{ cls .name } .txt"
451
451
if (
Original file line number Diff line number Diff line change 17
17
18
18
import hashlib
19
19
import pathlib
20
+ from tensorflow_datasets .core import constants
20
21
from tensorflow_datasets .core import utils
21
22
from tensorflow_datasets .core .download import checksums
22
23
23
24
24
25
def test_checksums (tmp_path : pathlib .Path ):
25
- path = tmp_path / 'checksums.tsv'
26
+ path = tmp_path / constants . CHECKSUMS_FILENAME
26
27
url_infos = {
27
28
'http://abc.org/data' : checksums .UrlInfo (
28
29
checksum = 'abcd' ,
Original file line number Diff line number Diff line change @@ -211,8 +211,8 @@ def _create_dummy_data(info: utils.DatasetInfo) -> None:
211
211
212
212
213
213
def _create_checksum (info : utils .DatasetInfo ) -> None :
214
- """Adds the `checksums.tsv` file."""
215
- file_path = info .path / 'checksums.tsv'
214
+ """Adds the checksum file."""
215
+ file_path = info .path / constants . CHECKSUMS_FILENAME
216
216
content = textwrap .dedent (f"""\
217
217
# { info .todo } : If your dataset downloads files, then the checksums
218
218
# will be automatically added here when running
You can’t perform that action at this time.
0 commit comments