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

Do tokenization preprocessing in a process pool #57

Open
talolard opened this issue Mar 22, 2020 · 0 comments
Open

Do tokenization preprocessing in a process pool #57

talolard opened this issue Mar 22, 2020 · 0 comments

Comments

@talolard
Copy link

For larger datasets, it's not great to do the tokenization on one core when we have many available. I'd suggest wrapping the relevant function in a process pool, or passing the pool as an argument and doing Pool.map

Happy to make a PR if it's a good fit for the repo

with tqdm(open(data_path, "r"), desc=f"loading {data_path}") as f:

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

No branches or pull requests

1 participant