-
Notifications
You must be signed in to change notification settings - Fork 37
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
Remove unbuffered mode #414
Comments
Doing a short deprecation cycle for this seems reasonable to me 👍 |
The main hesitation I would have with changing this immediately is relating to glotzerlab/signac#397. It should be relatively easy to modify the new code for glotzerlab/signac#249 to handle thread parallelism transparently (and I plan to do this), but I don't know of any way to make it intrinsically safe for process parallelism. If a signac-flow user sets the
Option (4) isn't great, but none of the others currently are either so we may need to consider that possibility before deciding whether or not to deprecate this. |
@vyasr Fetching scheduler status is done before the parallel section begins. That’s the only part that writes to the project document. The parallel portion of the code is read-only, evaluating conditions and determining eligibility. |
Ah right. So in that case, am I correct that |
I discussed my previous comment offline with @bdice to explain my point a little more clearly, and I took a look at the code. Tl;dr, I'm fine with deprecating this flag. My point here was that since we default to thread-parallel execution of job/group label acquisition, these tasks are only accelerated to the extent that they are I/O-bound because Python is inherently single-threaded. If label functions are expensive because they're actually doing some significant amount of processing, then process parallelism is the way to go. Having said that, all of this parallel code happens after the serial writing of the scheduler status to the project document as Bradley mentioned above, so I think we're fine to move forward with this deprecation. |
I'm going to mark this issue as resolved - the design decisions have all been made and implemented in #425, and the only remaining task is to remove the deprecation warning (and remove the default value from the flow config monkeypatch) in a later release. |
Feature description
Currently we support an "unbuffered" mode in signac-flow that disables signac's buffering capabilities, by disabling the config option
use_buffered_mode
(it's on by default). I don't know if it still makes sense to support an unbuffered mode because we requiresignac >= 1.0
. I believe buffering was initially an optional feature (rather than always-on) because signac didn't support buffering in some earlier versions. Our CI takes a long time to run and testing both options (on/off) seems unnecessary at this point.Proposed solution
The option defaults to
True
, and I think this feature could be immediately removed with no deprecation cycle -- in my understanding, it's basically a flag that disables an important performance optimization. However, I don't want to immediately remove it from the config validator (that's more of a breaking change than just requiring buffered mode). I suggest the following.Deprecation:
FlowProject._potentially_buffered
to warn ifuse_buffered_mode
is specified and ignore the option (always buffer).Removal (after 2 minor versions):
use_buffered_mode
option from the config validator (config files with the option specified are no longer valid).FlowProject._potentially_buffered
context manager could be removed and replaced with:with signac.buffered():
or we could just change the name toFlowProject._buffered
.Before anyone begins work on this issue, I would like to get input from @glotzerlab/signac-committers.
The text was updated successfully, but these errors were encountered: