-
Notifications
You must be signed in to change notification settings - Fork 95
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
[ENH] Limit tedana to one core #215
Conversation
# Conflicts: # tedana/workflows/tedana.py
This looks great, @tsalo! I agree it's a bit of a band-aid solution for now, but since most users will (ideally) be running If you'd like to add:
to the |
Codecov Report
@@ Coverage Diff @@
## master #215 +/- ##
=========================================
Coverage ? 51.54%
=========================================
Files ? 32
Lines ? 1969
Branches ? 0
=========================================
Hits ? 1015
Misses ? 954
Partials ? 0
Continue to review full report at Codecov.
|
Interesting! I'm not totally sure why this one minor change suddenly caused all the other linter errors... I did notice that we had previously been using
Let me know, and apologies for making this more complicated than it should have been... |
I'm happy to do that, but I've been testing locally and everything I do seems to disable the |
I've opened a new PR with those changes (#216) so we can discuss that there. |
# Conflicts: # setup.cfg
Out of curiosity, I checked the build time on Circle for these and we're not seeing any appreciable speed-boost. I wonder if that is also the case locally... Should we make an issue about setting the number of cores programmatically, so we remember this is a (beautiful) band-aid ? |
It's weird that there's no difference, although maybe it's because we only have access to two cores in CircleCI? Or the OS? Either way, I would definitely like to see if the duration changes predictably over a larger range of situations, but at least it will prevent I think that #188 is meant to cover that, although maybe @jbteves could update that issue to reflect the direction we've chosen to go in (i.e., making control explicit) or we could close that one and open a new issue specifically for the |
👍 to updating #188 ! Unless any other concerns, then, I'll merge this 🚀 |
That works for me. I would recommend changing the name to something like "Add argument to set number of cores" and I can switch the label from |
References #188.
Changes proposed in this pull request:
Additional information
This PR is more of a temporary fix than a permanent solution. Ultimately, we want to be able to set the number of cores with an argument. Unfortunately, every attempt I've made to do that has failed. On the bright side, there is anecdotal evidence that limiting to one core will speed the pipeline up a fair bit, although we'll want to test that to make sure it's reproducible.
This will probably upset the linter because the environmental variables have to be set before numpy and other multithreading packages are imported, which means that imports will be split at the top of the file. I'm not sure if we'll want to ignore this or to update the linter preferences to explicitly allow for it.