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

IRDS corpus_iter are not subscriptable #315

Closed
cmacdonald opened this issue Jul 31, 2022 · 1 comment · Fixed by #316
Closed

IRDS corpus_iter are not subscriptable #315

cmacdonald opened this issue Jul 31, 2022 · 1 comment · Fixed by #316
Labels
bug Something isn't working
Milestone

Comments

@cmacdonald
Copy link
Contributor

Describe the bug
IRDS corpus_iter are not subscriptable

To Reproduce

dataset = pt.get_dataset('irds:msmarco-passage')
corpus = dataset.get_corpus_iter()[2824500:2824700]

Expected behavior
IRDS are itself subscriptable, so this should work

Additional context

The GeneratorLen object in PyTerrier is the problem - see https://github.com/terrier-org/pyterrier/blob/master/pyterrier/datasets.py#L30-L39

@cmacdonald cmacdonald added the bug Something isn't working label Jul 31, 2022
@cmacdonald cmacdonald linked a pull request Jul 31, 2022 that will close this issue
@cmacdonald
Copy link
Contributor Author

For future reference, the API is now:
def get_corpus_iter(self, verbose=True, start=0, count=None):
for IRDS datasets

@cmacdonald cmacdonald added this to the 0.9 milestone Aug 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant