-
Notifications
You must be signed in to change notification settings - Fork 15
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
Use joblib to parallelize updates #37
Conversation
Thank you for the PR @dwijn! The code looks great but I haven't got time to test it yet. I'll approve once I have a chance to run it. |
Any progress on this? |
@dwijn sorry about the delay. I tried running it but immediately hit a bug and haven't gotten a chance to debug. So if I have a tex file with citations but no bib file yet (or just an empty bib file), and I run I haven't had a chance to look any deeper and plan to return to this when I have more time. But if you happen to have a chance to check, that would be great too. |
parallelize updates Bugfix Add short argument for parallel processing
Dumb bug, fixed it. I also added a short option for parallel updates (-P). |
Nice work, the parallelized adstex would be very helpful. I'd like to raise two questions for potential discussion:
|
Making it a single argument is definitely possible as @syrte proposes, and it would be trivial to implement. I chose two arguments in order to have just a single flag to turn on parallel processing with a default number of threads for the sake of simplicity. Let me know if you want me to change the code to a single argument. I'd probably make it -P [N], with N=8 default. |
Yes, please go ahead! |
@dwijn thank you. If you have a chance, take a look at 3d186df. In particular, I'd like to merge
This is the main change in this commit. All other edits are minor style issues. And I agree that we should keep parallel running as optional for now. I imagine we might turn this on as default in the future after some more testing. |
Yeah, this patch works and produces the desired behavior. The one issue I've noticed is that you now can't simply do |
I guess Hmm, so it sounds that either we use two options "-P" and "-N" as @dwijn did before, or we always ask users to explicitly specify the number of threads such as Does argparse support omitting the space between the option and number (as many linux commands), i.e., does |
Yes, I guess I would favor the solution with two arguments over requiring a user to always provide the number of threads to use. Another option would be to catch this error and handle it gracefully, but I think that will be kind of complicated and it'll be difficult to guarantee it will always do the right thing. |
Thanks for noticing this behavior! I am ok with adding back the I wonder if you two would prefer the current setup, or reintroduce |
I agree with not having the short option for the number of threads. My vote would be to have |
I am fine with either way ;) |
Thank you both! Ready to merge. |
Modifications to parallelize updates, see #36.