Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tsv.py #263

Merged
merged 1 commit into from
Apr 24, 2024
Merged

Update tsv.py #263

merged 1 commit into from
Apr 24, 2024

Conversation

tonellotto
Copy link
Contributor

The following code doesn't run correctly it the docstore is not already cached in pklz4 folder:

import ir_datasets
import more_itertools

dataset = ir_datasets.load('msmarco-passage')

for batch in more_itertools.chunked(dataset.docs_iter(), 8196*4):
    print(len(batch))

With this single line, it can, without raising exceptions.

The following code doesn't run correctly it the docstore is not already cache:

import ir_datasets
import more_itertools

dataset = ir_datasets.load('msmarco-passage')

for batch in more_itertools.chunked(dataset.docs_iter(), 8196*4):
    print(len(batch))

With this quick fix, it can.
@seanmacavaney seanmacavaney merged commit 8df7fa3 into allenai:master Apr 24, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants