Skip to content

Commit

Permalink
Merge pull request #2155 from recommenders-team/miguel/mind2
Browse files Browse the repository at this point in the history
Fix issue with MIND large and small
  • Loading branch information
miguelgfierro authored Aug 26, 2024
2 parents fd5f861 + fae2030 commit 4f5861d
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions tests/data_validation/recommenders/datasets/test_mind.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,33 +28,33 @@
),
(
"https://recodatasets.z20.web.core.windows.net/newsrec/MINDsmall_train.zip",
"52953372",
"0x8D834F2EB31BDEC",
"52994575",
'"0x8DCC5A830190676"',
),
(
"https://recodatasets.z20.web.core.windows.net/newsrec/MINDsmall_dev.zip",
"30946172",
"0x8D834F2EBA8D865",
"30948560",
'"0x8DCC5A82E182A0F"',
),
(
"https://recodatasets.z20.web.core.windows.net/newsrec/MINDsmall_utils.zip",
"155178106",
"0x8D87F67F4AEB960",
'"0x8D8B8AD5B3677C6"',
),
(
"https://recodatasets.z20.web.core.windows.net/newsrec/MINDlarge_train.zip",
"531361237",
"0x8D8244E90C15C07",
"531360717",
'"0x8DCC5A8375BDC1D"',
),
(
"https://recodatasets.z20.web.core.windows.net/newsrec/MINDlarge_dev.zip",
"103593383",
"0x8D8244E92005849",
"103592887",
'"0x8DCC5A82FE8609C"',
),
(
"https://recodatasets.z20.web.core.windows.net/newsrec/MINDlarge_utils.zip",
"150359301",
"0x8D8B8AD5B2ED4C9",
'"0x8D8B8AD5B2ED4C9"',
),
],
)
Expand All @@ -72,14 +72,6 @@ def test_download_mind_demo(tmp):
assert statinfo.st_size == 10080022


def test_download_mind_small(tmp):
train_path, valid_path = download_mind(size="small", dest_path=tmp)
statinfo = os.stat(train_path)
assert statinfo.st_size == 52953372
statinfo = os.stat(valid_path)
assert statinfo.st_size == 30946172


def test_extract_mind_demo(tmp):
train_zip, valid_zip = download_mind(size="demo", dest_path=tmp)
train_path, valid_path = extract_mind(train_zip, valid_zip, clean_zip_file=False)
Expand All @@ -102,6 +94,14 @@ def test_extract_mind_demo(tmp):
assert statinfo.st_size == 1044588


def test_download_mind_small(tmp):
train_path, valid_path = download_mind(size="small", dest_path=tmp)
statinfo = os.stat(train_path)
assert statinfo.st_size == 52994575
statinfo = os.stat(valid_path)
assert statinfo.st_size == 30948560


def test_extract_mind_small(tmp):
train_zip, valid_zip = download_mind(size="small", dest_path=tmp)
train_path, valid_path = extract_mind(train_zip, valid_zip, clean_zip_file=False)
Expand All @@ -127,9 +127,9 @@ def test_extract_mind_small(tmp):
def test_download_mind_large(tmp_path):
train_path, valid_path = download_mind(size="large", dest_path=tmp_path)
statinfo = os.stat(train_path)
assert statinfo.st_size == 531361237
assert statinfo.st_size == 531360717
statinfo = os.stat(valid_path)
assert statinfo.st_size == 103593383
assert statinfo.st_size == 103592887


def test_extract_mind_large(tmp):
Expand Down

0 comments on commit 4f5861d

Please sign in to comment.