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

Improved API for loading Terrier indices into memory #386

Merged
merged 5 commits into from
Oct 26, 2023
Merged

Conversation

cmacdonald
Copy link
Contributor

(WIP)

@seanmacavaney
Copy link
Collaborator

What's going on here -- can I have a bit of context?

@cmacdonald
Copy link
Contributor Author

Woops. The pr omitted my explanations or any meaningful title. See https://gist.github.com/cmacdonald/c12ddacd73ad379b3b0f7a8b7cf1d080

@cmacdonald cmacdonald changed the title initial commit Load Terrier indices into memory Apr 2, 2023
pyterrier/bootstrap.py Outdated Show resolved Hide resolved
"""

@staticmethod
def _load_into_memory(index, structures=['lexicon', 'direct', 'inverted', 'meta'], load=False):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about document index? It is accessed for getting doc lens, so quite often during ranking.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

document lengths are always in memory. the choice of memory or not relates to the other information, specifically the bits used to access the direct index

Copy link
Contributor

@tonellotto tonellotto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No changes, just a note about document index.

@cmacdonald cmacdonald changed the title Load Terrier indices into memory Improved API for loading Terrier indices into memory Oct 26, 2023
@cmacdonald cmacdonald merged commit e402ecf into master Oct 26, 2023
12 of 13 checks passed
@cmacdonald cmacdonald deleted the index_mem branch October 26, 2023 16:28
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.

3 participants